vim one of powerful editor in linux. Here are few tips to make it more powerful
1. Setting auto completion
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
Showing posts with label powering vim. Show all posts
Showing posts with label powering vim. Show all posts
Friday, April 25, 2008
Tuesday, April 22, 2008
Giving power to vim - 1
To use vim efficiently and effectively we need to do some settings.
Open vimrc file. Its normally under HOME directory and hidden. On ubuntu
gedit ~/.vimrc will open it in gedit .
Add Following in to it:
1. Keeping History : Vim only remembers the last 20 commands and search patterns entered.
set history 1000
2. To show line numbers : set nu
3. To show syntax highlighting : set syntax on
4. To show menu with possible tab completions : set wildmenu
5. To set background : set background=dark
6. To set terminal title to filename : set title
Open vimrc file. Its normally under HOME directory and hidden. On ubuntu
gedit ~/.vimrc will open it in gedit .
Add Following in to it:
1. Keeping History : Vim only remembers the last 20 commands and search patterns entered.
set history 1000
2. To show line numbers : set nu
3. To show syntax highlighting : set syntax on
4. To show menu with possible tab completions : set wildmenu
5. To set background : set background=dark
6. To set terminal title to filename : set title
Subscribe to:
Posts (Atom)