Version 7 (modified by nerdzero, 12 years ago) |
---|
Vim Cobra Support
Single User
Change to your home directory
cd $HOME
Get the most recent updates from the Mercurial repository via a clone
hg clone http://bitbucket.org/ramonrocha/cobra-on-vim/ cobra-vim
For *.zip, *.gz, and *.bz2 archives download the file from http://bitbucket.org/ramonrocha/cobra-on-vim/
Create a .vim directory if one isn't already present
mkdir .vim
Then copy the four folders (colors, indent, ftdetect, syntax) from cobra-vim into the .vim directory:
cp -r cobra-vim/* .vim
Open or create a file with a .cobra extension and you will have highlighting and indentation for Cobra
If you use a dark background, you can try the cobra color scheme.
:colorscheme cobra
If you use a light background, you can try the cobralight color scheme instead.
:colorscheme cobralight
Add either of the previous commands to your .vimrc file in your home directory to make the change permanent.
To change back to the default color scheme, execute:
:colorscheme default
All Users
For all users use your system admin privileges to copy the indent/cobra.vim, ftdetect/cobra.vim, syntax/cobra.vim, into Vim's indent, ftdetect, and syntax directories, respectively. These directories are found in the Vim home path. An example of such a Vim path is /usr/share/vim/vim72.
Alternative
Per Eric Z. Beard:
Vim set to python works Ok in a pinch.
au BufNewFile,BufEnter *.cobra set noexpandtab ts=4 sw=4 filetype=python