Some Interesting Stuff: Stackoverflow VIM Tricks
Must-Have VIM-Plugins
- [pathogen.vim] (http://www.vim.org/scripts/script.php?script_id=2332)
- [NERDTree] (http://www.vim.org/scripts/script.php?script_id=1658)
- [Autoclose] (http://www.vim.org/scripts/script.php?script_id=1849)
- [SuperTab] (http://www.vim.org/scripts/script.php?script_id=1643)
- [mulitpleCursors] (https://github.com/terryma/vim-multiple-cursors ) Like in sublime, w00t
- [Comand-T] (https://github.com/wincent/Command-T) ctrl-P in Sublime, textmate original
Maybe Later:
- SubVim : https://github.com/fatih/subvim (MAC OS X only)
.vimrc:
set hidden
set number
set ts=4
set nowrap
set backspace=indent,eol,start
set copyindent
set shiftwidth=4
set shiftround
set showmatch
set ignorecase
set smartcase
set hlsearch
set incsearch
set history=1000
set undolevels=1000
set wildignore=*.swp,*.bak,*.pyc,*.class
set title
set visualbell
set noerrorbells
set nobackup
set noswapfile
filetype plugin indent on
if has('autocmd')
autocmd filetype python set expandtab
endif
set list
set listchars=tab:>.,trail:.,extends:#,nbsp:.
call pathogen#infect()
call pathogen#helptags()
nnoremap . :
map <C-k><C-b> :NERDTreeToggle<enter> " Control-K + Control-B Toggle NerdTree
cmap w!! w !sudo tee >/dev/null %
let mapleader=","
nmap <silent> <leader>ev :e $MYVIMRC<CR>
nmap <silent> <leader>sv :so $MYVIMRC<CR>
" Use Q for formatting the current paragraph (or selection)
vmap Q gq
nmap Q gqap
" Don't use arrow keys!!
map <up> <nop>
map <down> <nop>
map <left> <nop>
map <right> <nop>
nnoremap j gj
nnoremap k gk
" Window navigation with ctrl-h/j/k/l instead of ctrl+w + h/j/k/l
map <C-h> <C-w>h
map <C-j> <C-w>j
map <C-k> <C-w>k
map <C-l> <C-w>l