Skip to content

Instantly share code, notes, and snippets.

@voyeg3r
Created January 23, 2009 17:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save voyeg3r/51106 to your computer and use it in GitHub Desktop.
Save voyeg3r/51106 to your computer and use it in GitHub Desktop.
vimrc
" Arquivo de configuração do vim
" vim:nolist:
" Criado: Qua 02/Ago/2006 hs 09:19
" Last Change: Qui 22 Jan 2009 13:03:35 BRT
" Autor: Sergio Luiz Araujo Silva
" Codificação: utf-8
" Download: http://gist.github.com/gists/51106
" git clone git://gist.github.com/51048.git gist-51048
" Licence: Licença: Este arquivo é de domínio público
" Garantia: O autor não se responsabiliza por eventuais danos
" causados pelo uso deste arquivo.
" ( O O )
" +===========oOO==(_)==OOo==============+
" | |
" | °v° Sergio Luiz Araujo Silva |
" | /(_)\ Linux User #423493 |
" | ^ ^ voyeg3r  gmail.com |
" +======================================+
"
" colabore com o livro sobre o vim em português:
" http://code.google.com/p/vimbook/
"
" Referências:
" * http://aurelio.net/vim/vimrc-ivan.txt
"
" :set runtimepath=~/vimruntime,/mygroup/vim,$VIMRUNTIME
" :echo g:colors_name
"
" sobre o plugin taglist
" http://www.caiomoritz.com/2008/02/09/o-poder-da-exuberant-ctags-aliada-ao-vim/
"
" menu
"amenu Ferramentas.Cores.ExibirTema :echo g:colors_name<cr>
" cores
amenu T&emas.ExibirTema :echo g:colors_name<cr>
menu T&emas.cores.quagmire :colo quagmire<CR>
menu T&emas.cores.inkpot :colo inkpot<CR>
menu T&emas.cores.google :colo google<CR>
menu T&emas.cores.ir_black :colo ir_black<CR>
menu T&emas.cores.molokai :colo molokai<CR>
menu T&emas.cores.digerati :colo digerati<CR>
menu T&emas.cores.vibrantink :colo vibrantink<CR>
map <silent> <leader>f <esc>:FuzzyFinderFile<cr>
map <silent> <leader>b <esc>:FuzzyFinderBookmark<cr>
map <silent> <leader>a <esc>:FuzzyFinderAddBookmark<cr>
map <silent> <leader>d <esc>:FuzzyFinderDir<cr>
map <silent> <leader>m <esc>:FuzzyFinderMruFile<cr>
map <silent> <leader>c <esc>:FuzzyFinderMruCmd<cr>
" para alternar de modo no fuzzyfinder ^l
" para ir para o próximo na lista ^n
" para ir para o anterior na lista ^p
" :FuzzyFinderBuffer - launchs Fuzzyfinder as Buffer mode.
" :FuzzyFinderFile - launchs Fuzzyfinder as File mode.
" :FuzzyFinderDir - launchs Fuzzyfinder as Directory mode.
" :FuzzyFinderMruFile - launchs Fuzzyfinder as MRU-File mode.
" :FuzzyFinderMruCmd - launchs Fuzzyfinder as MRU-Command mode.
" :FuzzyFinderBookmark - launchs Fuzzyfinder as Bookmark mode.
" :FuzzyFinderTag - launchs Fuzzyfinder as Tag mode.
" :FuzzyFinderTaggedFile - launchs Fuzzyfinder as Tagged-File mode.
" destaca como erro tabulações no começo da linha
au! VimEnter * match ErrorMsg /^\t\+/
" registro de alterações de arquivo
" ChangeLog entry convenience
" Função para inserir um status do arquivo
" cirado: data de criação, alteração, autor etc
fun! InsertChangeLog()
normal(1G)
call append(0, "Arquivo: ")
call append(1, "Criado: " . strftime("%a %d/%b/%Y hs %H:%M"))
call append(2, "Last Change: " . strftime("%a %d/%b/%Y hs %H:%M"))
call append(3, "autor: <+digite seu nome+>")
normal gg
endfun
" Cria um cabeçalho para scripts bash
fun! InsertHeadBash()
normal(1G)
call append(0, "#!/bin/bash")
call append(1, "# Criado em:" . strftime("%a %d/%b/%Y hs %H:%M"))
call append(2, "# Last Change: " . strftime("%a %d/%b/%Y hs %H:%M"))
call append(3, "# vim:ft=sh:fdm=syntax:nu:")
call append(4, "# Instituicao: <+nome+>")
call append(5, "# Proposito do script: <+descreva+>")
call append(6, "# Autor: <+seuNome+>")
call append(7, "# site: <+seuSite+>")
normal gg
endfun
map ,sh :call InsertHeadBash()<cr>A
au BufNewFile,BufRead *.sh if getline(1) == "" | normal ,sh
augroup filetypedetect
au BufNewFile,BufRead *.txt setf txt
augroup END
augroup filetypedetect
au BufNewFile,BufRead *.sh setf sh
augroup END
fun! BufNewFile_PY()
normal(1G)
call append(0, "#!/usr/bin/env python")
call append(1, "# # -*- coding: UTF-8 -*-")
call append(2, "# Criado em:" . strftime("%a %d/%b/%Y hs %H:%M"))
call append(3, "# Last Change: " . strftime("%a %d/%b/%Y hs %H:%M"))
call append(4, "# vim:ft=python:nolist:nu:")
call append(5, "# Instituicao: <+nome+>")
call append(6, "# Proposito do script: <+descreva+>")
call append(7, "# Autor: <+seuNome+>")
call append(8, "# site: <+seuSite+>")
normal gg
endfun
autocmd BufNewFile *.py call BufNewFile_PY()
map ,py :call BufNewFile_PY()<cr>A
nmap <c-s-c> :call LastChange()<cr>
nmap <c-m-c> :call InsertChangeLog()<cr>
" Automatically give executable permission to scripts starting
" with #!/usr/bin/perl and #!/bin/sh
au BufNewFile,BufWritePost * if getline(1) =~ "^#!/bin/[a-z]*sh" ||
\ getline(1) =~ "^#!/usr/bin/env python" | silent execute "!chmod u+x %" | endif
"numerar linhas
command! -nargs=* -range Nlist <line1>,<line2>call Nlist(<f-args>)
function! Nlist(...) range
if 2 == a:0
let start = a:1
let append = a:2
elseif 1 == a:0
let start = a:1
let append = " "
else
let start = 1
let append = " "
endif
" try to work like getline (i.e. allow the user to pass in . $ or 'x)
if 0 == (start + 0)
let start = line(start)
endif
exe a:firstline . "," . a:lastline . 's/^/\=line(".")-a:firstline+start.append/'
endfunction
" rola janela alternativa
fun! ScrollOtherWindow(dir)
if a:dir == "down"
let move = "\<C-E>"
elseif a:dir == "up"
let move = "\<C-Y>"
endif
exec "normal \<C-W>p" . move . "\<C-W>p"
endfun
nmap <silent> <M-Down> :call ScrollOtherWindow("down")<CR>
nmap <silent> <M-Up> :call ScrollOtherWindow("up")<CR>
set foldlevel=2
set vb t_vb=
set nolist
set listchars=tab:\|\ ,extends:>,precedes:<,trail:-,nbsp:%
":help options linha 4321
"au BufNewFile,BufRead *.txt source ~/.vim/syntax/txt.vim
" testa de há modo gráfico
if &t_Co > 2 || has("gui_running")
syntax on
set hlsearch
colorscheme ir_black
hi LineNr guifg=pink ctermfg=lightMagenta
"hi LineNr guifg=green ctermfg=lightGreen
endif
let hr= strftime("%H")
if 0 <= hr && hr <= 3
colors ir_black
elseif 4 <= hr && hr <= 7
colors molokai
elseif 8 <= hr && hr <= 14
colors vibrantink
elseif 15 <= hr && hr <= 20
colors ir_black
else
colors digerati
endif
fun! TimeColorscheme()
let hr= strftime("%H")
if 0 <= hr && hr <= 3
colors ir_black
elseif 4 <= hr && hr <= 7
colors molokai
elseif 8 <= hr && hr <= 14
colors vibrantink
elseif 15 <= hr && hr <= 20
colors ir_black
else
colors digerati
endif
endfun
function! <SID>SwitchColorSchemes()
if exists("g:colors_name")
if g:colors_name == 'google'
colorscheme colorful
elseif g:colors_name == 'colorful'
colorscheme zenburn
elseif g:colors_name == 'zenburn'
colorscheme python
elseif g:colors_name == 'python'
colorscheme softblue
elseif g:colors_name == 'softblue'
colorscheme neverness
elseif g:colors_name == 'neverness'
colorscheme summerfruit
elseif g:colors_name == 'summerfruit'
colorscheme desert
elseif g:colors_name == 'desert'
colorscheme wombat
elseif g:colors_name == 'wombat'
colorscheme vividchalk
elseif g:colors_name == 'vividchalk'
colorscheme quagmire
elseif g:colors_name == 'quagmire'
colorscheme digerati
elseif g:colors_name == 'digerati'
colorscheme vitamins
elseif g:colors_name == 'vitamins'
colorscheme eclm_wombat
elseif g:colors_name == 'eclm_wombat'
colorscheme native
elseif g:colors_name == 'native'
colorscheme molokai
elseif g:colors_name == 'molokai'
colorscheme inkpot
elseif g:colors_name == 'inkpot'
colorscheme vibrantink
elseif g:colors_name == 'vibrantink'
colorscheme ir_black
elseif g:colors_name == 'ir_black'
colorscheme google
endif
endif
endfunction
"map <silent> <F6> :call <SID>SwitchColorSchemes()<CR> <BAR> :echo g:colors_name<cr>
map <silent> <F6> <esc>:call <SID>SwitchColorSchemes()<CR><bar>:echo g:colors_name<cr>
set anti gfn=Monaco\ 10,\ Envy\ Code\ R\ 10
"set anti gfn=Liberation\ Mono\ 9
"set guifont=Bitstream\ Vera\ Sans\ Mono\ 9
set ve=all
" cura para acesso remoto
set notimeout
set ttimeout
set timeoutlen=100
set autowrite " salvamento automático
set shiftwidth=4
set softtabstop=4
set viminfo=%,'50,\"100,/100,:100,n
set undolevels=1000 " undoing 1000 changes should be enough :-)
set updatecount=100 " write swap file to disk after each 20 characters
set updatetime=6000 " write swap file to disk after 6 inactive seconds
set noerrorbells " don't make noise
set incsearch " habilita busca incremental
set ts=4 " Paradas de tabulação com 4 espaços
set nocompatible
set ignorecase "forma abreviada ic
set smartcase "Se começar uma busca em maiúsculo ele habilita o case
set noerrorbells
set visualbell
set nu ai sm js
set showcmd showmode
"set showmatch
set ruler
set hls
set backup
set backupdir=~/.backup,~/tmp,.,/tmp
set backupext=.backup
set mousemodel=popup
set ttyfast
" A mapping to make a backup of the current file.
fun! WriteBackup()
let fname = expand("%:p") . "__" . strftime("%d-%m-%Y--%H.%M.%S")
silent exe ":w " . fname
echo "Wrote " . fname
endfun
nnoremap <Leader>ba :call WriteBackup()<CR>
" Uppercase first letter of sentences
":%s/[.!?]\_s\+\a/\U&\E/g
" Define o número de linhas deslocadas com os comandos
" ^U (Ctrl+U) e ^D (Ctrl+D)
setlocal scroll=2
syn match ipaddr /\(\(25\_[0-5]\|2\_[0-4]\_[0-9]\|\_[01]\?\_[0-9]\_[0-9]\?\)\.\)\{3\}\(25\_[0-5]\|2\_[0-4]\_[0-9]\|\_[01]\?\_[0-9]\_[0-9]\?\)/
hi link ipaddr Identifier
map ,d <esc>my:%s/\(^\n\{2,}\)/\r/g<cr>`y
nno <S-F11> <esc>:set invhls<cr>
" Para inserir o simbolo use ^v ^M ou ^v Enter
if has("user_commands")
" remove from the file
com! RemoveCtrlM :%s/\%x0d/\r/g
" change to directory of current file
com! CD cd %:p:h
endif
noremap <Leader>m mmHmt:%s/<C-V><cr>//ge<cr>'tzt'm
" no caso do sed faça:
"sed -i 's/\x0D$//' *
" Para apagar caracteres de final de linha do DOS manualmente faça:
":%s/\%x0d//g
" plugin potwiki
" leia: http://sergioaraujo.pbwiki.com/potwiki
au Filetype potwiki set sts=4
highlight PotwikiWord guifg=darkcyan
highlight PotwikiWordNotFound guibg=Red guifg=Yellow
" para ativar snippets
filetype on
filetype plugin on
"let snippetsEmy_key = "<C-Space>"
" place holders snippets
" File Templates
" --------------
" ^J jumps to the next marker
" iabbr <buffer> for for <+i+> in <+intervalo+>:<cr><tab><+i+>
function! LoadFileTemplate()
"silent! 0r ~/.vim/templates/%:e.tmpl
syn match vimTemplateMarker "<+.\++>" containedin=ALL
hi vimTemplateMarker guifg=#67a42c guibg=#112300 gui=bold
endfunction
function! JumpToNextPlaceholder()
let old_query = getreg('/')
echo search("<+.\\++>")
exec "norm! c/+>/e\<CR>"
call setreg('/', old_query)
endfunction
autocmd BufNewFile * :call LoadFileTemplate()
nnoremap <C-J> :call JumpToNextPlaceholder()<CR>a
inoremap <C-J> <ESC>:call JumpToNextPlaceholder()<CR>a
"
" http://aurelio.net/doc/vim/txt.vim coloque em ~/.vim/syntax
au BufNewFile,BufRead *.txt source ~/.vim/syntax/txt.vim
" CTRL-X CTRL-F file names
" CTRL-X CTRL-L whole lines
" CTRL-X CTRL-D macro definitions (also in included files)
" CTRL-X CTRL-I current and included files
" CTRL-X CTRL-K words from a dictionary
" CTRL-X CTRL-T words from a thesaurus
" CTRL-X CTRL-] tags
" CTRL-X CTRL-V Vim command line
" CTRL-X CTRL-O códigos
" complementação de códigos
au FileType * exe('setl dict+='.$VIMRUNTIME.'/syntax/'.&filetype.'.vim')
" numerar linhas
":let i=1 | g/^/s//\=i."\t"/ | let i=i+1
map ,n <esc>:let i=1 <bar> g/^/s//\=i."\t"/ <bar> let i=i+1<cr>
map <F2> <esc>:NERDTreeToggle<cr>
nnoremap <F3> :set invpaste paste?<cr>
"imap <F3> <C-O><F3><cr><cr>
imap <F3> <esc>:set invpaste paste?<cr>a<cr>
set pastetoggle=<F3>
"usa o tab em modo insert para completar palavras
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
"Fechamento automático de parênteses, chaves e colchetes
"imap { {}<left>
"imap ( ()<left>
"imap [ []<left>
"Para ir para a próxima linha usando l ou h
set whichwrap=h,l,~,[,]
"set matchpairs+=<:>
filetype plugin indent on
set dictionary+=/home/sergio/docs/conf/dict/.words.txt
set infercase
set noequalalways
set wildmenu
set wildmode=list:longest,full
inoremap <tab> <c-r>=InsertTabWrapper ("forward")<cr>
inoremap <s-tab> <c-r>=InsertTabWrapper ("backward")<cr>
"Complementação de palavras
if v:version >= 700
set completeopt+=longest
set completeopt=longest,menuone
set spell spelllang=pt
map <silent> <C-M-i> :setlocal invspell<CR>
imap <silent> <C-M-i> <ESC>:setlocal invspell<CR>i
endif
setlocal complete=.,w,k,b,u,t,i
set complete-=k complete+=k
set nospell
set spellsuggest=8
map <s-F7> <esc>:set spell!<cr>
" status bar format
" O trecho abaixo formata a barra de status com algumas opções interessantes!
" mostra o código ascii do caractere sob o cursor e outras coisas mais
set statusline=%<%F%h%m%r%h%w%y\ ft:%{&ft}\ ff:%{&ff}\ Modificado:\ %{strftime(\"%a\ %d/%B/%Y\ %H:%M:%S\",getftime(expand(\"%:p\")))}%=\ lin:%04l\ \total:%04L\ hex:%03.3B\ ascii:%03.3b\ %P
set laststatus=2 " Sempre exibe a barra de status
nmap n nzz
nmap N Nzz
nmap * *zz
nmap # #zz
nmap g* g*zz
nmap g# g#zz
" recarregar o vimrc
" Source the .vimrc or _vimrc file, depending on system
if &term == "win32" || "pcterm" || has("gui_win32")
map ,v :e $HOME/_vimrc<CR>
nmap <F12> :<C-u>source ~/_vimrc <BAR> echo "Vimrc recarregado!"<CR>
else
map ,v :e $HOME/.vimrc<CR>
nmap <F12> :<C-u>source ~/.vimrc <BAR> echo "Vimrc recarregado!"<CR>
endif
" Highlight redundant whitespace and tabs.
highlight RedundantWhitespace ctermbg=red guibg=red
match RedundantWhitespace /\s\+$\| \+\ze\t/
map <F7> <esc>mz:%s/\s\+$//g<cr>`z
fun! LastChange()
mark z
if getline(1) =~ ".*Last Change:" ||
\ getline(2) =~ ".*Last Change:" ||
\ getline(3) =~ ".*Last Change:" ||
\ getline(4) =~ ".*Last Change:" ||
\ getline(5) =~ ".*Last Change:"
exec "1,5s/\s*Last Change: .*$/Last Change: " . strftime("%c") . "/"
endif
exec "'z"
endfun
nmap <F9> <esc>:w<cr>
imap <F9> <C-O><C-S>
" salva com <F5> e altera o time stamp chamando a função
" LastChange() definina acima
map <F5> <esc>:call LastChange() <BAR> w<cr>
" abre o histórico de comandos
"ao salvar modificar o change log no começo do arquivo
cab wq call LastChange() <BAR> wq<cr>
"============ Fim da Data Automática ===================
" Abreviações
"
" Estas linhas sao para não dar erro
" na hora de salvar arquivos
cab W w
cab Wq wq
cab wQ wq
cab WQ wq
cab Q q
iab tambem também
iab teh the
iab them then
iab latex \LaTeX\
iab ,m <voyeg3r@gmail.com>
ab slas Sérgio Luiz Araújo Silva
ab vc você
iab teh the
iab a. ª
iab analize análise
iab angulo ângulo
iab apos após
iab apra para
iab aqeule aquele
iab aqiulo aquilo
iab arcoíris arco-íris
iab aré até
iab asim assim
iab aspeto aspecto
iab assenção ascenção
iab assin assim
iab assougue açougue
iab aue que
iab augum algum
iab augun algum
iab ben bem
iab beringela berinjela
iab bon bom
iab cafe café
iab caichote caixote
iab capitões capitães
iab cidadães cidadãos
iab ckaro claro
iab cliche clichê
iab compreenssão compreensão
iab comprensão compreensão
iab comun comum
iab con com
iab contezto contexto
iab corrijir corrigir
iab coxixar cochichar
iab cpm com
iab cppara para
iab dai daí
iab danca dança
iab decer descer
iab definitamente definitivamente
iab deshonestidade desonestidade
iab deshonesto desonesto
iab detale detalhe
iab deven devem
iab díficil difícil
iab distingeu distingue
iab dsa das
iab dze dez
iab ecessão exceção
iab ecessões exceções
iab eentão e então
iab emb bem
iab ems sem
iab emu meu
iab en em
iab enbora embora
iab equ que
iab ero erro
iab erv ver
iab ese esse
iab esselência excelência
iab esu seu
iab excessão exceção
iab Excesões exceções
iab excurção excursão
iab Exenplo exemplo
iab exeplo exemplo
iab exijência exigência
iab exijir exigir
iab expontâneo espontâneo
iab ezemplo exemplo
iab ezercício exercício
iab faciu fácil
iab fas faz
iab fente gente
iab ferias férias
iab geito jeito
iab gibóia jibóia
iab gipe jipe
iab ha há
iab hezitação hesitação
iab hezitar hesitar
iab http:\\ http:
iab iigor igor
iab interesado interessado
iab interese interesse
iab Irria Iria
iab iso isso
iab isot isto
iab ítens itens
iab ja já
iab jente gente
iab linguiça lingüiça
iab linux GNU/Linux
iab masi mais
iab maz mas
iab con com
iab mema mesma
iab mes mês
iab muinto muito
iab nao não
iab nehum nenhum
iab nenina menina
iab noã não
iab no. nº
iab N. Nº
iab o. º
iab obiter obter
iab observacao observação
iab ons nos
iab orijem origem
iab ospital hospital
iab poden podem
iab portugu6es português
iab potuguês português
iab precisan precisam
iab própio próprio
iab quado quando
iab quiz quis
iab recizão rescisão
iab sanque sangue
iab sao são
iab sen sem
iab sensivel sensível
iab sequéncia seqüência
iab significatimente significativam
iab sinceranete sinceramente
iab sovre sobre
iab susseder suceder
iab tanbem também
iab testo texto
iab téxtil têxtil
iab tydo tudo
iab una uma
iab unico único
iab utilise utilize
iab vega veja
iab vivaotux http://vivaotux.blogspot.com
iab vja veja
iab voc6e você
iab wue que
iab xave chave
iab 1a. 1ª
iab 2a. 2ª
iab 3a. 3ª
iab 4a. 4ª
iab 5a. 5ª
iab 6a. 6ª
iab 7a. 7ª
iab 8a. 8ª
iab 9a. 9ª
iab 10a. 10ª
iab 11a. 11ª
iab 12a. 12ª
iab 13a. 13ª
iab 14a. 14ª
iab 15a. 15ª
" caso o teclado esteja desconfigurado use:
"iab 'a á
"iab 'A Á
"iab 'e é
"iab 'E É
"iab 'i í
"iab 'I Í
"iab 'o ó
"iab 'O Ó
"iab ~a ã
"iab ~A Ã
"iab ^a â
"iab ^A Â
"iab `a à
"iab `A À
"iab ,c ç
"iab ,C Ç
"iab ^e ê
"iab ^E Ê
"iab ^o ô
"iab ^O Ô
"iab ~o õ
"iab ~O Õ
"iab 'u ú
"iab 'U Ú
"autocmd BufEnter * lcd %:p:h
autocmd BufReadPost *
\ if line("'\"") > 0 && line("'\"") <= line("$") |
\ exe "normal g`\"" |
\ endif
" autocomandos para python
autocmd BufRead *.py set smartindent cinwords=if,elif,else,for,while,try,except,finally,def,class
im :<CR> :<CR><TAB>
augroup html
" au! <--> Remove all html autocommands
au!
au BufNewFile,BufRead *.html,*.shtml,*.htm set ft=html
"au BufNewFile,BufRead,BufEnter *.html,*.shtml,*.htm so ~/.vim/skel/skel.html
au BufNewFile *.html 0r ~/.vim/skel/skel.html
"au BufNewFile *.html,*.shtml,*.htm /body/+
au BufNewFile,BufRead *.html,*.shtml,*.htm set noautoindent
au BufNewFile,BufRead *.html,*.shtml,*.htm set nolist
augroup end
map <M-right> :wn<cr>
map <M-left> :wp<cr>
"
" (window)Define o número de linhas deslocadas com os comandos
" ^B (Ctrl+B) e ^F (Ctrl+F)
setlocal window=5
"
" fazer rolagem no documento
" tem que estar em modo normal!
map <C-Down> <c-d>
map <C-Up> <c-u>
"
" define a cor para o menu contextual dos complementos
highlight Pmenu ctermbg=13 guibg=Gray
highlight PmenuSel ctermbg=7 guibg=DarkBlue guifg=White
highlight PmenuSbar ctermbg=7 guibg=DarkGray
highlight PmenuThumb guibg=Black
"
" MinusculasMaiusculas: converte a primeira letra de cada frase p/MAIUSCULAS
map ,mm :set noic<cr>
\:%s/\(\(\([.!?]\s*\\|^\s*\)\n^\\|[.?!-] \)\s*"\?\s*\)\([a-zàáéóú]\)/\1\U\4/g<cr>
"
" Coloca em maiúsculo a primeira letra de cada sentença
map ,u :%s/\([.!?]\)\(\_s\+\)\(\a\)/\1\2\U\3/g<cr>
"
" um destaque especial para MinhasNotas
highlight MinhasNotas ctermbg=Yellow ctermfg=red guibg=Yellow guifg=red
match MinhasNotas /Nota:/
"
"Auto formatação para parágrafos
map <F8> gqap
"
" mapeamento para abrir e fechar folders em modo normal usando
" a barra de espaços -- zR abre todos os folders
nnoremap <space> @=((foldclosed(line('.')) < 0) ? 'zc' : 'zo')<CR>
"
" o mapeamento abaixo coloca e retira a numeração
" o sistema alterna a numeração para ativa ou desativada
map <F11> <esc>:set invnu<cr>
map <S-F12> <esc>:dig<cr> " mostra os digrafos do tipo Word®
" for txt, autoformat and wrap text at 70 chars.
autocmd BufNewFile,BufRead *.txt set wrapmargin=70 textwidth=70
map <BS> X
" vim:foldmethod=marker:tw=78:ts=3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment