配置vim为shell|配置vim为shell IDE

【配置vim为shell|配置vim为shell IDE】除了可以使用vbundle进行管理插件之外,还可以直接使用手动的方式进行安装管理插件。下面的步骤,主要参考于将Vim编辑器打造成Bash Shell脚本IDE。
下载bash-support插件,http://www.vim.org/scripts/script.php?script_id=365,此页面上选择一个最新的。解压后copy到~/.vim下面。
在 .vimrc 文件中激活它,$ vim ~/.vimrc

:filetype plugin on set number # 可选,增加这行以在 vim 中显示行号

为新脚本自动生成文件头 打开一个测试脚本,使用映射 \ntw 启动模板设置向导。
选中选项 1 设置个性化文件,然后按回车键。 最后生成的模板文件,位于/Users/username/.vim/templates/personal.templates。
The personal details (name, mail, ...) are not set in the template library. They are used to generate comments, ... To set them, start the setup wizard using: - use the menu entry "Bash -> Snippets -> template setup wizard" - use the map "\ntw" inside a Bash buffer

备注:
我使用vbundle进行插件管理时候,在安装YouCompleteMe插件时候,始终无法安装成功,原因是我有通过 brew uninstall python@2 来安装python。虽然我本地mac环境,是自带了python2的,但是我依然选择这种方式来安装python2。并且在.bash_profile文件中有以下配置。
# brew install python@2 export PATH="/usr/local/opt/python@2/libexec/bin:$PATH" # added by Anaconda2 5.1.0 installer #export PATH="/anaconda2/bin:$PATH" # virtualenvwrapperpip python2 export WORKON_HOME=~/Envs source /usr/local/bin/virtualenvwrapper.sh

因为python@2,导致YouCompleteMe插件无法安装。

    推荐阅读