在写Python的过程中经常会遇到依赖包在Linux可以轻松安装却在Windows上安装不了的情况,除了在Linux桌面发行版上开,还可以在Linux下搭建一个编辑器,下面就记录一下给vim安装依赖插件的过程。

首先安装git 和 vim,git 其中是用来下载插件包的,使用 apt install -y vim git来安装(Ubuntu),yum  install -y vim git(centos)。

vim的插件都是默认安装在~/.vim下面,vim缺乏默认的插件管理器,如果每个插件都手动下载然后在vi ~/.vimrc中配置的话会很繁琐很费劲,所以选用Vundle来管理插件,vundle分别是 Vim 和 Bundle 的缩写,它是一款能够管理 Vim 插件的工具,Vundle 为每一个你安装的插件创建一个独立的目录树,并在相应的插件目录中存储附加的配置文件。因此,相互之间没有混淆的文件。简言之,Vundle 允许你安装新的插件、配置已有的插件、更新插件配置、搜索安装的插件和清理不使用的插件,所有的操作都可以在一键交互模式下完成。

使用 git clone https://github.com/VundleVim/Vundle.vim.git  ~/.vim/bundle/Vundle.vim将vundle插件安装到vim,然后在 用户目录下新建文件 vim ~/.vimrc,在里面写配置文件

----------

set nocompatible " be iMproved, required
set autoindent  
set tabstop=4    
set shiftwidth=4    
set expandtab    
set number  
filetype off " required
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
Plugin 'tpope/vim-fugitive'
Plugin 'rkulla/pydiction'
Plugin 'git://git.wincent.com/command-t.git'
Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}
call vundle#end() " required
filetype plugin indent on " required
filetype plugin on
let g:pydiction_location ='/root/.vim/bundle/pydiction/complete-dict'

------------------------------

然后打开vim 输入 :PluginInstall安装插件(命令模式),输入后不用管,插件会自动下载,安装成功会在每个插件面前会显示+号,或者使用 vim +PluginInstall +qall (Linux命令)命令安装插件。

需要添加新的插件只需要在配置文件里面添加 Plugin '用户/插件名'(GitHub用户/仓库名),然后同样执行插件安装命令就可以安装了,然后配置插件工作目录就行比如 let g:pydiction_location ='/root/.vim/bundle/pydiction/complete-dict'。
记录几个插件常用命令:
:PluginList 列出安装的插件列表
:PluginUpdate 更新插件
:PluginClean 在配置文件中注释掉不要的插件行,然后执行这个命令就可以卸载对应的插件
:PluginSearch xxx 查找vim插件

一个应该有用的插件推荐:https://blog.csdn.net/zzyczzyc/article/details/83244516

------------插件目录样例-------

