Image via Wikipedia
My .vimrc file adds syntax highlighting, autocomplete with tab, folding and highlights the line you are on.
Feel free to use or modify it for your needs.
VIM
I have a love hate relationship with VIM. I am extremely productive using it, yet I still think there must be a better editor out there. Despite years of trying out other editors, I always come back to vim. Quanta Plus was close, and notepad++ works well on windows, but I always ending up typing a lot of unnecessary j's and k's ;)My .vimrc
Updated July 30, 2008
if has('syntax') && (&t_Co > 2 || has('win32')) syntax on " enable syntax highlighting color dante " load a colorscheme, it's redundant to use endif " VISUAL color dante " load a colorscheme set cursorline " highlight current line hi cursorline guibg=#333333 " highlight bg color of current line hi CursorColumn guibg=#333333 " highlight cursor if has('cmdline_info') set ruler " show the ruler " a ruler on steroids set rulerformat=%30(%=\:b%n%y%m%r%w\ %l,%c%V\ %P%) set showcmd " show partial commands in status line and " selected characters/lines in visual mode endif if has('statusline') set laststatus=1 " show statusline only if there are > 1 windows " a statusline, also on steroids set statusline=%<%f\ %=\:\b%n%y%m%r%w\ %l,%c%V\ %P endif " ENVIRONMENT set backspace=indent,eol,start " backspace for dummys set showmatch " show matching brackets/parenthesis set wildmenu set wildmode=list:longest,full " comand <tab> completion, list matches and " complete the longest common part, then, " cycle through the matches set shortmess+=filmnrxoOtT " abbrev. of messages (avoids 'hit enter') set showmode " display the current mode set spell " spell checking on set nu " Line numbers on set tabpagemax=15 " only show 15 tabs filetype plugin indent on " Automatically detect file types. set incsearch " find as you type search set hlsearch " highlight search terms " Formatting set wrap " wrap long lines set autoindent " indent at the same level of the previous line set shiftwidth=4 " use indents of 4 spaces set noexpandtab " tabs are tabs, not spaces set matchpairs+=<:> " match, to be used with % set pastetoggle=<f12> " pastetoggle (sane indentation on pastes) set comments=sl:/*,mb:*,elx:*/ " auto format comment blocks "set foldenable " auto fold code "set foldmethod=marker " type of folding " CODING setlocal omnifunc=syntaxcomplete#Complete " activate autocomplete (intellisense) set cot+=menuone " show preview of function prototype " GVIM- (here instead of .gvimrc) if has('gui_running') set guioptions-=T " remove the toolbar set lines=40 " 40 lines of text instead of 24, endif " PLUGINS let g:SuperTabDefaultCompletionType = "<c-x><c-o>" " enable super tab :map <c-f10> <esc>:vsp<cr>:VTree<cr> " map Control + F10 to Vtree
See Also
External Resources
- A collection of .vimrc files
- Text editing with Vim
- Vim for Programmers
- Getting Started with VIM and PHP
- Comfortable PHP editing with VIM
- Technical Analysis: VIM, PowerShell and Signed Code
- Author of VIM
- Graphical vi-vim Cheat Sheet and Tutorial
- Great plain english tutorial for vim
| Attachment | Size |
|---|---|
| vimrc.txt | 2.66 KB |



















