Wiki: Otavio Dot Vim Rc


"
"       ~/.vimrc
"       Otávio Corrêa Cordeiro
"       cordeiro@exatas.unisinos.br
"       Brazil, 30 de junho de 2004
"       versão 0.9
"

" Seta o tamanho do TAB e redefine a statusbar
set ts=4 sts=4 sw=4 smarttab noexpandtab
set statusline=[%n]\ %f\ %(\ %M%R%H)%)\=Pos=<%l\,%c%V>\ ASCII=%b\ HEX=%B

" Não tirar esta linha:
set nocompatible
"
" POPUP com o mouse, no Linux
set mousemodel=popup
"

" Faz o Backspace funcionar corretamente
"imap <BackSpace> <Left><Del>
set backspace=indent,eol,start
"

" Desabilita Backup ;)
set nobackup
set nowritebackup
"

" Sintaxe Colorida
syntax enable
"

" Reconhece os tipos de arquivos.
filetype plugin indent on
"

" Destaca os paranteses/chaves/colchetes quando sao fechados
set showmatch
"

" Lembra do diretório do último arquivo aberto
set browsedir=buffer
"

" No Windows adiciona o colar com clique em dois botões ou botão do meio.
map <S-Insert> <MiddleMouse>
map! <S-Insert> <MiddleMouse>
"

" Muda arquivos do formato Windows para o Linux e vice versa.
map ,w2u1 :se ff=unix
map ,w2u2 :1,$s/^M//g
"

" Avançar pelas palavras
nnoremap <C-Left> b
vnoremap <C-S-Left> b
nnoremap <C-S-Left> gh<C-O>b
inoremap <C-S-Left> <C-O>gh<C-O>b
nnoremap <C-Right> w
vnoremap <C-S-Right> w
nnoremap <C-S-Right> gh<C-O>w
inoremap <C-S-Right> <C-O>gh<C-O>w
"

" Procurar funcao...
map ,* :grep "\<<cword>\>" `find -name '*.[ch]'`<CR>
"

" Como deveria funcionar o TAB :-)
vmap <tab> >gv
vmap <s-tab> <gv
"

" Esconde o ponteiro do mouse quando se está digitando.
set mousehide
"

" Visual Bell
set visualbell
"

" Espaçoes e Tabulções
set listchars=tab:»·,trail:·
set list!
function MostrarEspacos()
        set listchars=tab:»·,trail:·
        set list!
endfunction
imap <F12> <Esc>:call MostrarEspacos()<Cr>
vmap <F12> <Esc>:call MostrarEspacos()<Cr>
map  <F12> :call MostrarEspacos()<Cr>
"

" Auto Completar
function Texfunctions()
        imap ( ()<Left>
        imap [ []<Left>
        imap { {}<Left>
endfunction
au FileType tex,bib call Texfunctions()

function Cfuncoes()
        imap ( ()<Left>
        imap [ []<Left>
        imap { {<CR>}<Up><End><CR>
endfunction
au FileType c,cpp,java,perl call Cfuncoes()

function! InsertTabWrapper(direction)
        let col = col('.') - 1
        if !col || getline('.')[col - 1] !~ '\k'
                return "\<tab>"
        elseif "backward" == a:direction
                return "\<c-p>"
        else
                return "\<c-n>"
        endif
endfunction
inoremap <tab> <c-r>=InsertTabWrapper ("forward")<cr>
inoremap <s-tab> <c-r>=InsertTabWrapper ("backward")<cr>
"

" Redimensiona o tamanho da janela do buffer atual.
if bufwinnr(1)
    map + <C-W>+
    map - <C-W>-
endif
"

" Seta tamanho da Janela do gVIM
if has('gui')
"   set lines=45
"   set columns=100
    set mouse=a
endif
"

" Seta posição para a Janela
"if has('gui')
"   winpos 50 0
"endif
"

" Seta o esquema de cor
colorscheme darkblue
"

" Seta fonte
"set guifont=Monospace 12
"

" Numera as linhas
set number
set ruler
"

" Seta auto-indent
set autoindent
"

" Tira o menu do modo gráfico (gVIM)
"set guioptions-=T
"

" Não deixa quebrar as linhas (odeio linhas quebradas)
set nowrap
"

" No Linux
if has("unix")
    " Dicionário
    set dictionary+=$HOME/.vim/pt_BR.dic
    set complete-=k complete+=k
    "
    " Seta a fonte no Linux
    set guifont=Monospace
    "
    " For Taglist
    nnoremap <silent> <F8> :Tlist<CR>
    nnoremap <silent> <F9> :TlistSync<CR>
    let Tlist_Ctags_Cmd = '/home/rcsd/cordeiro/.vim/bin/ctags'
    let Tlist_Use_Right_Window = 0
    let Tlist_Sort_Type = "name"
    "
endif

" No Windows deixar essas linhas ....
if has("win32")
    source $VIMRUNTIME/vimrc_example.vim
    source $VIMRUNTIME/mswin.vim
    behave mswin
    set diffexpr=MyDiff()
    function MyDiff()
        let opt = ''
        if &diffopt =~ 'icase' | let opt = opt . '-i ' | endif
        if &diffopt =~ 'iwhite' | let opt = opt . '-b ' | endif
        silent execute '!C:\PROGRAMAS\VIM\VIM62\diff -a ' . opt . '"' . v:fname_in . '" "' . v:fname_new . '" > "' . v:fname_out . '"'
    endfunction
endif
"

CategoryVimRc

<small>P? |?

greek dating photo personals dating website dating norwich uk singles executive dating

sex party party fiesta wild party girls party fiesta girls party ideas drunk teen party

incest sex free incest pics incest cartoon incest free pictures incest site brother and sister incest

sex toy vibrator sex toys for woman virtual sex toys unusual sex toys sex toys india buy sex toys online

free indian sex site embroidery sarees south indian actress sex south indian sex indian woman sex sex indian

free indian sex site embroidery sarees south indian actress sex south indian sex indian woman sex sex indian

nudist family picture nudist pages nudist russia pictures nudism nudist camp family american nudist

stories incest sister incest brother sister free sister and sister incest bother sister incest sister incest pictures incest brother sister sex

</small>


Copyright © 2007 RobertMelton.com