.
|-- bundle
|   |-- Vundle.vim
|   |   |-- CONTRIBUTING.md
|   |   |-- LICENSE-MIT.txt
|   |   |-- README.md
|   |   |-- README_KR.md
|   |   |-- README_ZH_CN.md
|   |   |-- README_ZH_TW.md
|   |   |-- autoload
|   |   |   |-- vundle
|   |   |   |   |-- config.vim
|   |   |   |   |-- installer.vim
|   |   |   |   `-- scripts.vim
|   |   |   `-- vundle.vim
|   |   |-- changelog.md
|   |   |-- doc
|   |   |   |-- tags
|   |   |   `-- vundle.txt
|   |   |-- ftplugin
|   |   |   `-- vundlelog.vim
|   |   |-- syntax
|   |   |   `-- vundlelog.vim
|   |   `-- test
|   |       |-- files
|   |       |   `-- test.erl
|   |       |-- minirc.vim
|   |       `-- vimrc
|   |-- command-t
|   |   |-- CODE_OF_CONDUCT.md
|   |   |-- CONTRIBUTING.md
|   |   |-- Gemfile
|   |   |-- Gemfile.lock
|   |   |-- LICENSE
|   |   |-- README.md
|   |   |-- Rakefile
|   |   |-- appstream
|   |   |   `-- vim-command-t.metainfo.xml
|   |   |-- autoload
|   |   |   |-- commandt
|   |   |   |   |-- isengard.vim
|   |   |   |   |-- mirkwood.vim
|   |   |   |   `-- private.vim
|   |   |   `-- commandt.vim
|   |   |-- bin
|   |   |   `-- benchmarks
|   |   |       |-- matcher.rb
|   |   |       `-- watchman.rb
|   |   |-- data
|   |   |   `-- benchmark.yml
|   |   |-- doc
|   |   |   |-- command-t.txt
|   |   |   `-- tags
|   |   |-- fixtures
|   |   |   |-- bar
|   |   |   |   |-- abc
|   |   |   |   `-- xyz
|   |   |   |-- baz
|   |   |   |-- bing
|   |   |   `-- foo
|   |   |       |-- alpha
|   |   |       |   |-- t1
|   |   |       |   `-- t2
|   |   |       `-- beta
|   |   |-- plugin
|   |   |   `-- command-t.vim
|   |   |-- ruby
|   |   |   `-- command-t
|   |   |       |-- bin
|   |   |       |   `-- commandtd
|   |   |       |-- command-t.gemspec
|   |   |       |-- ext
|   |   |       |   `-- command-t
|   |   |       |       |-- depend
|   |   |       |       |-- ext.c
|   |   |       |       |-- ext.h
|   |   |       |       |-- extconf.rb
|   |   |       |       |-- heap.c
|   |   |       |       |-- heap.h
|   |   |       |       |-- match.c
|   |   |       |       |-- match.h
|   |   |       |       |-- matcher.c
|   |   |       |       |-- matcher.h
|   |   |       |       |-- ruby_compat.h
|   |   |       |       |-- watchman.c
|   |   |       |       `-- watchman.h
|   |   |       `-- lib
|   |   |           |-- command-t
|   |   |           |   |-- controller.rb
|   |   |           |   |-- finder
|   |   |           |   |   |-- buffer_finder.rb
|   |   |           |   |   |-- command_finder.rb
|   |   |           |   |   |-- file_finder.rb
|   |   |           |   |   |-- help_finder.rb
|   |   |           |   |   |-- history_finder.rb
|   |   |           |   |   |-- jump_finder.rb
|   |   |           |   |   |-- line_finder.rb
|   |   |           |   |   |-- mru_buffer_finder.rb
|   |   |           |   |   `-- tag_finder.rb
|   |   |           |   |-- finder.rb
|   |   |           |   |-- match_window.rb
|   |   |           |   |-- metadata
|   |   |           |   |   `-- fallback.rb
|   |   |           |   |-- mru.rb
|   |   |           |   |-- path_utilities.rb
|   |   |           |   |-- progress_reporter.rb
|   |   |           |   |-- prompt.rb
|   |   |           |   |-- scanner
|   |   |           |   |   |-- buffer_scanner.rb
|   |   |           |   |   |-- command_scanner.rb
|   |   |           |   |   |-- file_scanner
|   |   |           |   |   |   |-- find_file_scanner.rb
|   |   |           |   |   |   |-- git_file_scanner.rb
|   |   |           |   |   |   |-- ruby_file_scanner.rb
|   |   |           |   |   |   `-- watchman_file_scanner.rb
|   |   |           |   |   |-- file_scanner.rb
|   |   |           |   |   |-- help_scanner.rb
|   |   |           |   |   |-- history_scanner.rb
|   |   |           |   |   |-- jump_scanner.rb
|   |   |           |   |   |-- line_scanner.rb
|   |   |           |   |   |-- mru_buffer_scanner.rb
|   |   |           |   |   `-- tag_scanner.rb
|   |   |           |   |-- scanner.rb
|   |   |           |   |-- scm_utilities.rb
|   |   |           |   |-- settings.rb
|   |   |           |   |-- stub.rb
|   |   |           |   |-- util.rb
|   |   |           |   |-- vim
|   |   |           |   |   |-- screen.rb
|   |   |           |   |   `-- window.rb
|   |   |           |   `-- vim.rb
|   |   |           `-- command-t.rb
|   |   |-- spec
|   |   |   |-- command-t
|   |   |   |   |-- controller_spec.rb
|   |   |   |   |-- finder
|   |   |   |   |   |-- buffer_finder_spec.rb
|   |   |   |   |   `-- file_finder_spec.rb
|   |   |   |   |-- matcher_spec.rb
|   |   |   |   |-- scanner
|   |   |   |   |   |-- buffer_scanner_spec.rb
|   |   |   |   |   |-- file_scanner
|   |   |   |   |   |   |-- ruby_file_scanner_spec.rb
|   |   |   |   |   |   `-- watchman_file_scanner_spec.rb
|   |   |   |   |   `-- file_scanner_spec.rb
|   |   |   |   |-- vim_spec.rb
|   |   |   |   `-- watchman
|   |   |   |       `-- utils_spec.rb
|   |   |   `-- spec_helper.rb
|   |   `-- vendor
|   |       |-- vimscriptuploader
|   |       |   |-- README.markdown
|   |       |   |-- vimscriptdef.rb
|   |       |   `-- vimscriptuploader.rb
|   |       `-- vroom
|   |           |-- CONTRIBUTING.md
|   |           |-- LICENSE
|   |           |-- README.md
|   |           |-- examples
|   |           |   |-- basics.vroom
|   |           |   |-- blocks.vroom
|   |           |   |-- buffer.vroom
|   |           |   |-- continuations.vroom
|   |           |   |-- controls.vroom
|   |           |   |-- directives.vroom
|   |           |   |-- escaping.vroom
|   |           |   |-- messages.vroom
|   |           |   |-- mode.vroom
|   |           |   |-- range.vroom
|   |           |   `-- system.vroom
|   |           |-- scripts
|   |           |   |-- respond.vroomfaker
|   |           |   |-- shell.vroomfaker
|   |           |   `-- vroom
|   |           |-- setup.cfg
|   |           |-- setup.py
|   |           `-- vroom
|   |               |-- __init__.py
|   |               |-- actions.py
|   |               |-- args.py
|   |               |-- buffer.py
|   |               |-- color.py
|   |               |-- command.py
|   |               |-- controls.py
|   |               |-- environment.py
|   |               |-- messages.py
|   |               |-- neovim_mod.py
|   |               |-- output.py
|   |               |-- runner.py
|   |               |-- shell.py
|   |               |-- test.py
|   |               `-- vim.py
|   |-- pydiction
|   |   |-- README
|   |   |-- README.md
|   |   |-- after
|   |   |   `-- ftplugin
|   |   |       `-- python_pydiction.vim
|   |   |-- complete-dict
|   |   `-- pydiction.py
|   |-- sparkup
|   |   |-- Makefile
|   |   |-- README.md
|   |   |-- TextMate
|   |   |   `-- Sparkup.tmbundle
|   |   |       |-- Commands
|   |   |       |   `-- Sparkup\ expand.tmCommand
|   |   |       |-- Support
|   |   |       |   `-- sparkup.py -> ../../../sparkup.py
|   |   |       `-- info.plist
|   |   |-- ftdetect
|   |   |   `-- hsb.vim
|   |   |-- ftplugin -> vim/ftplugin
|   |   |-- mit-license.txt
|   |   |-- sparkup-unittest.py
|   |   |-- sparkup.py
|   |   `-- vim
|   |       |-- README.txt
|   |       `-- ftplugin
|   |           |-- html
|   |           |   |-- sparkup.py -> ../../../sparkup.py
|   |           |   `-- sparkup.vim
|   |           |-- htmldjango -> html
|   |           |-- smarty -> html
|   |           `-- xml -> html
|   `-- vim-fugitive
|       |-- CONTRIBUTING.markdown
|       |-- README.markdown
|       |-- autoload
|       |   `-- fugitive.vim
|       |-- doc
|       |   |-- fugitive.txt
|       |   `-- tags
|       |-- ftdetect
|       |   `-- fugitive.vim
|       |-- plugin
|       |   `-- fugitive.vim
|       `-- syntax
|           `-- fugitive.vim
`-- test.py

68 directories, 171 files

-----------------------------------

Linux vim插件安装相关推荐

  1. vim插件安装_如何安装Vim插件

    vim插件安装 尽管Vim快速高效,但默认情况下,它只是一个文本编辑器. 至少,这就是没有插件的情况,插件基于Vim并添加了额外的功能,使其不仅具有键入文本的窗口,还具有更多的功能. 正确搭配各种插件 ...

  2. linux里vim插件',安装vim插件(linux下)

    安装vim插件(linux下) 第一步:安装zencoding插件(自动完成css html) unzip zencoding-vim.zip –d zencoding 第二步,安装autocompl ...

  3. linux jedi-vim安装,python学习-vim插件安装

    centos7上自带python2.7,我们需要优化一下python环境.一.使用豆瓣源加速软件安装pip install -i   flask    #使用-i 选项 mkdir ~./pip &a ...

  4. Linux Vim插件管理器Vundle安装和使用

    Vundle是vim的一个插件管理器, 同时它本身也是vim的一个插件.插件管理器用于方便.快速的安装.删除.Vim更新插件.vim Vundle插件官方地址:https://github.com/V ...

  5. 【学员分享】程序员效率神器,最常用VIM插件安装大全

    相信大家多次被推荐用vim作为编辑程序,知道vim编辑有很多优点,但是vim初始界面太原始了,安装了之后只能用来编辑,如果要运行就需要退出去运行,麻烦死了.回想用现成的IDE是多么的舒服.但是为了更好 ...

  6. pitstop插件使用说明_【学员分享】程序员效率神器,最常用VIM插件安装大全

    相信大家多次被推荐用vim作为编辑程序,知道vim编辑有很多优点,但是vim初始界面太原始了,安装了之后只能用来编辑,如果要运行就需要退出去运行,麻烦死了.回想用现成的IDE是多么的舒服.但是为了更好 ...

  7. ubuntu vim保存退出命令_【学员分享】程序员效率神器,最常用VIM插件安装大全...

    相信大家多次被推荐用vim作为编辑程序,知道vim编辑有很多优点,但是vim初始界面太原始了,安装了之后只能用来编辑,如果要运行就需要退出去运行,麻烦死了.回想用现成的IDE是多么的舒服.但是为了更好 ...

  8. Linux:Vim的安装与配置

    Vim的安装与配置 版权声明:本文为博主原创文章 && 转载请著名出处 @ http://blog.csdn.net/gatieme https://blog.csdn.net/gat ...

  9. VIM插件安装和配置

    1 写在前面   http://blog.csdn.net/namecyf/article/details/7787479 Linux下编程一直被诟病的一点是: 没有一个好用的IDE, 但是听说Lin ...

最新文章

  1. Java语言程序设计(基础篇)第八章(2 19 36)
  2. asp.net中上传文件实例
  3. eclipse和myeclipse中如何关闭自动补全括号,花括号,双引号等功能
  4. lofter 爬虫_本日Lofter德哈tag榜单 20201125
  5. 怎么使用java官方demo?
  6. python给多个子图加总标题
  7. php定义object数据类型,PHP数据类型(4):对象object
  8. JavaFX 已从 JDK 中独立拆分,早期预览版开放下载
  9. ASP.NET页面传值方式
  10. kali 2019-4中文乱码解决方法
  11. [20171206]位图区一定在数据文件开头吗.txt
  12. P3388 【模板】割点(割顶)
  13. 为什么要避免大事务以及大事务如何解决?
  14. (转)姚期智:呼之欲出的量子计算机,和它漫长的最后一英里(全文)
  15. excel/vosviewer词频统计的方法
  16. Python坦克大战源代码
  17. DM - Manager工具
  18. 很全很强大的图形学相关的论文和源码
  19. Java: 实训三 类与对象、继承
  20. 请问如何查询一个APP的Android和iOS下载量?

热门文章

  1. 查看表所有列名SQL
  2. 惠普暗影精灵6-开机显示非惠普原装电池(win11)
  3. html 列表标签 ul ol dl
  4. 聊一聊Go中的GMP调度模型
  5. 计算机网络练习题(应用层)
  6. Windows系统安装lua
  7. HTML多选框美化和动效插件
  8. UNcrackable-Level1绕过root检测
  9. 在微信小程序里引入Vant Weapp组件库详细步骤
  10. php使用汉字编码,php汉字编码转换的方法