set nocompatible behave xterm filetype plugin indent on syntax enable set autowrite set autoindent set backspace=indent,eol,start set clipboard=unnamed set fileencodings=utf-8,latin1 set grepprg=internal set guioptions=el set history=50 set ignorecase set incsearch set laststatus=2 set nobackup set ruler set scrolloff=3 set shortmess+=I set showcmd set smartcase set viminfo^=% set whichwrap+=<,>,[,] " for: http://vim.wikia.com/wiki/PHP_manual_in_Vim_help_format set runtimepath+=~/.vim/local " I'm having this kind of problem: https://bugs.launchpad.net/ubuntu/+bug/227808 " For a reason I don't understand file permissions are lost when nobackup. " updated: not working on this crazy setup anymore " set backupcopy=yes " " let $LANG='C' " todo: correctly describe why this is needed " " hint: it fixes equalprg=perltidy and such on mac if has('gui_running') colorscheme wombat set number set cursorline if has('gui_win32') set guifont=Consolas:h11 elseif has('gui_mac') set guifont=Consolas:h13 " set guifont=Bitstream_Vera_Sans_Mono:h12 elseif has('x11') " note: guifont++ will not work with because it expects XLFD set guifont=Bitstream\ Vera\ Sans\ Mono\ 11 endif else colorscheme wombat256 endif " http://groups.google.com/group/vim_use/browse_thread/thread/5dfb451f1f9601d9?hl=en " ok we lost ',' but also 50% of the keystrokes needed to enter ex mode. noremap , : " emacs style i got used with readline imap _ imap imap lD0 imap " buffers and quickfix nav noremap :bprev noremap :bnext noremap :bfirst noremap :blast noremap :cn noremap :cclose noremap :cp noremap :copen noremap :bdelete! " Tip #270: Insert a single character " http://www.vim.org/tips/tip.php?tip_id=270 nmap i_r " insert blank lines above or under current line nnoremap :set pastem`o``:set nopaste nnoremap :set pastem`O``:set nopaste " http://www.vim.org/tips/tip.php?tip_id=163 " I'm not sure mapping H is a good idea after all since moving " at the top of the screen is usefull, any shortcut idea ? " too bad, i got hooked noremap H :set invhlsearch " This one I love, it auto save whenever Vim lost input focus ... " Usefull when doing lots of editing, test in browser. " Only down side is that you loose your undos, fortunatly this " is in wishlist. autocmd FocusLost * :w " Interacting with MozRepl map r :silent !echo "content.location.reload();repl.quit();" \| nc localhost 4242 " closetag.vim : Functions and mappings to close open HTML/XML tags " http://www.vim.org/scripts/script.php?script_id=13 autocmd Filetype html,xml,php source ~/.vim/plugin/closetag.vim " EnhCommentify.vim : comment lines in a program " http://www.vim.org/scripts/script.php?script_id=23 let g:EnhCommentifyRespectIndent = 'yes' let g:EnhCommentifyPretty = 'yes' let g:EnhCommentifyMultiPartBlocks = 'yes' let g:EnhCommentifyUseSyntax = 'yes' let g:EnhCommentifyTraditionalMode = 'no' " matchit.zip : extended % matching for HTML, LaTeX, and many other languages " http://www.vim.org/scripts/script.php?script_id=39 " taglist.vim : Source code browser (supports C/C++, java, perl, python, tcl, sql, php, etc) " http://vim.sourceforge.net/scripts/script.php?script_id=273 nnoremap :TlistToggle " Smooth Scroll : Smooths scrolls the window for various key mappings " http://www.vim.org/scripts/script.php?script_id=1601 " SuperTab continued. : Do all your insert-mode completion with Tab. " http://www.vim.org/scripts/script.php?script_id=1643 source $HOME/.vim/plugin/supertab.vim " should be loaded before snippetemu " buftabs : Minimalistic buffer tabs saving screen space " http://www.vim.org/scripts/script.php?script_id=1664 let g:buftabs_only_basename=1 let g:buftabs_in_statusline=1 " surround.vim : Delete/change/add parentheses/quotes/XML-tags/much more with ease " http://www.vim.org/scripts/script.php?script_id=1697 " Wombat : Dark gray color scheme sharing some similarities with Desert " http://www.vim.org/scripts/script.php?script_id=1778 " make the statusline slightly less visible, and non-focused ones ignored if has('gui_running') " less contrasting text in status line hi StatusLine guifg=#857b6f " hide text in non-active status line hi StatusLineNC guifg=#444444 " hi Folded guibg=#384048 guifg=#a0a8b0 gui=none " hi FoldColumn guifg=#384048 guibg=#000000 gui=none " hi Comment guifg=#99968b gui=none endif " mako.vim : Adds mako support to vim " http://www.vim.org/scripts/script.php?script_id=1858 " (this autocmd should probably be somewhere more auto) autocmd BufRead *.mako :set filetype=mako " wombat256.vim : Wombat for 88 and 256 color xterms " http://www.vim.org/scripts/script.php?script_id=2465 " snipMate : TextMate-style snippets for Vim " http://www.vim.org/scripts/script.php?script_id=2540 " http://www.abdulqabiz.com/files/vim/mxml.vim au BufNewFile,BufRead *.mxml set filetype=mxml " http://www.abdulqabiz.com/files/vim/actionscript.vim au BufNewFile,BufRead *.as set filetype=actionscript