vim 配置

一. VIM 配置

1. 参考配置:

  https://github.com/avdiaid/use_vim_as_ide

2. 安装插件

  2.1YouCompleteMe

  安装参考:https://vimawesome.com/plugin/youcompleteme#installation

  在ubuntu 18.04 下 ./install.py --clang-completer 报错

  解决方法:

  1. you can directly download the Clang archive here(http://llvm.org/releases/3.7.0/clang+llvm-3.7.0-x86_64-linux-gnu-ubuntu-14.04.tar.xz) and move it in the ~/.vim/bundle/YouCompleteMe/third_party/ycmd/clang_archives folder. Once this is done, run again the script install.py.

  2../install.py --clang-completer --system-libclang

  二选一

二. SpaceVim

SpaceVim 是一个社区驱动的模块化的 Vim IDE,以模块的方式组织管理插件以及相关配置, 为不同的语言开发量身定制了相关的开发模块,该模块提供代码自动补全, 语法检查、格式化、调试、REPL 等特性。用户仅需载入相关语言的模块即可得到一个开箱即用的 Vim IDE。

官网: https://spacevim.org/cn/

1. 个人安装记录

  a. 安装按照官网的安装提示安装即可

  b. 插件安装管理: 

    如果你需要添加 github 上的插件,只需要在 SpaceVim 配置文件中添加 [[custom_plugins]] 片段:

[[custom_plugins]]
    name = "lilydjwg/colorizer"
    on_cmd = ["ColorHighlight", "ColorToggle"]
    merged = false

以上这段配置,添加了插件 lilydjwg/colorizer,并且,通过 on_cmd 这一选项使得这个插件延迟加载。 该插件会在第一次执行 ColorHighlight 或者 ColorToggle 命令时被加载。除了 on_cmd 以外,还有一些其它的选项, 可以通过 :h dein-options 查阅。

禁用插件

SpaceVim 默认安装了一些插件,如果需要禁用某个插件,可以通过 ~/.SpaceVim.d/init.toml 的 [options] 片段中的 disabled_plugins 这一选项来操作:

[options]
    # 请注意,该值为一个 List,每一个选项为插件的名称,而非 github 仓库地址。
    disabled_plugins = ["clighter", "clighter8"]

注: 插件安装目录: ~/.cache 和  ~/.cache/vimfiles/repos/

 

 3. NEOVIM

官网: https://neovim.io/

 

 
posted @ 2019-12-11 00:11  IVD  阅读(282)  评论(0编辑  收藏  举报