加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

vim插件管理

发布时间:2020-12-15 16:13:50 所属栏目:安全 来源:网络整理
导读:安装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

安装vim-plug插件管理:

Unix

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

Windows (PowerShell)

md ~vimfilesautoload
$uri = 'https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
(New-Object Net.WebClient).DownloadFile(
  $uri,$ExecutionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath(
    "~vimfilesautoloadplug.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:Vimvimfilesbundlevundle

编辑_vimrc文件,加入

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

filetype plugin indent on

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

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读