微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

vim插件管理

安装vim-plug插件管理:

Unix

curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
    https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim

Windows (PowerShell)

md ~\vimfiles\autoload
$uri = 'https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
(New-Object Net.WebClient).DownloadFile(
  $uri,$ExecutionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath(
    "~\vimfiles\autoload\plug.vim"
  )
)

Add a vim-plug section to your ~/.vimrc :

  1. Begin the section with call plug#begin()
  2. List the plugins with Plug commands
  3. call plug#end() to update &runtimepath and initialize plugin system
  4. Automatically executes filetype plugin indent on and Syntax enable. You can revert the settings after the call. e.g. filetype indent off,Syntax off,etc.
  5. Reload .vimrc and :PlugInstall to install plugins.

Example: A small sensible Vim configuration

call plug#begin()
Plug 'tpope/vim-sensible'
call plug#end()

windows安装vundle插件管理

git clone https://github.com/gmarik/vundle D:\Vim\vimfiles\bundle\vundle

编辑_vimrc文件,加入

filetype off
set rtp+=$VIM/vimfiles/bundle/vundle/
call vundle#rc('$VIM/vimfiles/bundle/')
Bundle 'gmarik/vundle'

filetype plugin indent on

可以使用 :BundleInstall ,:BundleInstall! 来下载插件和更新插件

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