Index:
My Vim configurations, originally from amix/vimrc, and changed a lot since then.
screen shots:
This configuration is best suitable for vim 7.4+. However, it could also be used with vim under this version - just disable those features that causing errors at vim start (comment them out).
Tested workable on the following platforms:
- Ubuntu 12.04, 14.04, 16.04
- RedHat 6.7, 7.1
- Centos 6.7, 7.1
- openSUSE 13.2
- Windows win7
Use ./install.sh -h
or ./install.sh --help
for detailed info.
Auto scripts for install/uninstall, but I only tested under limited platforms:
$ git clone --depth 1 https://github.com/ArthurChiao/vim_awesome.git
$ cd vim_awesome
$ ./install.sh
Tested on Ubuntu/Redhat/CentOS/OpenSUSE/Windows/ platforms.
For windows users, you need a bash, such as, cygwin
, mingw
, or like what
I used, git bash
, which is installed along with git
.
# it's better to backup your old configuration files
$ cd ~ && mkdir vimback && mv .vim* vimback -rf
# clone repo
$ git clone --depth 1 https://github.com/ArthurChiao/vim_awesome.git
# copy files to home directory
$ cd vim_awesome && cp .vim_runtime ~ -rf
# install
$ ./install.sh
$ ./update.sh
This will update your vim configuration to the lasted vim_awesome
.
$ ./uninstall.sh
This will remove vim_awesome and restore vim to your previous configuration.
Some dependencies are needed to enable the full-feature of the configuration.
You may need to install them manually if they are not there. However, you
could also choose to ignore them, just disable the features when vim report
errors at the configuration file error: at line xxx in file xxx
.
-
Ubuntu
the following tools are used by the configuration:
# install ctags $ sudo apt-get install ctags # install vim-gtk, this enables `neocomplete`, one of the most powerful # auto completion plugin $ sudo apt-get install vim-gtk
-
RedHat & CentOS
# install ctags $ sudo yum install ctags
-
openSUSE
$ sudo zypper install ctags
-
Windows Download
ctags.exe
, put it intoC:\Windows\System32\
.neocomplete
needs lua enabled when gvim is compiled. Otherwise, it doesn't work (but reports no errors).
vim_awesome
uses pathogen to manage plugins, by which you could easily config
your plugs in plugins.config.
Example of config goes like:
ZIP ack.vim https://github.com/mileszs/ack.vim master
ZIP bufexplorer https://github.com/corntrace/bufexplorer master
ZIP ctrlp.vim https://github.com/kien/ctrlp.vim master
ZIP mayansmoke https://github.com/vim-scripts/mayansmoke master
GIT nerdtree https://github.com/scrooloose/nerdtree master
ZIP
and GIT
indicate the way you want to download and update your plugin.
Followings are plugin name
, github url
and branch name
.
More information is available in plugins.config.
If you encountered neocomplete
problems at vim startup, it may be that
your vim version is under 7.4, or it is not lua
enabled (test it with
:echo has("lua")
.
To fix this problem, please see the solutions provided in https://github.com/Shougo/neocomplete.vim.git
-
Ubuntu
One simple/lazy solution for Ubuntu is to install
gvim
, which includeslua
by default:$ sudo apt-get install vim-gtk
Restart your vim, the
neocomplete
should be ok.If none of the solutions in the above link fits your case, just remove the
neocomplete
plugin:$ rm .vim_runtime/sources_forked/neocomplete.vim -rf
restart the vim.
-
CentOS
Most likely, you need to compile vim74 from source to get lua enabled:
$ yum groupinstall 'Development tools' $ yum install ncurses ncurses-devel $ yum install lua-devel $ wget ftp://ftp.vim.org/pub/vim/unix/vim-7.4.tar.bz2 $ tar -xjf vim-7.4.tar.bz2 $ cd vim74 $ ./configure --prefix=/usr --with-features=huge --enable-rubyinterp --enable-pythoninterp --enable-luainterp $ make && make install
Test with
:echo has("lua")
, should return 1.
If your vim
on windows can not load the colorschemes in ~/.vim_runtime/colors
,
just copy them to the <your vim install dir>/colors/
, e.g, c:/vim74/colors/
.
Restart vim.
If you open an existing python file, you will find that all functions/classes are folded, it may embrass you at the scene, like the following,
here are some quick remedies:
za
- toggle to open/close current foldingzr
andzm
- open/close all first-level foldings in current filezR
andzM
- open/close all foldings in current file
Or, open the foldings with mouse: click the +
character on the left of each folding.
The foldings are created by PythonMode
plugin. If you do not
like it, you could just remove it by deleting the
~/.vim_runtime/sources_forked/python-mode/
folder on your host, and restart vim.
However, i highly recommand you to get familir with this tool, which can
accelerate your python developing by great extent.
For more commands about code folding/unfolding, see Cheat Sheets.
If your vim doesn't have python and python3 support, you may need to run recompile_vim.sh to recompile vim with full python support. (Attention: only test on Ubuntu 16.04)