Friday, December 12, 2008

Vim or Vi Colors

http://www.vim.org/scripts/script_search_results.php?keywords=&script_type=color+scheme&order_by=creation_date&direction=descending&search=search

http://blog.infinitered.com/entries/show/8

Basically,
1. sudo apt-get install vim
2. save ir_black.vim to ~/.vim/colors/
3. gedit ~/.vimrc
set number
colorscheme ir_black
set t_Co=256
syntax on

" Python tab settings
set ai
set ts=4
set sts=4
set et
set sw=4

" Omni Complete
autocmd FileType python set omnifunc=pythoncomplete#Complete
autocmd FileType javascript set omnifunc=javascriptcomplete#CompleteJS
autocmd FileType html set omnifunc=htmlcomplete#CompleteTags
autocmd FileType css set omnifunc=csscomplete#CompleteCSS
autocmd FileType xml set omnifunc=xmlcomplete#CompleteTags
autocmd FileType php set omnifunc=phpcomplete#CompletePHP
autocmd FileType c set omnifunc=ccomplete#Complete

http://vimdoc.sourceforge.net/htmldoc/insert.html#i_CTRL-X_CTRL-O

So to use autocomplete, in python
import csv
csv. then while in insert mode, Ctrl-X, Ctrl-O, use arrow keys to navigate
a cool trick is to pick the first one, then go backscape and then you can type say Z which saves you some scrolling!

press Ctrl+w twice to switch to the description split window above and repeat to go back to the code window


http://www.juniper.net/security/auto/vulnerabilities/vuln2510.html
~/.vimrc
:set nu
:set nowrap
:set ts=4
:set shiftwidth=4
:set smartindent
:set expandtab
:set backspace=2
:syntax on
:set incsearch
:set ignorecase
:set fo=t
:set cursorcolumn
:set ruler
:set laststatus=2

No comments: