面向web前端及node开发人员的vim配置

鉴于 window 下基本用不到 vim,所以下面内容不再提及 window,具体可以在相应 github 中查看手册
操作基础:已装有上有 nodejs(npm)。没装的可以移步官网:https://nodejs.org/en/

另有 sublime 配置方式,请移步:sublime配置及使用技巧

插件管理工具 pathogen

github地址: github

mkdir -p ~/.vim/autoload ~/.vim/bundle && \
curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim

插件

安装插件都在 ~/.vim/bundle/ 中安装,以下部分操作可能需要 root 权限

  • vim-sensible vim新人专属 github
cd ~/.vim/bundle/
git clone git://github.com/tpope/vim-sensible.git
cd ~/.vim/bundle/
git clone https://github.com/vim-airline/vim-airline-themes.git
cd ~/.vim/bundle/
git clone https://github.com/vim-airline/vim-airline-themes ~/.vim/bundle/vim-airline-themes
  • Emmet 快速建立html树 github
cd ~/.vim/bundle/
git clone https://github.com/mattn/emmet-vim.git
  • editorconfig 编辑器配置 github
cd ~/.vim/bundle/
git clone https://github.com/editorconfig/editorconfig-vim.git

新建文件 vim ~/.vim/.editconfig (可自定义,通常放在项目根目录),键入以下设置:

root = true

indent_style = space
indent_size = 2
tab_width = 2
end_of_line = lf
charset = utf-8
insert_final_newline = true
trim_trailing_whitespace = true
  • vim-multiple-cursors 支持多行编辑 github
cd ~/.vim/bundle/
git clone https://github.com/terryma/vim-multiple-cursors.git
  • unite-vim 快速管理项目中的文件 github
cd ~/.vim/bundle/
git clone https://github.com/Shougo/unite.vim.git
  • vim-javascript 缩进和语法支持 github
cd ~/
  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值