sábado, 21 de fevereiro de 2009

VIM: .vimrc

Segue meu .vimrc:


set nocompatible " This is vim, not vi (Put this line first!)
"colorscheme koehler " Optional, but I like a black background
set smartcase " Only do case sensitive match on Upper Case
syntax on " Syntax highlight on
set showcmd " Show the command you have typed in
set showmatch " Show matching brackets or parentheses
set wildmenu " Show possible command tab completions
set ruler " Show useful information on the command line
set incsearch " Incremental searching
"set hlsearch " Highlight search results. Clear with :nohl
set nohlsearch
set expandtab " Expand tabs to spaces
set tabstop=2 " 4 spaces is one tab
set shiftwidth=2 " Should be the same as tabstop
set softtabstop=2 " Makes the spaces feel like real tabs
set smarttab " Backspace over expandtab
set noautoindent " Don't use this, use smartindent
set smartindent " Smarter indentation on new lines
filetype on " Try to figure out the right filetype
filetype plugin on " Filetype specific plugins
filetype indent on " Filetype specific intenting
set number " Set number lines


"Python
autocmd BufNewFile,BufRead *.py inorea cfun =IMAP_PutTextWithMovement("def<++>(<++>):\n<++>\nreturn <++>")
autocmd BufRead,BufNewFile *.py inorea cclass =IMAP_PutTextWithMovement("class<++>:\n<++>")
autocmd BufRead,BufNewFile *.py inorea cfor =IMAP_PutTextWithMovement("for<++> in <++>:\n<++>")
autocmd BufRead,BufNewFile *.py inorea cif =IMAP_PutTextWithMovement("if<++>:\n<++>")
autocmd BufRead,BufNewFile *.py inorea celse =IMAP_PutTextWithMovement("if<++>:\n<++>\nelse:\n<++>")
autocmd BufRead,BufNewFile *.py inorea cwhile =IMAP_PutTextWithMovement("while<++>:\n<++>")
autocmd BufRead,BufNewFile *.py inorea cfrom =IMAP_PutTextWithMovement("from<++> import <++>")


" comment lines out with #
map cl :'<,'>s/^/#/g
" " uncomment lines commented with #
map cu :'<,'>s/^#//g
" " toggle line numbers
" map :set nu!
" " open new tab
" map :tabnew
" " tab navigation
" map gT
" map gt
" " close all tabs without saving
" map :tabdo q
" " close all tabs with saving
" map :tabdo wq


Ps. Dica de snipplets: http://vim.wikia.com/wiki/Snippets_for_JavaScript,_HTML_and_Python

Nenhum comentário:

Postar um comentário