snipt

Ctrl+h for KB shortcuts

VimL

configure vim file

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
" Arquivo de configuração do vim
" vim:nolist:enc=utf-8: 
" Criado: Qua 02/Ago/2006 hs 09:19
" Last Change: Qua 30 Jun 2010 17:10:32 BRT
" Autor: Sergio Luiz Araujo Silva
" Codificação: utf-8
" Download: http://dotfiles.org/~voyeg3r/.vimrc
" 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       |
"   +======================================+
"
"   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/
"
" let s:wordUnderCursor = expand("<cword>")
" :%s/expand("<cword>")//gn"}}}
"
if v:lang =~ "utf8$" || v:lang =~ "UTF-8$"
   set fileencodings=utf-8,latin1
endif

" Settings for :TOhtml
let html_number_lines=1
let html_use_css=1
let use_xhtml=1

map ,f <esc>:FuzzyFinderFile<cr>
map ,b <esc>:FuzzyFinderBookmark<cr>
map ,a <esc>:FuzzyFinderAddBookmark<cr>
map ,d <esc>:FuzzyFinderDir<cr>
map ,m <esc>:FuzzyFinderMruFile<cr>

nmap ,i [I:let nr = input("Which one: ")<Bar>exe "normal " . nr ."[\t"<CR>

amenu &Projetos.toggle <Plug>ToggleProject<cr>

" --------------------
" Project
" --------------------
"map <A-S-p> :Project<CR>
"map <A-S-o> :Project<CR>:redraw<CR>/
"nmap <silent> <F3> <Plug>ToggleProject
let g:proj_window_width = 30
let g:proj_window_increment = 50
" habilitar e desabilitar o plugin
nmap <silent> ,p <Plug>ToggleProject<cr>

" mapeamento para mostrar linhas que contenhasm determinada palavra
map ,/ [I:let nr = input("Which one: ")<Bar>exe "normal " . nr ."[\t"<CR>

" mapeamento para mostrar linhas duplicadas
map ,sd <esc>:g/^\(.*\)\n\ze\%(.*\n\)*\1$/#<cr>

" para que as modelines funcionem com file encoding
au BufReadPost * let b:reloadcheck = 1
au BufWinEnter * if exists('b:reloadcheck') | unlet b:reloadcheck | if &mod != 0 && &fenc != "" | exe 'e! ++enc=' . &fenc | endif | endif

" contagem de ocorrências de uma palavra (case insensitive)
nmap <F4> <esc>mz:%s/\c\<\(<c-r>=expand("<cword>")<cr>\)\>//gn<cr>`z
nmap <s-F4> <esc>mz:%s/\c\(<c-r>=expand("<cword>")<cr>\)//gn<cr>`z

" mapeamento para o wikispaces
" https://addons.mozilla.org/pt-BR/firefox/addon/4125
imap ,w [[code format=""]]<enter><+conteudo+><enter>[[code]]<esc><right>D<esc>kkf"a
nmap ,w [[code format=""]]<enter><+conteudo+><enter>[[code]]<esc><right>D<esc>kkf"a

" mapeamento para colocar palavra sob o cursor na substituição
nnoremap <Leader>s :%s/\<<C-r><C-w>\>/

" 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+>")
    call append(4, "site: <+digite o endereço de seu site+>")
    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

au! VimEnter *  match ErrorMsg /^\t\+/
au! VimEnter *  match ErrorMsg /
$/

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

" calculadora científica usando python
:command! -nargs=+ Calc :py print <args>
:py from math import *
map ,c :Calc 

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/.*python" | silent execute "!chmod u+x %" | endif

filetype on
filetype plugin on
set ofu=syntaxcomplete#Complete

"# omini completion for python
autocmd FileType python set omnifunc=pythoncomplete#Complete
autocmd FileType javascript set omnifunc=javascriptcomplete#CompleteJS
autocmd FileType html set omnifunc=htmlcomplete#CompleteTags
autocmd FileType css set omnifunc=csscomplete#CompleteCSS
autocmd FileType xml set omnifunc=xmlcomplete#CompleteTags
autocmd FileType php set omnifunc=phpcomplete#CompletePHP
autocmd FileType c set omnifunc=ccomplete#Complete

if has("autocmd")
autocmd FileType php  set complete-=k/home/USUARIO/.vim/doc/funclist.txt complete+=k/home/USUARIO/.vim/doc/funclist.txt
endif

" adiciona omnifunc para demais formatos
if has("autocmd") && exists("+omnifunc")
  autocmd Filetype *
    \   if &omnifunc == "" |
    \   setlocal omnifunc=syntaxcomplete#Complete |
    \ endif
endif

" Like bufdo but restore the current buffer.
function! BufDo(command)
  let currBuff=bufnr("%")
  execute 'bufdo ' . a:command
  execute 'buffer ' . currBuff
endfunction
com! -nargs=+ -complete=command Bufdo call BufDo(<q-args>)

"numerar linhas - use o plugin nlist que está instalado ou instale via web
" instalei o plugin nlist para numerar linhas por isso comentei este trecho
"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

" advanced incrementing (really useful)
" put following in _vimrc
let g:I=0
function! INC(increment)
    let g:I =g:I + a:increment
    return g:I
endfunction
" eg create list starting from 223 incrementing by 5 between markers a,b
":let I=223
":'a,'bs/^/\=INC(5)/
" create a map for INC
"cab viminc :let I=223 \| 'a,'bs/$/\=INC(5)/

" 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 listchars=tab:\|\ ,extends:>,precedes:<,trail:-,nbsp:%
" set foldcolumn=2  --> exibe um sinal de mais ao lado dos folder

" ao rolar a janelas ele manterá uma linha a mais 
" visível na tela, faça um experimento
" ele manterá as linhas próximas visíveis
set scrolloff=2

nnoremap <leader>w :set wrap! wrap?<cr>
" mostra +++ no começo de linhas longas sem wrap
set showbreak=+++
nnoremap <leader>l :set list! list?<cr>

":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= str2nr(strftime("%H"))
if 0 <= hr && hr <= 3
    colors ir_black
elseif 4 <= hr && hr <= 7
    colors tango-morning
elseif 8 <= hr && hr <= 14
    colors mustang
elseif 15 <= hr && hr <= 20
    colors digerati
else
    colors digerati
endif

function! <SID>SwitchColorSchemes()
	 if exists("g:colors_name")
		  if g:colors_name == 'google'
				colorscheme xoria256
		  elseif g:colors_name == 'xoria256'
				colorscheme darkbone
		  elseif g:colors_name == 'darkbone'
				colorscheme colorful
		  elseif g:colors_name == 'colorful'
				colorscheme zenburn
		  elseif g:colors_name == 'zenburn'
				colorscheme python
		  elseif g:colors_name == 'python'
				colorscheme tango-morning
		  elseif g:colors_name == 'tango-morning'
				colorscheme guepardo
		  elseif g:colors_name == 'guepardo'
				colorscheme rubyblue
		  elseif g:colors_name == 'rubyblue'
				colorscheme pacific
		  elseif g:colors_name == 'pacific'
				colorscheme tango
		  elseif g:colors_name == 'tango'
				colorscheme softblue
		  elseif g:colors_name == 'softblue'
				colorscheme vividchalk
		  elseif g:colors_name == 'vividchalk'
				colorscheme professional
		  elseif g:colors_name == 'professional'
				colorscheme neverness
		  elseif g:colors_name == 'neverness'
				colorscheme mustang
		  elseif g:colors_name == 'mustang'
				colorscheme underwater-mod
		  elseif g:colors_name == 'underwater-mod'
				colorscheme whitebox
		  elseif g:colors_name == 'whitebox'
				colorscheme summerfruit
		  elseif g:colors_name == 'summerfruit'
				colorscheme maroloccio
		  elseif g:colors_name == 'maroloccio'
				colorscheme wombat
		  elseif g:colors_name == 'wombat'
				colorscheme chrysoprase
		  elseif g:colors_name == 'chrysoprase'
				colorscheme quagmire
		  elseif g:colors_name == 'quagmire'
				colorscheme digerati
		  elseif g:colors_name == 'digerati'
				colorscheme vylight
		  elseif g:colors_name == 'vylight'
				colorscheme vitamins
		  elseif g:colors_name == 'vitamins'
				colorscheme rdark
		  elseif g:colors_name == 'rdark'
				colorscheme eclm_wombat
		  elseif g:colors_name == 'eclm_wombat'
				colorscheme native
		  elseif g:colors_name == 'native'
				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> :set t_Co=256 <BAR> :echo g:colors_name<cr>
map <silent> <F6> <esc>:call <SID>SwitchColorSchemes()<CR><bar>:echo g:colors_name<cr>

set anti gfn=Inconsolata\ 12,\ Envy\ Code\ R\ 10
"set anti gfn=BPmono\ 11
"set anti gfn=Inconsolata\ 13
"set anti gfn=Pragmata\ 10,Monaco\ 9,\ 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 et
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
set smartcase  "Se começar uma busca em maiúsculo ele habilita o case
set expandtab
set smarttab
set noerrorbells
set visualbell
set nu ai sm js
set showcmd showmode
"set showmatch
set ruler
set hls 
set ts=4
set backup
set backupdir=~/.backup,~/tmp,.,/tmp
set backupext=.backup
set mousemodel=popup
set mouse=nvc
set ttyfast

" 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

"validador de e-mail (observe que estou buscando no começo da linha)
" ^\<[^ @][A-Za-z0-9_.-]\[email protected]\([A-Za-z0-9_-]\+\.\)\+[A-Za-z]\{2,4}\>\(?[A-Za-z0-9%&=+.,@*_-]\+\)\=

map ,d <esc>my:%s/\(^\n\{2,}\)/\r/g<cr>`y
nno <S-F11> <esc>:set hls! hls?<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

" o atalho <leader>m já está mapeado para FuzzyFinderMruFile
"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

" snippets
let g:snips_author = 'Sérgio Luiz Araújo Silva'
" para exibir os snippets disponíveis (inserção) <c-r><tab> 

"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

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

let g:AutoComplPop_CompleteoptPreview = 1
"mapeia para completar comandos e busca com tab
"cmap <tab> <Plug>CmdlineCompleteForward

"Fechamento automático de parênteses, chaves e colchetes
imap { {}<left>
imap ( ()<left>
imap [ []<left>
" pular fora dos parênteses, colchetes e chaves, mover o cursor
" no modo de inserção
imap <c-l> <Esc><right>a

"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>

" pydiction
"if has("autocmd")
"    autocmd FileType python set complete+=k/.vim/dict/pydiction isk+=.,(
"endif " has("autocmd") 

"let g:pydiction_location = 'vimfiles/ftplugin/pydiction/complete-dict' 
let g:pydiction_location = '~/.vim/after/ftplugin/pydiction/complete-dict'

"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   " usando <c-i> ativa spell
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\")))}%=\ 
     \#%n\ \
     \LIN:%04l\ COL:%04v\ 
     \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 <[email protected]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 haiab hezitação hesitação
iab hezitar hesitar
iab http:\\ http:
iab iigor igor
iab interesado interessado
iab interese interesse
iab Irria Iria
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 Ú

if exists('+autochdir')
  set autochdir
else
  autocmd BufEnter * silent! lcd %:p:h:gs/ /\\ /
endif
"autocmd BufEnter * lcd %:p:h

autocmd BufReadPost *
  \ if line("'\"") > 0 && line("'\"") <= line("$") |
  \   exe "normal g`\"" |
  \ endif

" autocomandos para python
augroup python
    au! BufRead *.py set smartindent cinwords=if,elif,else,for,while,try,except,finally,def,class
    au! BufRead,Bufnewfile *.py im :<CR> :<CR><TAB>
    "autocmd FileType python set textwidth=79
    autocmd FileType python filetype indent on
    let python_highlight_all=1
    let python_highlight_builtins=0
    let python_highlight_builtins=1
    let python_highlight_exceptions=1
    let python_highlight_numbers=1
    let python_highlight_space_errors=1
augroup end

" setando o path do python
python << EOF
import os
import sys
import vim
for p in sys.path:
	# Add each directory in sys.path, if it exists.
	if os.path.isdir(p):
		# Command 'set' needs backslash before each space.
		vim.command(r"set path+=%s" % (p.replace(" ", r"\ ")))
EOF
" fim da seção do path do python 

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>

" carregamento do plugin closetag
au Filetype html,xml,xsl source ~/.vim/plugin/closetag.vim

augroup css
    au Bufnewfile,BufRead *.css set ft=css
    au BufNewFile *.css 0r ~/.vim/skel/template.css
    "autocmd FileType css set omnifunc=csscomplete#CompleteCSS
augroup end

" (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 /[Nn]otas\?:\?/
"

"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>
"nmap <space> :

" 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
https://snipt.net/embed/cbb76403519671c113e8e901cffef49b/
/raw/cbb76403519671c113e8e901cffef49b/
cbb76403519671c113e8e901cffef49b
vim
VimL
910
2019-06-25T20:03:15
True
False
False
/api/public/snipt/16813/
configure-vim-file
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1"> 1</a> <a href="#L-2"> 2</a> <a href="#L-3"> 3</a> <a href="#L-4"> 4</a> <a href="#L-5"> 5</a> <a href="#L-6"> 6</a> <a href="#L-7"> 7</a> <a href="#L-8"> 8</a> <a href="#L-9"> 9</a> <a href="#L-10"> 10</a> <a href="#L-11"> 11</a> <a href="#L-12"> 12</a> <a href="#L-13"> 13</a> <a href="#L-14"> 14</a> <a href="#L-15"> 15</a> <a href="#L-16"> 16</a> <a href="#L-17"> 17</a> <a href="#L-18"> 18</a> <a href="#L-19"> 19</a> <a href="#L-20"> 20</a> <a href="#L-21"> 21</a> <a href="#L-22"> 22</a> <a href="#L-23"> 23</a> <a href="#L-24"> 24</a> <a href="#L-25"> 25</a> <a href="#L-26"> 26</a> <a href="#L-27"> 27</a> <a href="#L-28"> 28</a> <a href="#L-29"> 29</a> <a href="#L-30"> 30</a> <a href="#L-31"> 31</a> <a href="#L-32"> 32</a> <a href="#L-33"> 33</a> <a href="#L-34"> 34</a> <a href="#L-35"> 35</a> <a href="#L-36"> 36</a> <a href="#L-37"> 37</a> <a href="#L-38"> 38</a> <a href="#L-39"> 39</a> <a href="#L-40"> 40</a> <a href="#L-41"> 41</a> <a href="#L-42"> 42</a> <a href="#L-43"> 43</a> <a href="#L-44"> 44</a> <a href="#L-45"> 45</a> <a href="#L-46"> 46</a> <a href="#L-47"> 47</a> <a href="#L-48"> 48</a> <a href="#L-49"> 49</a> <a href="#L-50"> 50</a> <a href="#L-51"> 51</a> <a href="#L-52"> 52</a> <a href="#L-53"> 53</a> <a href="#L-54"> 54</a> <a href="#L-55"> 55</a> <a href="#L-56"> 56</a> <a href="#L-57"> 57</a> <a href="#L-58"> 58</a> <a href="#L-59"> 59</a> <a href="#L-60"> 60</a> <a href="#L-61"> 61</a> <a href="#L-62"> 62</a> <a href="#L-63"> 63</a> <a href="#L-64"> 64</a> <a href="#L-65"> 65</a> <a href="#L-66"> 66</a> <a href="#L-67"> 67</a> <a href="#L-68"> 68</a> <a href="#L-69"> 69</a> <a href="#L-70"> 70</a> <a href="#L-71"> 71</a> <a href="#L-72"> 72</a> <a href="#L-73"> 73</a> <a href="#L-74"> 74</a> <a href="#L-75"> 75</a> <a href="#L-76"> 76</a> <a href="#L-77"> 77</a> <a href="#L-78"> 78</a> <a href="#L-79"> 79</a> <a href="#L-80"> 80</a> <a href="#L-81"> 81</a> <a href="#L-82"> 82</a> <a href="#L-83"> 83</a> <a href="#L-84"> 84</a> <a href="#L-85"> 85</a> <a href="#L-86"> 86</a> <a href="#L-87"> 87</a> <a href="#L-88"> 88</a> <a href="#L-89"> 89</a> <a href="#L-90"> 90</a> <a href="#L-91"> 91</a> <a href="#L-92"> 92</a> <a href="#L-93"> 93</a> <a href="#L-94"> 94</a> <a href="#L-95"> 95</a> <a href="#L-96"> 96</a> <a href="#L-97"> 97</a> <a href="#L-98"> 98</a> <a href="#L-99"> 99</a> <a href="#L-100">100</a> <a href="#L-101">101</a> <a href="#L-102">102</a> <a href="#L-103">103</a> <a href="#L-104">104</a> <a href="#L-105">105</a> <a href="#L-106">106</a> <a href="#L-107">107</a> <a href="#L-108">108</a> <a href="#L-109">109</a> <a href="#L-110">110</a> <a href="#L-111">111</a> <a href="#L-112">112</a> <a href="#L-113">113</a> <a href="#L-114">114</a> <a href="#L-115">115</a> <a href="#L-116">116</a> <a href="#L-117">117</a> <a href="#L-118">118</a> <a href="#L-119">119</a> <a href="#L-120">120</a> <a href="#L-121">121</a> <a href="#L-122">122</a> <a href="#L-123">123</a> <a href="#L-124">124</a> <a href="#L-125">125</a> <a href="#L-126">126</a> <a href="#L-127">127</a> <a href="#L-128">128</a> <a href="#L-129">129</a> <a href="#L-130">130</a> <a href="#L-131">131</a> <a href="#L-132">132</a> <a href="#L-133">133</a> <a href="#L-134">134</a> <a href="#L-135">135</a> <a href="#L-136">136</a> <a href="#L-137">137</a> <a href="#L-138">138</a> <a href="#L-139">139</a> <a href="#L-140">140</a> <a href="#L-141">141</a> <a href="#L-142">142</a> <a href="#L-143">143</a> <a href="#L-144">144</a> <a href="#L-145">145</a> <a href="#L-146">146</a> <a href="#L-147">147</a> <a href="#L-148">148</a> <a href="#L-149">149</a> <a href="#L-150">150</a> <a href="#L-151">151</a> <a href="#L-152">152</a> <a href="#L-153">153</a> <a href="#L-154">154</a> <a href="#L-155">155</a> <a href="#L-156">156</a> <a href="#L-157">157</a> <a href="#L-158">158</a> <a href="#L-159">159</a> <a href="#L-160">160</a> <a href="#L-161">161</a> <a href="#L-162">162</a> <a href="#L-163">163</a> <a href="#L-164">164</a> <a href="#L-165">165</a> <a href="#L-166">166</a> <a href="#L-167">167</a> <a href="#L-168">168</a> <a href="#L-169">169</a> <a href="#L-170">170</a> <a href="#L-171">171</a> <a href="#L-172">172</a> <a href="#L-173">173</a> <a href="#L-174">174</a> <a href="#L-175">175</a> <a href="#L-176">176</a> <a href="#L-177">177</a> <a href="#L-178">178</a> <a href="#L-179">179</a> <a href="#L-180">180</a> <a href="#L-181">181</a> <a href="#L-182">182</a> <a href="#L-183">183</a> <a href="#L-184">184</a> <a href="#L-185">185</a> <a href="#L-186">186</a> <a href="#L-187">187</a> <a href="#L-188">188</a> <a href="#L-189">189</a> <a href="#L-190">190</a> <a href="#L-191">191</a> <a href="#L-192">192</a> <a href="#L-193">193</a> <a href="#L-194">194</a> <a href="#L-195">195</a> <a href="#L-196">196</a> <a href="#L-197">197</a> <a href="#L-198">198</a> <a href="#L-199">199</a> <a href="#L-200">200</a> <a href="#L-201">201</a> <a href="#L-202">202</a> <a href="#L-203">203</a> <a href="#L-204">204</a> <a href="#L-205">205</a> <a href="#L-206">206</a> <a href="#L-207">207</a> <a href="#L-208">208</a> <a href="#L-209">209</a> <a href="#L-210">210</a> <a href="#L-211">211</a> <a href="#L-212">212</a> <a href="#L-213">213</a> <a href="#L-214">214</a> <a href="#L-215">215</a> <a href="#L-216">216</a> <a href="#L-217">217</a> <a href="#L-218">218</a> <a href="#L-219">219</a> <a href="#L-220">220</a> <a href="#L-221">221</a> <a href="#L-222">222</a> <a href="#L-223">223</a> <a href="#L-224">224</a> <a href="#L-225">225</a> <a href="#L-226">226</a> <a href="#L-227">227</a> <a href="#L-228">228</a> <a href="#L-229">229</a> <a href="#L-230">230</a> <a href="#L-231">231</a> <a href="#L-232">232</a> <a href="#L-233">233</a> <a href="#L-234">234</a> <a href="#L-235">235</a> <a href="#L-236">236</a> <a href="#L-237">237</a> <a href="#L-238">238</a> <a href="#L-239">239</a> <a href="#L-240">240</a> <a href="#L-241">241</a> <a href="#L-242">242</a> <a href="#L-243">243</a> <a href="#L-244">244</a> <a href="#L-245">245</a> <a href="#L-246">246</a> <a href="#L-247">247</a> <a href="#L-248">248</a> <a href="#L-249">249</a> <a href="#L-250">250</a> <a href="#L-251">251</a> <a href="#L-252">252</a> <a href="#L-253">253</a> <a href="#L-254">254</a> <a href="#L-255">255</a> <a href="#L-256">256</a> <a href="#L-257">257</a> <a href="#L-258">258</a> <a href="#L-259">259</a> <a href="#L-260">260</a> <a href="#L-261">261</a> <a href="#L-262">262</a> <a href="#L-263">263</a> <a href="#L-264">264</a> <a href="#L-265">265</a> <a href="#L-266">266</a> <a href="#L-267">267</a> <a href="#L-268">268</a> <a href="#L-269">269</a> <a href="#L-270">270</a> <a href="#L-271">271</a> <a href="#L-272">272</a> <a href="#L-273">273</a> <a href="#L-274">274</a> <a href="#L-275">275</a> <a href="#L-276">276</a> <a href="#L-277">277</a> <a href="#L-278">278</a> <a href="#L-279">279</a> <a href="#L-280">280</a> <a href="#L-281">281</a> <a href="#L-282">282</a> <a href="#L-283">283</a> <a href="#L-284">284</a> <a href="#L-285">285</a> <a href="#L-286">286</a> <a href="#L-287">287</a> <a href="#L-288">288</a> <a href="#L-289">289</a> <a href="#L-290">290</a> <a href="#L-291">291</a> <a href="#L-292">292</a> <a href="#L-293">293</a> <a href="#L-294">294</a> <a href="#L-295">295</a> <a href="#L-296">296</a> <a href="#L-297">297</a> <a href="#L-298">298</a> <a href="#L-299">299</a> <a href="#L-300">300</a> <a href="#L-301">301</a> <a href="#L-302">302</a> <a href="#L-303">303</a> <a href="#L-304">304</a> <a href="#L-305">305</a> <a href="#L-306">306</a> <a href="#L-307">307</a> <a href="#L-308">308</a> <a href="#L-309">309</a> <a href="#L-310">310</a> <a href="#L-311">311</a> <a href="#L-312">312</a> <a href="#L-313">313</a> <a href="#L-314">314</a> <a href="#L-315">315</a> <a href="#L-316">316</a> <a href="#L-317">317</a> <a href="#L-318">318</a> <a href="#L-319">319</a> <a href="#L-320">320</a> <a href="#L-321">321</a> <a href="#L-322">322</a> <a href="#L-323">323</a> <a href="#L-324">324</a> <a href="#L-325">325</a> <a href="#L-326">326</a> <a href="#L-327">327</a> <a href="#L-328">328</a> <a href="#L-329">329</a> <a href="#L-330">330</a> <a href="#L-331">331</a> <a href="#L-332">332</a> <a href="#L-333">333</a> <a href="#L-334">334</a> <a href="#L-335">335</a> <a href="#L-336">336</a> <a href="#L-337">337</a> <a href="#L-338">338</a> <a href="#L-339">339</a> <a href="#L-340">340</a> <a href="#L-341">341</a> <a href="#L-342">342</a> <a href="#L-343">343</a> <a href="#L-344">344</a> <a href="#L-345">345</a> <a href="#L-346">346</a> <a href="#L-347">347</a> <a href="#L-348">348</a> <a href="#L-349">349</a> <a href="#L-350">350</a> <a href="#L-351">351</a> <a href="#L-352">352</a> <a href="#L-353">353</a> <a href="#L-354">354</a> <a href="#L-355">355</a> <a href="#L-356">356</a> <a href="#L-357">357</a> <a href="#L-358">358</a> <a href="#L-359">359</a> <a href="#L-360">360</a> <a href="#L-361">361</a> <a href="#L-362">362</a> <a href="#L-363">363</a> <a href="#L-364">364</a> <a href="#L-365">365</a> <a href="#L-366">366</a> <a href="#L-367">367</a> <a href="#L-368">368</a> <a href="#L-369">369</a> <a href="#L-370">370</a> <a href="#L-371">371</a> <a href="#L-372">372</a> <a href="#L-373">373</a> <a href="#L-374">374</a> <a href="#L-375">375</a> <a href="#L-376">376</a> <a href="#L-377">377</a> <a href="#L-378">378</a> <a href="#L-379">379</a> <a href="#L-380">380</a> <a href="#L-381">381</a> <a href="#L-382">382</a> <a href="#L-383">383</a> <a href="#L-384">384</a> <a href="#L-385">385</a> <a href="#L-386">386</a> <a href="#L-387">387</a> <a href="#L-388">388</a> <a href="#L-389">389</a> <a href="#L-390">390</a> <a href="#L-391">391</a> <a href="#L-392">392</a> <a href="#L-393">393</a> <a href="#L-394">394</a> <a href="#L-395">395</a> <a href="#L-396">396</a> <a href="#L-397">397</a> <a href="#L-398">398</a> <a href="#L-399">399</a> <a href="#L-400">400</a> <a href="#L-401">401</a> <a href="#L-402">402</a> <a href="#L-403">403</a> <a href="#L-404">404</a> <a href="#L-405">405</a> <a href="#L-406">406</a> <a href="#L-407">407</a> <a href="#L-408">408</a> <a href="#L-409">409</a> <a href="#L-410">410</a> <a href="#L-411">411</a> <a href="#L-412">412</a> <a href="#L-413">413</a> <a href="#L-414">414</a> <a href="#L-415">415</a> <a href="#L-416">416</a> <a href="#L-417">417</a> <a href="#L-418">418</a> <a href="#L-419">419</a> <a href="#L-420">420</a> <a href="#L-421">421</a> <a href="#L-422">422</a> <a href="#L-423">423</a> <a href="#L-424">424</a> <a href="#L-425">425</a> <a href="#L-426">426</a> <a href="#L-427">427</a> <a href="#L-428">428</a> <a href="#L-429">429</a> <a href="#L-430">430</a> <a href="#L-431">431</a> <a href="#L-432">432</a> <a href="#L-433">433</a> <a href="#L-434">434</a> <a href="#L-435">435</a> <a href="#L-436">436</a> <a href="#L-437">437</a> <a href="#L-438">438</a> <a href="#L-439">439</a> <a href="#L-440">440</a> <a href="#L-441">441</a> <a href="#L-442">442</a> <a href="#L-443">443</a> <a href="#L-444">444</a> <a href="#L-445">445</a> <a href="#L-446">446</a> <a href="#L-447">447</a> <a href="#L-448">448</a> <a href="#L-449">449</a> <a href="#L-450">450</a> <a href="#L-451">451</a> <a href="#L-452">452</a> <a href="#L-453">453</a> <a href="#L-454">454</a> <a href="#L-455">455</a> <a href="#L-456">456</a> <a href="#L-457">457</a> <a href="#L-458">458</a> <a href="#L-459">459</a> <a href="#L-460">460</a> <a href="#L-461">461</a> <a href="#L-462">462</a> <a href="#L-463">463</a> <a href="#L-464">464</a> <a href="#L-465">465</a> <a href="#L-466">466</a> <a href="#L-467">467</a> <a href="#L-468">468</a> <a href="#L-469">469</a> <a href="#L-470">470</a> <a href="#L-471">471</a> <a href="#L-472">472</a> <a href="#L-473">473</a> <a href="#L-474">474</a> <a href="#L-475">475</a> <a href="#L-476">476</a> <a href="#L-477">477</a> <a href="#L-478">478</a> <a href="#L-479">479</a> <a href="#L-480">480</a> <a href="#L-481">481</a> <a href="#L-482">482</a> <a href="#L-483">483</a> <a href="#L-484">484</a> <a href="#L-485">485</a> <a href="#L-486">486</a> <a href="#L-487">487</a> <a href="#L-488">488</a> <a href="#L-489">489</a> <a href="#L-490">490</a> <a href="#L-491">491</a> <a href="#L-492">492</a> <a href="#L-493">493</a> <a href="#L-494">494</a> <a href="#L-495">495</a> <a href="#L-496">496</a> <a href="#L-497">497</a> <a href="#L-498">498</a> <a href="#L-499">499</a> <a href="#L-500">500</a> <a href="#L-501">501</a> <a href="#L-502">502</a> <a href="#L-503">503</a> <a href="#L-504">504</a> <a href="#L-505">505</a> <a href="#L-506">506</a> <a href="#L-507">507</a> <a href="#L-508">508</a> <a href="#L-509">509</a> <a href="#L-510">510</a> <a href="#L-511">511</a> <a href="#L-512">512</a> <a href="#L-513">513</a> <a href="#L-514">514</a> <a href="#L-515">515</a> <a href="#L-516">516</a> <a href="#L-517">517</a> <a href="#L-518">518</a> <a href="#L-519">519</a> <a href="#L-520">520</a> <a href="#L-521">521</a> <a href="#L-522">522</a> <a href="#L-523">523</a> <a href="#L-524">524</a> <a href="#L-525">525</a> <a href="#L-526">526</a> <a href="#L-527">527</a> <a href="#L-528">528</a> <a href="#L-529">529</a> <a href="#L-530">530</a> <a href="#L-531">531</a> <a href="#L-532">532</a> <a href="#L-533">533</a> <a href="#L-534">534</a> <a href="#L-535">535</a> <a href="#L-536">536</a> <a href="#L-537">537</a> <a href="#L-538">538</a> <a href="#L-539">539</a> <a href="#L-540">540</a> <a href="#L-541">541</a> <a href="#L-542">542</a> <a href="#L-543">543</a> <a href="#L-544">544</a> <a href="#L-545">545</a> <a href="#L-546">546</a> <a href="#L-547">547</a> <a href="#L-548">548</a> <a href="#L-549">549</a> <a href="#L-550">550</a> <a href="#L-551">551</a> <a href="#L-552">552</a> <a href="#L-553">553</a> <a href="#L-554">554</a> <a href="#L-555">555</a> <a href="#L-556">556</a> <a href="#L-557">557</a> <a href="#L-558">558</a> <a href="#L-559">559</a> <a href="#L-560">560</a> <a href="#L-561">561</a> <a href="#L-562">562</a> <a href="#L-563">563</a> <a href="#L-564">564</a> <a href="#L-565">565</a> <a href="#L-566">566</a> <a href="#L-567">567</a> <a href="#L-568">568</a> <a href="#L-569">569</a> <a href="#L-570">570</a> <a href="#L-571">571</a> <a href="#L-572">572</a> <a href="#L-573">573</a> <a href="#L-574">574</a> <a href="#L-575">575</a> <a href="#L-576">576</a> <a href="#L-577">577</a> <a href="#L-578">578</a> <a href="#L-579">579</a> <a href="#L-580">580</a> <a href="#L-581">581</a> <a href="#L-582">582</a> <a href="#L-583">583</a> <a href="#L-584">584</a> <a href="#L-585">585</a> <a href="#L-586">586</a> <a href="#L-587">587</a> <a href="#L-588">588</a> <a href="#L-589">589</a> <a href="#L-590">590</a> <a href="#L-591">591</a> <a href="#L-592">592</a> <a href="#L-593">593</a> <a href="#L-594">594</a> <a href="#L-595">595</a> <a href="#L-596">596</a> <a href="#L-597">597</a> <a href="#L-598">598</a> <a href="#L-599">599</a> <a href="#L-600">600</a> <a href="#L-601">601</a> <a href="#L-602">602</a> <a href="#L-603">603</a> <a href="#L-604">604</a> <a href="#L-605">605</a> <a href="#L-606">606</a> <a href="#L-607">607</a> <a href="#L-608">608</a> <a href="#L-609">609</a> <a href="#L-610">610</a> <a href="#L-611">611</a> <a href="#L-612">612</a> <a href="#L-613">613</a> <a href="#L-614">614</a> <a href="#L-615">615</a> <a href="#L-616">616</a> <a href="#L-617">617</a> <a href="#L-618">618</a> <a href="#L-619">619</a> <a href="#L-620">620</a> <a href="#L-621">621</a> <a href="#L-622">622</a> <a href="#L-623">623</a> <a href="#L-624">624</a> <a href="#L-625">625</a> <a href="#L-626">626</a> <a href="#L-627">627</a> <a href="#L-628">628</a> <a href="#L-629">629</a> <a href="#L-630">630</a> <a href="#L-631">631</a> <a href="#L-632">632</a> <a href="#L-633">633</a> <a href="#L-634">634</a> <a href="#L-635">635</a> <a href="#L-636">636</a> <a href="#L-637">637</a> <a href="#L-638">638</a> <a href="#L-639">639</a> <a href="#L-640">640</a> <a href="#L-641">641</a> <a href="#L-642">642</a> <a href="#L-643">643</a> <a href="#L-644">644</a> <a href="#L-645">645</a> <a href="#L-646">646</a> <a href="#L-647">647</a> <a href="#L-648">648</a> <a href="#L-649">649</a> <a href="#L-650">650</a> <a href="#L-651">651</a> <a href="#L-652">652</a> <a href="#L-653">653</a> <a href="#L-654">654</a> <a href="#L-655">655</a> <a href="#L-656">656</a> <a href="#L-657">657</a> <a href="#L-658">658</a> <a href="#L-659">659</a> <a href="#L-660">660</a> <a href="#L-661">661</a> <a href="#L-662">662</a> <a href="#L-663">663</a> <a href="#L-664">664</a> <a href="#L-665">665</a> <a href="#L-666">666</a> <a href="#L-667">667</a> <a href="#L-668">668</a> <a href="#L-669">669</a> <a href="#L-670">670</a> <a href="#L-671">671</a> <a href="#L-672">672</a> <a href="#L-673">673</a> <a href="#L-674">674</a> <a href="#L-675">675</a> <a href="#L-676">676</a> <a href="#L-677">677</a> <a href="#L-678">678</a> <a href="#L-679">679</a> <a href="#L-680">680</a> <a href="#L-681">681</a> <a href="#L-682">682</a> <a href="#L-683">683</a> <a href="#L-684">684</a> <a href="#L-685">685</a> <a href="#L-686">686</a> <a href="#L-687">687</a> <a href="#L-688">688</a> <a href="#L-689">689</a> <a href="#L-690">690</a> <a href="#L-691">691</a> <a href="#L-692">692</a> <a href="#L-693">693</a> <a href="#L-694">694</a> <a href="#L-695">695</a> <a href="#L-696">696</a> <a href="#L-697">697</a> <a href="#L-698">698</a> <a href="#L-699">699</a> <a href="#L-700">700</a> <a href="#L-701">701</a> <a href="#L-702">702</a> <a href="#L-703">703</a> <a href="#L-704">704</a> <a href="#L-705">705</a> <a href="#L-706">706</a> <a href="#L-707">707</a> <a href="#L-708">708</a> <a href="#L-709">709</a> <a href="#L-710">710</a> <a href="#L-711">711</a> <a href="#L-712">712</a> <a href="#L-713">713</a> <a href="#L-714">714</a> <a href="#L-715">715</a> <a href="#L-716">716</a> <a href="#L-717">717</a> <a href="#L-718">718</a> <a href="#L-719">719</a> <a href="#L-720">720</a> <a href="#L-721">721</a> <a href="#L-722">722</a> <a href="#L-723">723</a> <a href="#L-724">724</a> <a href="#L-725">725</a> <a href="#L-726">726</a> <a href="#L-727">727</a> <a href="#L-728">728</a> <a href="#L-729">729</a> <a href="#L-730">730</a> <a href="#L-731">731</a> <a href="#L-732">732</a> <a href="#L-733">733</a> <a href="#L-734">734</a> <a href="#L-735">735</a> <a href="#L-736">736</a> <a href="#L-737">737</a> <a href="#L-738">738</a> <a href="#L-739">739</a> <a href="#L-740">740</a> <a href="#L-741">741</a> <a href="#L-742">742</a> <a href="#L-743">743</a> <a href="#L-744">744</a> <a href="#L-745">745</a> <a href="#L-746">746</a> <a href="#L-747">747</a> <a href="#L-748">748</a> <a href="#L-749">749</a> <a href="#L-750">750</a> <a href="#L-751">751</a> <a href="#L-752">752</a> <a href="#L-753">753</a> <a href="#L-754">754</a> <a href="#L-755">755</a> <a href="#L-756">756</a> <a href="#L-757">757</a> <a href="#L-758">758</a> <a href="#L-759">759</a> <a href="#L-760">760</a> <a href="#L-761">761</a> <a href="#L-762">762</a> <a href="#L-763">763</a> <a href="#L-764">764</a> <a href="#L-765">765</a> <a href="#L-766">766</a> <a href="#L-767">767</a> <a href="#L-768">768</a> <a href="#L-769">769</a> <a href="#L-770">770</a> <a href="#L-771">771</a> <a href="#L-772">772</a> <a href="#L-773">773</a> <a href="#L-774">774</a> <a href="#L-775">775</a> <a href="#L-776">776</a> <a href="#L-777">777</a> <a href="#L-778">778</a> <a href="#L-779">779</a> <a href="#L-780">780</a> <a href="#L-781">781</a> <a href="#L-782">782</a> <a href="#L-783">783</a> <a href="#L-784">784</a> <a href="#L-785">785</a> <a href="#L-786">786</a> <a href="#L-787">787</a> <a href="#L-788">788</a> <a href="#L-789">789</a> <a href="#L-790">790</a> <a href="#L-791">791</a> <a href="#L-792">792</a> <a href="#L-793">793</a> <a href="#L-794">794</a> <a href="#L-795">795</a> <a href="#L-796">796</a> <a href="#L-797">797</a> <a href="#L-798">798</a> <a href="#L-799">799</a> <a href="#L-800">800</a> <a href="#L-801">801</a> <a href="#L-802">802</a> <a href="#L-803">803</a> <a href="#L-804">804</a> <a href="#L-805">805</a> <a href="#L-806">806</a> <a href="#L-807">807</a> <a href="#L-808">808</a> <a href="#L-809">809</a> <a href="#L-810">810</a> <a href="#L-811">811</a> <a href="#L-812">812</a> <a href="#L-813">813</a> <a href="#L-814">814</a> <a href="#L-815">815</a> <a href="#L-816">816</a> <a href="#L-817">817</a> <a href="#L-818">818</a> <a href="#L-819">819</a> <a href="#L-820">820</a> <a href="#L-821">821</a> <a href="#L-822">822</a> <a href="#L-823">823</a> <a href="#L-824">824</a> <a href="#L-825">825</a> <a href="#L-826">826</a> <a href="#L-827">827</a> <a href="#L-828">828</a> <a href="#L-829">829</a> <a href="#L-830">830</a> <a href="#L-831">831</a> <a href="#L-832">832</a> <a href="#L-833">833</a> <a href="#L-834">834</a> <a href="#L-835">835</a> <a href="#L-836">836</a> <a href="#L-837">837</a> <a href="#L-838">838</a> <a href="#L-839">839</a> <a href="#L-840">840</a> <a href="#L-841">841</a> <a href="#L-842">842</a> <a href="#L-843">843</a> <a href="#L-844">844</a> <a href="#L-845">845</a> <a href="#L-846">846</a> <a href="#L-847">847</a> <a href="#L-848">848</a> <a href="#L-849">849</a> <a href="#L-850">850</a> <a href="#L-851">851</a> <a href="#L-852">852</a> <a href="#L-853">853</a> <a href="#L-854">854</a> <a href="#L-855">855</a> <a href="#L-856">856</a> <a href="#L-857">857</a> <a href="#L-858">858</a> <a href="#L-859">859</a> <a href="#L-860">860</a> <a href="#L-861">861</a> <a href="#L-862">862</a> <a href="#L-863">863</a> <a href="#L-864">864</a> <a href="#L-865">865</a> <a href="#L-866">866</a> <a href="#L-867">867</a> <a href="#L-868">868</a> <a href="#L-869">869</a> <a href="#L-870">870</a> <a href="#L-871">871</a> <a href="#L-872">872</a> <a href="#L-873">873</a> <a href="#L-874">874</a> <a href="#L-875">875</a> <a href="#L-876">876</a> <a href="#L-877">877</a> <a href="#L-878">878</a> <a href="#L-879">879</a> <a href="#L-880">880</a> <a href="#L-881">881</a> <a href="#L-882">882</a> <a href="#L-883">883</a> <a href="#L-884">884</a> <a href="#L-885">885</a> <a href="#L-886">886</a> <a href="#L-887">887</a> <a href="#L-888">888</a> <a href="#L-889">889</a> <a href="#L-890">890</a> <a href="#L-891">891</a> <a href="#L-892">892</a> <a href="#L-893">893</a> <a href="#L-894">894</a> <a href="#L-895">895</a> <a href="#L-896">896</a> <a href="#L-897">897</a> <a href="#L-898">898</a> <a href="#L-899">899</a> <a href="#L-900">900</a> <a href="#L-901">901</a> <a href="#L-902">902</a> <a href="#L-903">903</a> <a href="#L-904">904</a> <a href="#L-905">905</a> <a href="#L-906">906</a> <a href="#L-907">907</a> <a href="#L-908">908</a> <a href="#L-909">909</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="c">&quot; Arquivo de configuração do vim</span> </span><span id="L-2"><a name="L-2"></a><span class="c">&quot; vim:nolist:enc=utf-8: </span> </span><span id="L-3"><a name="L-3"></a><span class="c">&quot; Criado: Qua 02/Ago/2006 hs 09:19</span> </span><span id="L-4"><a name="L-4"></a><span class="c">&quot; Last Change: Qua 30 Jun 2010 17:10:32 BRT</span> </span><span id="L-5"><a name="L-5"></a><span class="c">&quot; Autor: Sergio Luiz Araujo Silva</span> </span><span id="L-6"><a name="L-6"></a><span class="c">&quot; Codificação: utf-8</span> </span><span id="L-7"><a name="L-7"></a><span class="c">&quot; Download: http://dotfiles.org/~voyeg3r/.vimrc</span> </span><span id="L-8"><a name="L-8"></a><span class="c">&quot; Licence: Licença: Este arquivo é de domínio público</span> </span><span id="L-9"><a name="L-9"></a><span class="c">&quot; Garantia: O autor não se responsabiliza por eventuais danos</span> </span><span id="L-10"><a name="L-10"></a><span class="c">&quot; causados pelo uso deste arquivo.</span> </span><span id="L-11"><a name="L-11"></a> </span><span id="L-12"><a name="L-12"></a><span class="c">&quot; ( O O )&quot;{{{</span> </span><span id="L-13"><a name="L-13"></a><span class="c">&quot; +===========oOO==(_)==OOo==============+</span> </span><span id="L-14"><a name="L-14"></a><span class="c">&quot; | |</span> </span><span id="L-15"><a name="L-15"></a><span class="c">&quot; | °v° Sergio Luiz Araujo Silva |</span> </span><span id="L-16"><a name="L-16"></a><span class="c">&quot; | /(_)\ Linux User #423493 |</span> </span><span id="L-17"><a name="L-17"></a><span class="c">&quot; | ^ ^ voyeg3r ? gmail.com |</span> </span><span id="L-18"><a name="L-18"></a><span class="c">&quot; +======================================+</span> </span><span id="L-19"><a name="L-19"></a><span class="c">&quot;</span> </span><span id="L-20"><a name="L-20"></a><span class="c">&quot; Referências:</span> </span><span id="L-21"><a name="L-21"></a><span class="c">&quot; * http://aurelio.net/vim/vimrc-ivan.txt</span> </span><span id="L-22"><a name="L-22"></a><span class="c">&quot;</span> </span><span id="L-23"><a name="L-23"></a><span class="c">&quot; :set runtimepath=~/vimruntime,/mygroup/vim,$VIMRUNTIME</span> </span><span id="L-24"><a name="L-24"></a><span class="c">&quot; :echo g:colors_name</span> </span><span id="L-25"><a name="L-25"></a><span class="c">&quot;</span> </span><span id="L-26"><a name="L-26"></a><span class="c">&quot; sobre o plugin taglist</span> </span><span id="L-27"><a name="L-27"></a><span class="c">&quot; http://www.caiomoritz.com/2008/02/09/o-poder-da-exuberant-ctags-aliada-ao-vim/</span> </span><span id="L-28"><a name="L-28"></a><span class="c">&quot;</span> </span><span id="L-29"><a name="L-29"></a><span class="c">&quot; let s:wordUnderCursor = expand(&quot;&lt;cword&gt;&quot;)</span> </span><span id="L-30"><a name="L-30"></a><span class="c">&quot; :%s/expand(&quot;&lt;cword&gt;&quot;)//gn&quot;}}}</span> </span><span id="L-31"><a name="L-31"></a><span class="c">&quot;</span> </span><span id="L-32"><a name="L-32"></a><span class="k">if</span> <span class="k">v</span>:<span class="k">lang</span> <span class="p">=~</span> <span class="s2">&quot;utf8$&quot;</span> <span class="p">||</span> <span class="k">v</span>:<span class="k">lang</span> <span class="p">=~</span> <span class="s2">&quot;UTF-8$&quot;</span> </span><span id="L-33"><a name="L-33"></a> <span class="k">set</span> <span class="nb">fileencodings</span><span class="p">=</span>utf<span class="m">-8</span><span class="p">,</span>latin1 </span><span id="L-34"><a name="L-34"></a><span class="k">endif</span> </span><span id="L-35"><a name="L-35"></a> </span><span id="L-36"><a name="L-36"></a><span class="c">&quot; Settings for :TOhtml</span> </span><span id="L-37"><a name="L-37"></a><span class="k">let</span> html_number_lines<span class="p">=</span><span class="m">1</span> </span><span id="L-38"><a name="L-38"></a><span class="k">let</span> html_use_css<span class="p">=</span><span class="m">1</span> </span><span id="L-39"><a name="L-39"></a><span class="k">let</span> use_xhtml<span class="p">=</span><span class="m">1</span> </span><span id="L-40"><a name="L-40"></a> </span><span id="L-41"><a name="L-41"></a>map <span class="p">,</span><span class="k">f</span> <span class="p">&lt;</span>esc<span class="p">&gt;</span>:FuzzyFinderFile<span class="p">&lt;</span><span class="k">cr</span><span class="p">&gt;</span> </span><span id="L-42"><a name="L-42"></a>map <span class="p">,</span><span class="k">b</span> <span class="p">&lt;</span>esc<span class="p">&gt;</span>:FuzzyFinderBookmark<span class="p">&lt;</span><span class="k">cr</span><span class="p">&gt;</span> </span><span id="L-43"><a name="L-43"></a>map <span class="p">,</span><span class="k">a</span> <span class="p">&lt;</span>esc<span class="p">&gt;</span>:FuzzyFinderAddBookmark<span class="p">&lt;</span><span class="k">cr</span><span class="p">&gt;</span> </span><span id="L-44"><a name="L-44"></a>map <span class="p">,</span><span class="k">d</span> <span class="p">&lt;</span>esc<span class="p">&gt;</span>:FuzzyFinderDir<span class="p">&lt;</span><span class="k">cr</span><span class="p">&gt;</span> </span><span id="L-45"><a name="L-45"></a>map <span class="p">,</span><span class="k">m</span> <span class="p">&lt;</span>esc<span class="p">&gt;</span>:FuzzyFinderMruFile<span class="p">&lt;</span><span class="k">cr</span><span class="p">&gt;</span> </span><span id="L-46"><a name="L-46"></a> </span><span id="L-47"><a name="L-47"></a>nmap <span class="p">,</span><span class="k">i</span> [I:<span class="k">let</span> nr <span class="p">=</span> input<span class="p">(</span><span class="s2">&quot;Which one: &quot;</span><span class="p">)&lt;</span>Bar<span class="p">&gt;</span>exe <span class="s2">&quot;normal &quot;</span> . nr .<span class="s2">&quot;[\t&quot;</span><span class="p">&lt;</span>CR<span class="p">&gt;</span> </span><span id="L-48"><a name="L-48"></a> </span><span id="L-49"><a name="L-49"></a>amenu &amp;Projetos.toggle <span class="p">&lt;</span>Plug<span class="p">&gt;</span>ToggleProject<span class="p">&lt;</span><span class="k">cr</span><span class="p">&gt;</span> </span><span id="L-50"><a name="L-50"></a> </span><span id="L-51"><a name="L-51"></a><span class="c">&quot; --------------------</span> </span><span id="L-52"><a name="L-52"></a><span class="c">&quot; Project</span> </span><span id="L-53"><a name="L-53"></a><span class="c">&quot; --------------------</span> </span><span id="L-54"><a name="L-54"></a><span class="c">&quot;map &lt;A-S-p&gt; :Project&lt;CR&gt;</span> </span><span id="L-55"><a name="L-55"></a><span class="c">&quot;map &lt;A-S-o&gt; :Project&lt;CR&gt;:redraw&lt;CR&gt;/</span> </span><span id="L-56"><a name="L-56"></a><span class="c">&quot;nmap &lt;silent&gt; &lt;F3&gt; &lt;Plug&gt;ToggleProject</span> </span><span id="L-57"><a name="L-57"></a><span class="k">let</span> <span class="k">g</span>:proj_window_width <span class="p">=</span> <span class="m">30</span> </span><span id="L-58"><a name="L-58"></a><span class="k">let</span> <span class="k">g</span>:proj_window_increment <span class="p">=</span> <span class="m">50</span> </span><span id="L-59"><a name="L-59"></a><span class="c">&quot; habilitar e desabilitar o plugin</span> </span><span id="L-60"><a name="L-60"></a>nmap <span class="p">&lt;</span><span class="k">silent</span><span class="p">&gt;</span> <span class="p">,</span><span class="k">p</span> <span class="p">&lt;</span>Plug<span class="p">&gt;</span>ToggleProject<span class="p">&lt;</span><span class="k">cr</span><span class="p">&gt;</span> </span><span id="L-61"><a name="L-61"></a> </span><span id="L-62"><a name="L-62"></a><span class="c">&quot; mapeamento para mostrar linhas que contenhasm determinada palavra</span> </span><span id="L-63"><a name="L-63"></a>map <span class="p">,</span>/ [I:<span class="k">let</span> nr <span class="p">=</span> input<span class="p">(</span><span class="s2">&quot;Which one: &quot;</span><span class="p">)&lt;</span>Bar<span class="p">&gt;</span>exe <span class="s2">&quot;normal &quot;</span> . nr .<span class="s2">&quot;[\t&quot;</span><span class="p">&lt;</span>CR<span class="p">&gt;</span> </span><span id="L-64"><a name="L-64"></a> </span><span id="L-65"><a name="L-65"></a><span class="c">&quot; mapeamento para mostrar linhas duplicadas</span> </span><span id="L-66"><a name="L-66"></a>map <span class="p">,</span>sd <span class="p">&lt;</span>esc<span class="p">&gt;</span>:<span class="k">g</span><span class="sr">/^\(.*\)\n\ze\%(.*\n\)*\1$/</span>#<span class="p">&lt;</span><span class="k">cr</span><span class="p">&gt;</span> </span><span id="L-67"><a name="L-67"></a> </span><span id="L-68"><a name="L-68"></a><span class="c">&quot; para que as modelines funcionem com file encoding</span> </span><span id="L-69"><a name="L-69"></a><span class="k">au</span> <span class="nb">BufReadPost</span> * <span class="k">let</span> <span class="k">b</span>:reloadcheck <span class="p">=</span> <span class="m">1</span> </span><span id="L-70"><a name="L-70"></a><span class="k">au</span> <span class="nb">BufWinEnter</span> * <span class="k">if</span> exists<span class="p">(</span><span class="s1">&#39;b:reloadcheck&#39;</span><span class="p">)</span> <span class="p">|</span> unlet <span class="k">b</span>:reloadcheck <span class="p">|</span> <span class="k">if</span> &amp;<span class="k">mod</span> <span class="p">!=</span> <span class="m">0</span> &amp;&amp; &amp;<span class="nb">fenc</span> <span class="p">!=</span> <span class="s2">&quot;&quot;</span> <span class="p">|</span> exe <span class="s1">&#39;e! ++enc=&#39;</span> . &amp;<span class="nb">fenc</span> <span class="p">|</span> <span class="k">endif</span> <span class="p">|</span> <span class="k">endif</span> </span><span id="L-71"><a name="L-71"></a> </span><span id="L-72"><a name="L-72"></a><span class="c">&quot; contagem de ocorrências de uma palavra (case insensitive)</span> </span><span id="L-73"><a name="L-73"></a>nmap <span class="p">&lt;</span>F4<span class="p">&gt;</span> <span class="p">&lt;</span>esc<span class="p">&gt;</span><span class="k">mz</span>:%s<span class="sr">/\c\&lt;\(&lt;c-r&gt;=expand(&quot;&lt;cword&gt;&quot;)&lt;cr&gt;\)\&gt;/</span>/gn<span class="p">&lt;</span><span class="k">cr</span><span class="p">&gt;</span>`z </span><span id="L-74"><a name="L-74"></a>nmap <span class="p">&lt;</span>s<span class="p">-</span>F4<span class="p">&gt;</span> <span class="p">&lt;</span>esc<span class="p">&gt;</span><span class="k">mz</span>:%s<span class="sr">/\c\(&lt;c-r&gt;=expand(&quot;&lt;cword&gt;&quot;)&lt;cr&gt;\)/</span>/gn<span class="p">&lt;</span><span class="k">cr</span><span class="p">&gt;</span>`z </span><span id="L-75"><a name="L-75"></a> </span><span id="L-76"><a name="L-76"></a><span class="c">&quot; mapeamento para o wikispaces</span> </span><span id="L-77"><a name="L-77"></a><span class="c">&quot; https://addons.mozilla.org/pt-BR/firefox/addon/4125</span> </span><span id="L-78"><a name="L-78"></a>imap <span class="p">,</span><span class="k">w</span> [[code format<span class="p">=</span><span class="s2">&quot;&quot;</span>]]<span class="p">&lt;</span>enter<span class="p">&gt;&lt;+</span>conteudo<span class="p">+&gt;&lt;</span>enter<span class="p">&gt;</span>[[code]]<span class="p">&lt;</span>esc<span class="p">&gt;&lt;</span><span class="k">right</span><span class="p">&gt;</span>D<span class="p">&lt;</span>esc<span class="p">&gt;</span>kkf&quot;<span class="k">a</span> </span><span id="L-79"><a name="L-79"></a>nmap <span class="p">,</span><span class="k">w</span> [[code format<span class="p">=</span><span class="s2">&quot;&quot;</span>]]<span class="p">&lt;</span>enter<span class="p">&gt;&lt;+</span>conteudo<span class="p">+&gt;&lt;</span>enter<span class="p">&gt;</span>[[code]]<span class="p">&lt;</span>esc<span class="p">&gt;&lt;</span><span class="k">right</span><span class="p">&gt;</span>D<span class="p">&lt;</span>esc<span class="p">&gt;</span>kkf&quot;<span class="k">a</span> </span><span id="L-80"><a name="L-80"></a> </span><span id="L-81"><a name="L-81"></a><span class="c">&quot; mapeamento para colocar palavra sob o cursor na substituição</span> </span><span id="L-82"><a name="L-82"></a><span class="nb">nnoremap</span> <span class="p">&lt;</span>Leader<span class="p">&gt;</span>s :%s<span class="sr">/\&lt;&lt;C-r&gt;&lt;C-w&gt;\&gt;/</span> </span><span id="L-83"><a name="L-83"></a> </span><span id="L-84"><a name="L-84"></a><span class="c">&quot; registro de alterações de arquivo</span> </span><span id="L-85"><a name="L-85"></a><span class="c">&quot; ChangeLog entry convenience</span> </span><span id="L-86"><a name="L-86"></a><span class="c">&quot; Função para inserir um status do arquivo</span> </span><span id="L-87"><a name="L-87"></a><span class="c">&quot; cirado: data de criação, alteração, autor etc</span> </span><span id="L-88"><a name="L-88"></a><span class="k">fun</span><span class="p">!</span> InsertChangeLog<span class="p">()</span> </span><span id="L-89"><a name="L-89"></a> normal<span class="p">(</span><span class="m">1</span>G<span class="p">)</span> </span><span id="L-90"><a name="L-90"></a> <span class="k">call</span> append<span class="p">(</span><span class="m">0</span><span class="p">,</span> <span class="s2">&quot;Arquivo: &quot;</span><span class="p">)</span> </span><span id="L-91"><a name="L-91"></a> <span class="k">call</span> append<span class="p">(</span><span class="m">1</span><span class="p">,</span> <span class="s2">&quot;Criado: &quot;</span> . strftime<span class="p">(</span><span class="s2">&quot;%a %d/%b/%Y hs %H:%M&quot;</span><span class="p">))</span> </span><span id="L-92"><a name="L-92"></a> <span class="k">call</span> append<span class="p">(</span><span class="m">2</span><span class="p">,</span> <span class="s2">&quot;Last Change: &quot;</span> . strftime<span class="p">(</span><span class="s2">&quot;%a %d/%b/%Y hs %H:%M&quot;</span><span class="p">))</span> </span><span id="L-93"><a name="L-93"></a> <span class="k">call</span> append<span class="p">(</span><span class="m">3</span><span class="p">,</span> <span class="s2">&quot;autor: &lt;+digite seu nome+&gt;&quot;</span><span class="p">)</span> </span><span id="L-94"><a name="L-94"></a> <span class="k">call</span> append<span class="p">(</span><span class="m">4</span><span class="p">,</span> <span class="s2">&quot;site: &lt;+digite o endereço de seu site+&gt;&quot;</span><span class="p">)</span> </span><span id="L-95"><a name="L-95"></a> normal gg </span><span id="L-96"><a name="L-96"></a><span class="k">endfun</span> </span><span id="L-97"><a name="L-97"></a> </span><span id="L-98"><a name="L-98"></a><span class="c">&quot; Cria um cabeçalho para scripts bash</span> </span><span id="L-99"><a name="L-99"></a><span class="k">fun</span><span class="p">!</span> InsertHeadBash<span class="p">()</span> </span><span id="L-100"><a name="L-100"></a> normal<span class="p">(</span><span class="m">1</span>G<span class="p">)</span> </span><span id="L-101"><a name="L-101"></a> <span class="k">call</span> append<span class="p">(</span><span class="m">0</span><span class="p">,</span> <span class="s2">&quot;#!/bin/bash&quot;</span><span class="p">)</span> </span><span id="L-102"><a name="L-102"></a> <span class="k">call</span> append<span class="p">(</span><span class="m">1</span><span class="p">,</span> <span class="s2">&quot;# Criado em:&quot;</span> . strftime<span class="p">(</span><span class="s2">&quot;%a %d/%b/%Y hs %H:%M&quot;</span><span class="p">))</span> </span><span id="L-103"><a name="L-103"></a> <span class="k">call</span> append<span class="p">(</span><span class="m">2</span><span class="p">,</span> <span class="s2">&quot;# Last Change: &quot;</span> . strftime<span class="p">(</span><span class="s2">&quot;%a %d/%b/%Y hs %H:%M&quot;</span><span class="p">))</span> </span><span id="L-104"><a name="L-104"></a> <span class="k">call</span> append<span class="p">(</span><span class="m">3</span><span class="p">,</span> <span class="s2">&quot;# vim:ft=sh:fdm=syntax:nu:&quot;</span><span class="p">)</span> </span><span id="L-105"><a name="L-105"></a> <span class="k">call</span> append<span class="p">(</span><span class="m">4</span><span class="p">,</span> <span class="s2">&quot;# Instituicao: &lt;+nome+&gt;&quot;</span><span class="p">)</span> </span><span id="L-106"><a name="L-106"></a> <span class="k">call</span> append<span class="p">(</span><span class="m">5</span><span class="p">,</span> <span class="s2">&quot;# Proposito do script: &lt;+descreva+&gt;&quot;</span><span class="p">)</span> </span><span id="L-107"><a name="L-107"></a> <span class="k">call</span> append<span class="p">(</span><span class="m">6</span><span class="p">,</span> <span class="s2">&quot;# Autor: &lt;+seuNome+&gt;&quot;</span><span class="p">)</span> </span><span id="L-108"><a name="L-108"></a> <span class="k">call</span> append<span class="p">(</span><span class="m">7</span><span class="p">,</span> <span class="s2">&quot;# site: &lt;+seuSite+&gt;&quot;</span><span class="p">)</span> </span><span id="L-109"><a name="L-109"></a> normal gg </span><span id="L-110"><a name="L-110"></a><span class="k">endfun</span> </span><span id="L-111"><a name="L-111"></a>map <span class="p">,</span><span class="k">sh</span> :<span class="k">call</span> InsertHeadBash<span class="p">()&lt;</span><span class="k">cr</span><span class="p">&gt;</span>A </span><span id="L-112"><a name="L-112"></a><span class="k">au</span> <span class="nb">BufNewFile</span><span class="p">,</span><span class="nb">BufRead</span> *.<span class="k">sh</span> <span class="k">if</span> getline<span class="p">(</span><span class="m">1</span><span class="p">)</span> <span class="p">==</span> <span class="s2">&quot;&quot;</span> <span class="p">|</span> normal <span class="p">,</span><span class="k">sh</span> </span><span id="L-113"><a name="L-113"></a> </span><span id="L-114"><a name="L-114"></a><span class="k">au</span><span class="p">!</span> <span class="nb">VimEnter</span> * <span class="k">match</span> ErrorMsg <span class="sr">/^\t\+/</span> </span><span id="L-115"><a name="L-115"></a><span class="k">au</span><span class="p">!</span> <span class="nb">VimEnter</span> * <span class="k">match</span> ErrorMsg / </span><span id="L-116"><a name="L-116"></a>$/ </span><span id="L-117"><a name="L-117"></a> </span><span id="L-118"><a name="L-118"></a>augroup filetypedetect </span><span id="L-119"><a name="L-119"></a><span class="k">au</span> <span class="nb">BufNewFile</span><span class="p">,</span><span class="nb">BufRead</span> *.txt <span class="k">setf</span> txt </span><span id="L-120"><a name="L-120"></a>augroup END </span><span id="L-121"><a name="L-121"></a> </span><span id="L-122"><a name="L-122"></a>augroup filetypedetect </span><span id="L-123"><a name="L-123"></a><span class="k">au</span> <span class="nb">BufNewFile</span><span class="p">,</span><span class="nb">BufRead</span> *.<span class="k">sh</span> <span class="k">setf</span> <span class="k">sh</span> </span><span id="L-124"><a name="L-124"></a>augroup END </span><span id="L-125"><a name="L-125"></a> </span><span id="L-126"><a name="L-126"></a><span class="k">fun</span><span class="p">!</span> BufNewFile_PY<span class="p">()</span> </span><span id="L-127"><a name="L-127"></a> normal<span class="p">(</span><span class="m">1</span>G<span class="p">)</span> </span><span id="L-128"><a name="L-128"></a> <span class="k">call</span> append<span class="p">(</span><span class="m">0</span><span class="p">,</span> <span class="s2">&quot;#!/usr/bin/env python&quot;</span><span class="p">)</span> </span><span id="L-129"><a name="L-129"></a> <span class="k">call</span> append<span class="p">(</span><span class="m">1</span><span class="p">,</span> <span class="s2">&quot;# # -*- coding: UTF-8 -*-&quot;</span><span class="p">)</span> </span><span id="L-130"><a name="L-130"></a> <span class="k">call</span> append<span class="p">(</span><span class="m">2</span><span class="p">,</span> <span class="s2">&quot;# Criado em:&quot;</span> . strftime<span class="p">(</span><span class="s2">&quot;%a %d/%b/%Y hs %H:%M&quot;</span><span class="p">))</span> </span><span id="L-131"><a name="L-131"></a> <span class="k">call</span> append<span class="p">(</span><span class="m">3</span><span class="p">,</span> <span class="s2">&quot;# Last Change: &quot;</span> . strftime<span class="p">(</span><span class="s2">&quot;%a %d/%b/%Y hs %H:%M&quot;</span><span class="p">))</span> </span><span id="L-132"><a name="L-132"></a> <span class="k">call</span> append<span class="p">(</span><span class="m">4</span><span class="p">,</span> <span class="s2">&quot;# vim:ft=python:nolist:nu:&quot;</span><span class="p">)</span> </span><span id="L-133"><a name="L-133"></a> <span class="k">call</span> append<span class="p">(</span><span class="m">5</span><span class="p">,</span> <span class="s2">&quot;# Instituicao: &lt;+nome+&gt;&quot;</span><span class="p">)</span> </span><span id="L-134"><a name="L-134"></a> <span class="k">call</span> append<span class="p">(</span><span class="m">6</span><span class="p">,</span> <span class="s2">&quot;# Proposito do script: &lt;+descreva+&gt;&quot;</span><span class="p">)</span> </span><span id="L-135"><a name="L-135"></a> <span class="k">call</span> append<span class="p">(</span><span class="m">7</span><span class="p">,</span> <span class="s2">&quot;# Autor: &lt;+seuNome+&gt;&quot;</span><span class="p">)</span> </span><span id="L-136"><a name="L-136"></a> <span class="k">call</span> append<span class="p">(</span><span class="m">8</span><span class="p">,</span> <span class="s2">&quot;# site: &lt;+seuSite+&gt;&quot;</span><span class="p">)</span> </span><span id="L-137"><a name="L-137"></a> normal gg </span><span id="L-138"><a name="L-138"></a><span class="k">endfun</span> </span><span id="L-139"><a name="L-139"></a>autocmd <span class="nb">BufNewFile</span> *.<span class="k">py</span> <span class="k">call</span> BufNewFile_PY<span class="p">()</span> </span><span id="L-140"><a name="L-140"></a>map <span class="p">,</span><span class="k">py</span> :<span class="k">call</span> BufNewFile_PY<span class="p">()&lt;</span><span class="k">cr</span><span class="p">&gt;</span>A </span><span id="L-141"><a name="L-141"></a> </span><span id="L-142"><a name="L-142"></a><span class="c">&quot; calculadora científica usando python</span> </span><span id="L-143"><a name="L-143"></a><span class="p">:</span>command<span class="p">!</span> <span class="p">-</span>nargs<span class="p">=+</span> Calc :<span class="k">py</span> print <span class="p">&lt;</span>args<span class="p">&gt;</span> </span><span id="L-144"><a name="L-144"></a><span class="p">:</span><span class="k">py</span> <span class="kn">from</span> <span class="nn">math</span> <span class="kn">import</span> <span class="o">*</span> </span><span id="L-145"><a name="L-145"></a>map <span class="p">,</span><span class="k">c</span> :Calc </span><span id="L-146"><a name="L-146"></a> </span><span id="L-147"><a name="L-147"></a>nmap <span class="p">&lt;</span><span class="k">c</span><span class="p">-</span>s<span class="p">-</span><span class="k">c</span><span class="p">&gt;</span> :<span class="k">call</span> LastChange<span class="p">()&lt;</span><span class="k">cr</span><span class="p">&gt;</span> </span><span id="L-148"><a name="L-148"></a>nmap <span class="p">&lt;</span><span class="k">c</span><span class="p">-</span><span class="k">m</span><span class="p">-</span><span class="k">c</span><span class="p">&gt;</span> :<span class="k">call</span> InsertChangeLog<span class="p">()&lt;</span><span class="k">cr</span><span class="p">&gt;</span> </span><span id="L-149"><a name="L-149"></a><span class="c">&quot; Automatically give executable permission to scripts starting</span> </span><span id="L-150"><a name="L-150"></a><span class="c"> &quot; with #!/usr/bin/perl and #!/bin/sh</span> </span><span id="L-151"><a name="L-151"></a><span class="k">au</span> <span class="nb">BufNewFile</span><span class="p">,</span><span class="nb">BufWritePost</span> * <span class="k">if</span> getline<span class="p">(</span><span class="m">1</span><span class="p">)</span> <span class="p">=~</span> <span class="s2">&quot;^#!/bin/[a-z]*sh&quot;</span> <span class="p">||</span> </span><span id="L-152"><a name="L-152"></a> \ getline<span class="p">(</span><span class="m">1</span><span class="p">)</span> <span class="p">=~</span> <span class="s2">&quot;^#!/usr/bin/.*python&quot;</span> <span class="p">|</span> <span class="k">silent</span> execute <span class="s2">&quot;!chmod u+x %&quot;</span> <span class="p">|</span> <span class="k">endif</span> </span><span id="L-153"><a name="L-153"></a> </span><span id="L-154"><a name="L-154"></a><span class="k">filetype</span> <span class="k">on</span> </span><span id="L-155"><a name="L-155"></a><span class="k">filetype</span> plugin <span class="k">on</span> </span><span id="L-156"><a name="L-156"></a><span class="k">set</span> <span class="nb">ofu</span><span class="p">=</span>syntaxcomplete#Complete </span><span id="L-157"><a name="L-157"></a> </span><span id="L-158"><a name="L-158"></a><span class="c">&quot;# omini completion for python</span> </span><span id="L-159"><a name="L-159"></a>autocmd <span class="nb">FileType</span> python <span class="k">set</span> <span class="nb">omnifunc</span><span class="p">=</span>pythoncomplete#Complete </span><span id="L-160"><a name="L-160"></a>autocmd <span class="nb">FileType</span> javascript <span class="k">set</span> <span class="nb">omnifunc</span><span class="p">=</span>javascriptcomplete#CompleteJS </span><span id="L-161"><a name="L-161"></a>autocmd <span class="nb">FileType</span> html <span class="k">set</span> <span class="nb">omnifunc</span><span class="p">=</span>htmlcomplete#CompleteTags </span><span id="L-162"><a name="L-162"></a>autocmd <span class="nb">FileType</span> css <span class="k">set</span> <span class="nb">omnifunc</span><span class="p">=</span>csscomplete#CompleteCSS </span><span id="L-163"><a name="L-163"></a>autocmd <span class="nb">FileType</span> xml <span class="k">set</span> <span class="nb">omnifunc</span><span class="p">=</span>xmlcomplete#CompleteTags </span><span id="L-164"><a name="L-164"></a>autocmd <span class="nb">FileType</span> php <span class="k">set</span> <span class="nb">omnifunc</span><span class="p">=</span>phpcomplete#CompletePHP </span><span id="L-165"><a name="L-165"></a>autocmd <span class="nb">FileType</span> <span class="k">c</span> <span class="k">set</span> <span class="nb">omnifunc</span><span class="p">=</span>ccomplete#Complete </span><span id="L-166"><a name="L-166"></a> </span><span id="L-167"><a name="L-167"></a><span class="k">if</span> has<span class="p">(</span><span class="s2">&quot;autocmd&quot;</span><span class="p">)</span> </span><span id="L-168"><a name="L-168"></a>autocmd <span class="nb">FileType</span> php <span class="k">set</span> <span class="nb">complete</span><span class="p">-=</span><span class="k">k</span><span class="sr">/home/</span>USUARIO<span class="sr">/.vim/</span>doc<span class="sr">/funclist.txt complete+=k/</span>home<span class="sr">/USUARIO/</span>.<span class="k">vim</span><span class="sr">/doc/</span>funclist.txt </span><span id="L-169"><a name="L-169"></a><span class="k">endif</span> </span><span id="L-170"><a name="L-170"></a> </span><span id="L-171"><a name="L-171"></a><span class="c">&quot; adiciona omnifunc para demais formatos</span> </span><span id="L-172"><a name="L-172"></a><span class="k">if</span> has<span class="p">(</span><span class="s2">&quot;autocmd&quot;</span><span class="p">)</span> &amp;&amp; exists<span class="p">(</span><span class="s2">&quot;+omnifunc&quot;</span><span class="p">)</span> </span><span id="L-173"><a name="L-173"></a> autocmd Filetype * </span><span id="L-174"><a name="L-174"></a> \ <span class="k">if</span> &amp;<span class="nb">omnifunc</span> <span class="p">==</span> <span class="s2">&quot;&quot;</span> <span class="p">|</span> </span><span id="L-175"><a name="L-175"></a> \ <span class="k">setlocal</span> <span class="nb">omnifunc</span><span class="p">=</span>syntaxcomplete#Complete <span class="p">|</span> </span><span id="L-176"><a name="L-176"></a> \ <span class="k">endif</span> </span><span id="L-177"><a name="L-177"></a><span class="k">endif</span> </span><span id="L-178"><a name="L-178"></a> </span><span id="L-179"><a name="L-179"></a><span class="c">&quot; Like bufdo but restore the current buffer.</span> </span><span id="L-180"><a name="L-180"></a><span class="k">function</span><span class="p">!</span> BufDo<span class="p">(</span>command<span class="p">)</span> </span><span id="L-181"><a name="L-181"></a> <span class="k">let</span> currBuff<span class="p">=</span>bufnr<span class="p">(</span><span class="s2">&quot;%&quot;</span><span class="p">)</span> </span><span id="L-182"><a name="L-182"></a> execute <span class="s1">&#39;bufdo &#39;</span> . <span class="k">a</span>:command </span><span id="L-183"><a name="L-183"></a> execute <span class="s1">&#39;buffer &#39;</span> . currBuff </span><span id="L-184"><a name="L-184"></a><span class="k">endfunction</span> </span><span id="L-185"><a name="L-185"></a><span class="k">com</span><span class="p">!</span> <span class="p">-</span>nargs<span class="p">=+</span> <span class="p">-</span><span class="nb">complete</span><span class="p">=</span>command Bufdo <span class="k">call</span> BufDo<span class="p">(&lt;</span><span class="k">q</span><span class="p">-</span>args<span class="p">&gt;)</span> </span><span id="L-186"><a name="L-186"></a> </span><span id="L-187"><a name="L-187"></a><span class="c">&quot;numerar linhas - use o plugin nlist que está instalado ou instale via web</span> </span><span id="L-188"><a name="L-188"></a><span class="c">&quot; instalei o plugin nlist para numerar linhas por isso comentei este trecho</span> </span><span id="L-189"><a name="L-189"></a><span class="c">&quot;command! -nargs=* -range Nlist &lt;line1&gt;,&lt;line2&gt;call Nlist(&lt;f-args&gt;)</span> </span><span id="L-190"><a name="L-190"></a><span class="c">&quot;function! Nlist(...) range</span> </span><span id="L-191"><a name="L-191"></a><span class="c">&quot; if 2 == a:0</span> </span><span id="L-192"><a name="L-192"></a><span class="c">&quot; let start = a:1</span> </span><span id="L-193"><a name="L-193"></a><span class="c">&quot; let append = a:2</span> </span><span id="L-194"><a name="L-194"></a><span class="c">&quot; elseif 1 == a:0</span> </span><span id="L-195"><a name="L-195"></a><span class="c">&quot; let start = a:1</span> </span><span id="L-196"><a name="L-196"></a><span class="c">&quot; let append = &quot; &quot;</span> </span><span id="L-197"><a name="L-197"></a><span class="c">&quot; else</span> </span><span id="L-198"><a name="L-198"></a><span class="c">&quot; let start = 1</span> </span><span id="L-199"><a name="L-199"></a><span class="c">&quot; let append = &quot; &quot;</span> </span><span id="L-200"><a name="L-200"></a><span class="c">&quot; endif</span> </span><span id="L-201"><a name="L-201"></a><span class="c">&quot;</span> </span><span id="L-202"><a name="L-202"></a><span class="c">&quot; &quot; try to work like getline (i.e. allow the user to pass in . $ or &#39;x)</span> </span><span id="L-203"><a name="L-203"></a><span class="c">&quot; if 0 == (start + 0)</span> </span><span id="L-204"><a name="L-204"></a><span class="c">&quot; let start = line(start)</span> </span><span id="L-205"><a name="L-205"></a><span class="c">&quot; endif</span> </span><span id="L-206"><a name="L-206"></a><span class="c">&quot;</span> </span><span id="L-207"><a name="L-207"></a><span class="c">&quot; exe a:firstline . &quot;,&quot; . a:lastline . &#39;s/^/\=line(&quot;.&quot;)-a:firstline+start.append/&#39;</span> </span><span id="L-208"><a name="L-208"></a><span class="c">&quot;endfunction</span> </span><span id="L-209"><a name="L-209"></a> </span><span id="L-210"><a name="L-210"></a><span class="c">&quot; advanced incrementing (really useful)</span> </span><span id="L-211"><a name="L-211"></a><span class="c">&quot; put following in _vimrc</span> </span><span id="L-212"><a name="L-212"></a><span class="k">let</span> <span class="k">g</span>:I<span class="p">=</span><span class="m">0</span> </span><span id="L-213"><a name="L-213"></a><span class="k">function</span><span class="p">!</span> INC<span class="p">(</span>increment<span class="p">)</span> </span><span id="L-214"><a name="L-214"></a> <span class="k">let</span> <span class="k">g</span>:I <span class="p">=</span><span class="k">g</span>:I <span class="p">+</span> <span class="k">a</span>:increment </span><span id="L-215"><a name="L-215"></a> <span class="k">return</span> <span class="k">g</span>:I </span><span id="L-216"><a name="L-216"></a><span class="k">endfunction</span> </span><span id="L-217"><a name="L-217"></a><span class="c">&quot; eg create list starting from 223 incrementing by 5 between markers a,b</span> </span><span id="L-218"><a name="L-218"></a><span class="c">&quot;:let I=223</span> </span><span id="L-219"><a name="L-219"></a><span class="c">&quot;:&#39;a,&#39;bs/^/\=INC(5)/</span> </span><span id="L-220"><a name="L-220"></a><span class="c">&quot; create a map for INC</span> </span><span id="L-221"><a name="L-221"></a><span class="c">&quot;cab viminc :let I=223 \| &#39;a,&#39;bs/$/\=INC(5)/</span> </span><span id="L-222"><a name="L-222"></a> </span><span id="L-223"><a name="L-223"></a><span class="c">&quot; rola janela alternativa</span> </span><span id="L-224"><a name="L-224"></a><span class="k">fun</span><span class="p">!</span> ScrollOtherWindow<span class="p">(</span><span class="k">dir</span><span class="p">)</span> </span><span id="L-225"><a name="L-225"></a> <span class="k">if</span> <span class="k">a</span>:<span class="k">dir</span> <span class="p">==</span> <span class="s2">&quot;down&quot;</span> </span><span id="L-226"><a name="L-226"></a> <span class="k">let</span> move <span class="p">=</span> <span class="s2">&quot;\&lt;C-E&gt;&quot;</span> </span><span id="L-227"><a name="L-227"></a> <span class="k">elseif</span> <span class="k">a</span>:<span class="k">dir</span> <span class="p">==</span> <span class="s2">&quot;up&quot;</span> </span><span id="L-228"><a name="L-228"></a> <span class="k">let</span> move <span class="p">=</span> <span class="s2">&quot;\&lt;C-Y&gt;&quot;</span> </span><span id="L-229"><a name="L-229"></a> <span class="k">endif</span> </span><span id="L-230"><a name="L-230"></a> exec <span class="s2">&quot;normal \&lt;C-W&gt;p&quot;</span> . move . <span class="s2">&quot;\&lt;C-W&gt;p&quot;</span> </span><span id="L-231"><a name="L-231"></a><span class="k">endfun</span> </span><span id="L-232"><a name="L-232"></a>nmap <span class="p">&lt;</span><span class="k">silent</span><span class="p">&gt;</span> <span class="p">&lt;</span>M<span class="p">-</span>Down<span class="p">&gt;</span> :<span class="k">call</span> ScrollOtherWindow<span class="p">(</span><span class="s2">&quot;down&quot;</span><span class="p">)&lt;</span>CR<span class="p">&gt;</span> </span><span id="L-233"><a name="L-233"></a>nmap <span class="p">&lt;</span><span class="k">silent</span><span class="p">&gt;</span> <span class="p">&lt;</span>M<span class="p">-</span>Up<span class="p">&gt;</span> :<span class="k">call</span> ScrollOtherWindow<span class="p">(</span><span class="s2">&quot;up&quot;</span><span class="p">)&lt;</span>CR<span class="p">&gt;</span> </span><span id="L-234"><a name="L-234"></a> </span><span id="L-235"><a name="L-235"></a><span class="k">set</span> <span class="nb">foldlevel</span><span class="p">=</span><span class="m">2</span> </span><span id="L-236"><a name="L-236"></a><span class="k">set</span> <span class="nb">vb</span> <span class="nb">t_vb</span><span class="p">=</span> </span><span id="L-237"><a name="L-237"></a><span class="k">set</span> <span class="nb">listchars</span><span class="p">=</span><span class="k">tab</span>:\<span class="p">|</span>\ <span class="p">,</span>extends:<span class="p">&gt;,</span>precedes:<span class="p">&lt;,</span>trail:<span class="p">-,</span>nbsp:% </span><span id="L-238"><a name="L-238"></a><span class="c">&quot; set foldcolumn=2 --&gt; exibe um sinal de mais ao lado dos folder</span> </span><span id="L-239"><a name="L-239"></a> </span><span id="L-240"><a name="L-240"></a><span class="c">&quot; ao rolar a janelas ele manterá uma linha a mais </span> </span><span id="L-241"><a name="L-241"></a><span class="c">&quot; visível na tela, faça um experimento</span> </span><span id="L-242"><a name="L-242"></a><span class="c">&quot; ele manterá as linhas próximas visíveis</span> </span><span id="L-243"><a name="L-243"></a><span class="k">set</span> <span class="nb">scrolloff</span><span class="p">=</span><span class="m">2</span> </span><span id="L-244"><a name="L-244"></a> </span><span id="L-245"><a name="L-245"></a><span class="nb">nnoremap</span> <span class="p">&lt;</span>leader<span class="p">&gt;</span><span class="k">w</span> :<span class="k">set</span> <span class="nb">wrap</span><span class="p">!</span> <span class="nb">wrap</span>?<span class="p">&lt;</span><span class="k">cr</span><span class="p">&gt;</span> </span><span id="L-246"><a name="L-246"></a><span class="c">&quot; mostra +++ no começo de linhas longas sem wrap</span> </span><span id="L-247"><a name="L-247"></a><span class="k">set</span> <span class="nb">showbreak</span><span class="p">=+++</span> </span><span id="L-248"><a name="L-248"></a><span class="nb">nnoremap</span> <span class="p">&lt;</span>leader<span class="p">&gt;</span><span class="k">l</span> :<span class="k">set</span> <span class="nb">list</span><span class="p">!</span> <span class="nb">list</span>?<span class="p">&lt;</span><span class="k">cr</span><span class="p">&gt;</span> </span><span id="L-249"><a name="L-249"></a> </span><span id="L-250"><a name="L-250"></a><span class="c">&quot;:help options linha 4321</span> </span><span id="L-251"><a name="L-251"></a><span class="c">&quot;au BufNewFile,BufRead *.txt source ~/.vim/syntax/txt.vim</span> </span><span id="L-252"><a name="L-252"></a> </span><span id="L-253"><a name="L-253"></a><span class="c">&quot; testa de há modo gráfico</span> </span><span id="L-254"><a name="L-254"></a><span class="k">if</span> &amp;<span class="nb">t_Co</span> <span class="p">&gt;</span> <span class="m">2</span> <span class="p">||</span> has<span class="p">(</span><span class="s2">&quot;gui_running&quot;</span><span class="p">)</span> </span><span id="L-255"><a name="L-255"></a> <span class="nb">syntax</span> <span class="k">on</span> </span><span id="L-256"><a name="L-256"></a> <span class="k">set</span> <span class="nb">hlsearch</span> </span><span id="L-257"><a name="L-257"></a> <span class="k">colorscheme</span> ir_black </span><span id="L-258"><a name="L-258"></a> <span class="k">hi</span> LineNr guifg<span class="p">=</span>pink ctermfg<span class="p">=</span>lightMagenta </span><span id="L-259"><a name="L-259"></a><span class="c"> &quot;hi LineNr guifg=green ctermfg=lightGreen</span> </span><span id="L-260"><a name="L-260"></a><span class="k">endif</span> </span><span id="L-261"><a name="L-261"></a> </span><span id="L-262"><a name="L-262"></a><span class="k">let</span> hr<span class="p">=</span> str2nr<span class="p">(</span>strftime<span class="p">(</span><span class="s2">&quot;%H&quot;</span><span class="p">))</span> </span><span id="L-263"><a name="L-263"></a><span class="k">if</span> <span class="m">0</span> <span class="p">&lt;=</span> hr &amp;&amp; hr <span class="p">&lt;=</span> <span class="m">3</span> </span><span id="L-264"><a name="L-264"></a> <span class="k">colors</span> ir_black </span><span id="L-265"><a name="L-265"></a><span class="k">elseif</span> <span class="m">4</span> <span class="p">&lt;=</span> hr &amp;&amp; hr <span class="p">&lt;=</span> <span class="m">7</span> </span><span id="L-266"><a name="L-266"></a> <span class="k">colors</span> tango<span class="p">-</span>morning </span><span id="L-267"><a name="L-267"></a><span class="k">elseif</span> <span class="m">8</span> <span class="p">&lt;=</span> hr &amp;&amp; hr <span class="p">&lt;=</span> <span class="m">14</span> </span><span id="L-268"><a name="L-268"></a> <span class="k">colors</span> mustang </span><span id="L-269"><a name="L-269"></a><span class="k">elseif</span> <span class="m">15</span> <span class="p">&lt;=</span> hr &amp;&amp; hr <span class="p">&lt;=</span> <span class="m">20</span> </span><span id="L-270"><a name="L-270"></a> <span class="k">colors</span> digerati </span><span id="L-271"><a name="L-271"></a><span class="k">else</span> </span><span id="L-272"><a name="L-272"></a> <span class="k">colors</span> digerati </span><span id="L-273"><a name="L-273"></a><span class="k">endif</span> </span><span id="L-274"><a name="L-274"></a> </span><span id="L-275"><a name="L-275"></a><span class="k">function</span><span class="p">!</span> <span class="p">&lt;</span>SID<span class="p">&gt;</span>SwitchColorSchemes<span class="p">()</span> </span><span id="L-276"><a name="L-276"></a> <span class="k">if</span> exists<span class="p">(</span><span class="s2">&quot;g:colors_name&quot;</span><span class="p">)</span> </span><span id="L-277"><a name="L-277"></a> <span class="k">if</span> <span class="k">g</span>:colors_name <span class="p">==</span> <span class="s1">&#39;google&#39;</span> </span><span id="L-278"><a name="L-278"></a> <span class="k">colorscheme</span> xoria256 </span><span id="L-279"><a name="L-279"></a> <span class="k">elseif</span> <span class="k">g</span>:colors_name <span class="p">==</span> <span class="s1">&#39;xoria256&#39;</span> </span><span id="L-280"><a name="L-280"></a> <span class="k">colorscheme</span> darkbone </span><span id="L-281"><a name="L-281"></a> <span class="k">elseif</span> <span class="k">g</span>:colors_name <span class="p">==</span> <span class="s1">&#39;darkbone&#39;</span> </span><span id="L-282"><a name="L-282"></a> <span class="k">colorscheme</span> colorful </span><span id="L-283"><a name="L-283"></a> <span class="k">elseif</span> <span class="k">g</span>:colors_name <span class="p">==</span> <span class="s1">&#39;colorful&#39;</span> </span><span id="L-284"><a name="L-284"></a> <span class="k">colorscheme</span> zenburn </span><span id="L-285"><a name="L-285"></a> <span class="k">elseif</span> <span class="k">g</span>:colors_name <span class="p">==</span> <span class="s1">&#39;zenburn&#39;</span> </span><span id="L-286"><a name="L-286"></a> <span class="k">colorscheme</span> python </span><span id="L-287"><a name="L-287"></a> <span class="k">elseif</span> <span class="k">g</span>:colors_name <span class="p">==</span> <span class="s1">&#39;python&#39;</span> </span><span id="L-288"><a name="L-288"></a> <span class="k">colorscheme</span> tango<span class="p">-</span>morning </span><span id="L-289"><a name="L-289"></a> <span class="k">elseif</span> <span class="k">g</span>:colors_name <span class="p">==</span> <span class="s1">&#39;tango-morning&#39;</span> </span><span id="L-290"><a name="L-290"></a> <span class="k">colorscheme</span> guepardo </span><span id="L-291"><a name="L-291"></a> <span class="k">elseif</span> <span class="k">g</span>:colors_name <span class="p">==</span> <span class="s1">&#39;guepardo&#39;</span> </span><span id="L-292"><a name="L-292"></a> <span class="k">colorscheme</span> rubyblue </span><span id="L-293"><a name="L-293"></a> <span class="k">elseif</span> <span class="k">g</span>:colors_name <span class="p">==</span> <span class="s1">&#39;rubyblue&#39;</span> </span><span id="L-294"><a name="L-294"></a> <span class="k">colorscheme</span> pacific </span><span id="L-295"><a name="L-295"></a> <span class="k">elseif</span> <span class="k">g</span>:colors_name <span class="p">==</span> <span class="s1">&#39;pacific&#39;</span> </span><span id="L-296"><a name="L-296"></a> <span class="k">colorscheme</span> tango </span><span id="L-297"><a name="L-297"></a> <span class="k">elseif</span> <span class="k">g</span>:colors_name <span class="p">==</span> <span class="s1">&#39;tango&#39;</span> </span><span id="L-298"><a name="L-298"></a> <span class="k">colorscheme</span> softblue </span><span id="L-299"><a name="L-299"></a> <span class="k">elseif</span> <span class="k">g</span>:colors_name <span class="p">==</span> <span class="s1">&#39;softblue&#39;</span> </span><span id="L-300"><a name="L-300"></a> <span class="k">colorscheme</span> vividchalk </span><span id="L-301"><a name="L-301"></a> <span class="k">elseif</span> <span class="k">g</span>:colors_name <span class="p">==</span> <span class="s1">&#39;vividchalk&#39;</span> </span><span id="L-302"><a name="L-302"></a> <span class="k">colorscheme</span> professional </span><span id="L-303"><a name="L-303"></a> <span class="k">elseif</span> <span class="k">g</span>:colors_name <span class="p">==</span> <span class="s1">&#39;professional&#39;</span> </span><span id="L-304"><a name="L-304"></a> <span class="k">colorscheme</span> neverness </span><span id="L-305"><a name="L-305"></a> <span class="k">elseif</span> <span class="k">g</span>:colors_name <span class="p">==</span> <span class="s1">&#39;neverness&#39;</span> </span><span id="L-306"><a name="L-306"></a> <span class="k">colorscheme</span> mustang </span><span id="L-307"><a name="L-307"></a> <span class="k">elseif</span> <span class="k">g</span>:colors_name <span class="p">==</span> <span class="s1">&#39;mustang&#39;</span> </span><span id="L-308"><a name="L-308"></a> <span class="k">colorscheme</span> underwater<span class="p">-</span><span class="k">mod</span> </span><span id="L-309"><a name="L-309"></a> <span class="k">elseif</span> <span class="k">g</span>:colors_name <span class="p">==</span> <span class="s1">&#39;underwater-mod&#39;</span> </span><span id="L-310"><a name="L-310"></a> <span class="k">colorscheme</span> whitebox </span><span id="L-311"><a name="L-311"></a> <span class="k">elseif</span> <span class="k">g</span>:colors_name <span class="p">==</span> <span class="s1">&#39;whitebox&#39;</span> </span><span id="L-312"><a name="L-312"></a> <span class="k">colorscheme</span> summerfruit </span><span id="L-313"><a name="L-313"></a> <span class="k">elseif</span> <span class="k">g</span>:colors_name <span class="p">==</span> <span class="s1">&#39;summerfruit&#39;</span> </span><span id="L-314"><a name="L-314"></a> <span class="k">colorscheme</span> maroloccio </span><span id="L-315"><a name="L-315"></a> <span class="k">elseif</span> <span class="k">g</span>:colors_name <span class="p">==</span> <span class="s1">&#39;maroloccio&#39;</span> </span><span id="L-316"><a name="L-316"></a> <span class="k">colorscheme</span> wombat </span><span id="L-317"><a name="L-317"></a> <span class="k">elseif</span> <span class="k">g</span>:colors_name <span class="p">==</span> <span class="s1">&#39;wombat&#39;</span> </span><span id="L-318"><a name="L-318"></a> <span class="k">colorscheme</span> chrysoprase </span><span id="L-319"><a name="L-319"></a> <span class="k">elseif</span> <span class="k">g</span>:colors_name <span class="p">==</span> <span class="s1">&#39;chrysoprase&#39;</span> </span><span id="L-320"><a name="L-320"></a> <span class="k">colorscheme</span> quagmire </span><span id="L-321"><a name="L-321"></a> <span class="k">elseif</span> <span class="k">g</span>:colors_name <span class="p">==</span> <span class="s1">&#39;quagmire&#39;</span> </span><span id="L-322"><a name="L-322"></a> <span class="k">colorscheme</span> digerati </span><span id="L-323"><a name="L-323"></a> <span class="k">elseif</span> <span class="k">g</span>:colors_name <span class="p">==</span> <span class="s1">&#39;digerati&#39;</span> </span><span id="L-324"><a name="L-324"></a> <span class="k">colorscheme</span> vylight </span><span id="L-325"><a name="L-325"></a> <span class="k">elseif</span> <span class="k">g</span>:colors_name <span class="p">==</span> <span class="s1">&#39;vylight&#39;</span> </span><span id="L-326"><a name="L-326"></a> <span class="k">colorscheme</span> vitamins </span><span id="L-327"><a name="L-327"></a> <span class="k">elseif</span> <span class="k">g</span>:colors_name <span class="p">==</span> <span class="s1">&#39;vitamins&#39;</span> </span><span id="L-328"><a name="L-328"></a> <span class="k">colorscheme</span> rdark </span><span id="L-329"><a name="L-329"></a> <span class="k">elseif</span> <span class="k">g</span>:colors_name <span class="p">==</span> <span class="s1">&#39;rdark&#39;</span> </span><span id="L-330"><a name="L-330"></a> <span class="k">colorscheme</span> eclm_wombat </span><span id="L-331"><a name="L-331"></a> <span class="k">elseif</span> <span class="k">g</span>:colors_name <span class="p">==</span> <span class="s1">&#39;eclm_wombat&#39;</span> </span><span id="L-332"><a name="L-332"></a> <span class="k">colorscheme</span> native </span><span id="L-333"><a name="L-333"></a> <span class="k">elseif</span> <span class="k">g</span>:colors_name <span class="p">==</span> <span class="s1">&#39;native&#39;</span> </span><span id="L-334"><a name="L-334"></a> <span class="k">colorscheme</span> inkpot </span><span id="L-335"><a name="L-335"></a> <span class="k">elseif</span> <span class="k">g</span>:colors_name <span class="p">==</span> <span class="s1">&#39;inkpot&#39;</span> </span><span id="L-336"><a name="L-336"></a> <span class="k">colorscheme</span> vibrantink </span><span id="L-337"><a name="L-337"></a> <span class="k">elseif</span> <span class="k">g</span>:colors_name <span class="p">==</span> <span class="s1">&#39;vibrantink&#39;</span> </span><span id="L-338"><a name="L-338"></a> <span class="k">colorscheme</span> ir_black </span><span id="L-339"><a name="L-339"></a> <span class="k">elseif</span> <span class="k">g</span>:colors_name <span class="p">==</span> <span class="s1">&#39;ir_black&#39;</span> </span><span id="L-340"><a name="L-340"></a> <span class="k">colorscheme</span> google </span><span id="L-341"><a name="L-341"></a> <span class="k">endif</span> </span><span id="L-342"><a name="L-342"></a> <span class="k">endif</span> </span><span id="L-343"><a name="L-343"></a><span class="k">endfunction</span> </span><span id="L-344"><a name="L-344"></a><span class="c">&quot;map &lt;silent&gt; &lt;F6&gt; :call &lt;SID&gt;SwitchColorSchemes()&lt;CR&gt; &lt;BAR&gt; :set t_Co=256 &lt;BAR&gt; :echo g:colors_name&lt;cr&gt;</span> </span><span id="L-345"><a name="L-345"></a>map <span class="p">&lt;</span><span class="k">silent</span><span class="p">&gt;</span> <span class="p">&lt;</span>F6<span class="p">&gt;</span> <span class="p">&lt;</span>esc<span class="p">&gt;</span>:<span class="k">call</span> <span class="p">&lt;</span>SID<span class="p">&gt;</span>SwitchColorSchemes<span class="p">()&lt;</span>CR<span class="p">&gt;&lt;</span>bar<span class="p">&gt;</span>:echo <span class="k">g</span>:colors_name<span class="p">&lt;</span><span class="k">cr</span><span class="p">&gt;</span> </span><span id="L-346"><a name="L-346"></a> </span><span id="L-347"><a name="L-347"></a><span class="k">set</span> <span class="nb">anti</span> <span class="nb">gfn</span><span class="p">=</span>Inconsolata\ <span class="m">12</span><span class="p">,</span>\ Envy\ Code\ R\ <span class="m">10</span> </span><span id="L-348"><a name="L-348"></a><span class="c">&quot;set anti gfn=BPmono\ 11</span> </span><span id="L-349"><a name="L-349"></a><span class="c">&quot;set anti gfn=Inconsolata\ 13</span> </span><span id="L-350"><a name="L-350"></a><span class="c">&quot;set anti gfn=Pragmata\ 10,Monaco\ 9,\ Envy\ Code\ R\ 10</span> </span><span id="L-351"><a name="L-351"></a><span class="c">&quot;set anti gfn=Liberation\ Mono\ 9</span> </span><span id="L-352"><a name="L-352"></a><span class="c">&quot;set guifont=Bitstream\ Vera\ Sans\ Mono\ 9</span> </span><span id="L-353"><a name="L-353"></a> </span><span id="L-354"><a name="L-354"></a><span class="c">&quot;set ve=all</span> </span><span id="L-355"><a name="L-355"></a><span class="c">&quot; cura para acesso remoto</span> </span><span id="L-356"><a name="L-356"></a><span class="k">set</span> <span class="nb">et</span> </span><span id="L-357"><a name="L-357"></a><span class="k">set</span> <span class="nb">notimeout</span> </span><span id="L-358"><a name="L-358"></a><span class="k">set</span> <span class="nb">ttimeout</span> </span><span id="L-359"><a name="L-359"></a><span class="k">set</span> <span class="nb">timeoutlen</span><span class="p">=</span><span class="m">100</span> </span><span id="L-360"><a name="L-360"></a><span class="k">set</span> <span class="nb">autowrite</span> <span class="c">&quot; salvamento automático</span> </span><span id="L-361"><a name="L-361"></a><span class="k">set</span> <span class="nb">shiftwidth</span><span class="p">=</span><span class="m">4</span> </span><span id="L-362"><a name="L-362"></a><span class="k">set</span> <span class="nb">softtabstop</span><span class="p">=</span><span class="m">4</span> </span><span id="L-363"><a name="L-363"></a><span class="k">set</span> <span class="nb">viminfo</span><span class="p">=</span>%<span class="p">,</span>&#39;<span class="m">50</span><span class="p">,</span>\&quot;<span class="m">100</span><span class="p">,</span>/<span class="m">100</span><span class="p">,</span>:<span class="m">100</span><span class="p">,</span><span class="k">n</span> </span><span id="L-364"><a name="L-364"></a><span class="k">set</span> <span class="nb">undolevels</span><span class="p">=</span><span class="m">1000</span> <span class="c">&quot; undoing 1000 changes should be enough :-)</span> </span><span id="L-365"><a name="L-365"></a><span class="k">set</span> <span class="nb">updatecount</span><span class="p">=</span><span class="m">100</span> <span class="c">&quot; write swap file to disk after each 20 characters</span> </span><span id="L-366"><a name="L-366"></a><span class="k">set</span> <span class="nb">updatetime</span><span class="p">=</span><span class="m">6000</span> <span class="c">&quot; write swap file to disk after 6 inactive seconds</span> </span><span id="L-367"><a name="L-367"></a><span class="k">set</span> <span class="nb">noerrorbells</span> <span class="c">&quot; don&#39;t make noise</span> </span><span id="L-368"><a name="L-368"></a><span class="k">set</span> <span class="nb">incsearch</span> <span class="c">&quot; habilita busca incremental</span> </span><span id="L-369"><a name="L-369"></a><span class="k">set</span> <span class="k">ts</span><span class="p">=</span><span class="m">4</span> <span class="c">&quot; Paradas de tabulação com 4 espaços</span> </span><span id="L-370"><a name="L-370"></a><span class="k">set</span> <span class="nb">nocompatible</span> </span><span id="L-371"><a name="L-371"></a><span class="k">set</span> <span class="nb">ignorecase</span> </span><span id="L-372"><a name="L-372"></a><span class="k">set</span> <span class="nb">smartcase</span> <span class="c">&quot;Se começar uma busca em maiúsculo ele habilita o case</span> </span><span id="L-373"><a name="L-373"></a><span class="k">set</span> <span class="nb">expandtab</span> </span><span id="L-374"><a name="L-374"></a><span class="k">set</span> <span class="nb">smarttab</span> </span><span id="L-375"><a name="L-375"></a><span class="k">set</span> <span class="nb">noerrorbells</span> </span><span id="L-376"><a name="L-376"></a><span class="k">set</span> <span class="nb">visualbell</span> </span><span id="L-377"><a name="L-377"></a><span class="k">set</span> <span class="k">nu</span> <span class="nb">ai</span> <span class="k">sm</span> <span class="nb">js</span> </span><span id="L-378"><a name="L-378"></a><span class="k">set</span> <span class="nb">showcmd</span> <span class="nb">showmode</span> </span><span id="L-379"><a name="L-379"></a><span class="c">&quot;set showmatch</span> </span><span id="L-380"><a name="L-380"></a><span class="k">set</span> <span class="nb">ruler</span> </span><span id="L-381"><a name="L-381"></a><span class="k">set</span> <span class="nb">hls</span> </span><span id="L-382"><a name="L-382"></a><span class="k">set</span> <span class="k">ts</span><span class="p">=</span><span class="m">4</span> </span><span id="L-383"><a name="L-383"></a><span class="k">set</span> <span class="nb">backup</span> </span><span id="L-384"><a name="L-384"></a><span class="k">set</span> <span class="nb">backupdir</span><span class="p">=~</span><span class="sr">/.backup,~/</span>tmp<span class="p">,</span>.<span class="p">,</span>/tmp </span><span id="L-385"><a name="L-385"></a><span class="k">set</span> <span class="nb">backupext</span><span class="p">=</span>.<span class="nb">backup</span> </span><span id="L-386"><a name="L-386"></a><span class="k">set</span> <span class="nb">mousemodel</span><span class="p">=</span><span class="k">popup</span> </span><span id="L-387"><a name="L-387"></a><span class="k">set</span> <span class="nb">mouse</span><span class="p">=</span>nvc </span><span id="L-388"><a name="L-388"></a><span class="k">set</span> <span class="nb">ttyfast</span> </span><span id="L-389"><a name="L-389"></a> </span><span id="L-390"><a name="L-390"></a><span class="c">&quot; Uppercase first letter of sentences</span> </span><span id="L-391"><a name="L-391"></a><span class="c">&quot;:%s/[.!?]\_s\+\a/\U&amp;\E/g</span> </span><span id="L-392"><a name="L-392"></a> </span><span id="L-393"><a name="L-393"></a><span class="c">&quot; Define o número de linhas deslocadas com os comandos</span> </span><span id="L-394"><a name="L-394"></a><span class="c">&quot; ^U (Ctrl+U) e ^D (Ctrl+D)</span> </span><span id="L-395"><a name="L-395"></a><span class="k">setlocal</span> <span class="nb">scroll</span><span class="p">=</span><span class="m">2</span> </span><span id="L-396"><a name="L-396"></a> </span><span id="L-397"><a name="L-397"></a><span class="k">syn</span> <span class="k">match</span> ipaddr <span class="sr">/\(\(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]\?\)/</span> </span><span id="L-398"><a name="L-398"></a><span class="k">hi</span> link ipaddr Identifier </span><span id="L-399"><a name="L-399"></a> </span><span id="L-400"><a name="L-400"></a><span class="c">&quot;validador de e-mail (observe que estou buscando no começo da linha)</span> </span><span id="L-401"><a name="L-401"></a><span class="c">&quot; ^\&lt;[^ @][A-Za-z0-9_.-]\[email protected]\([A-Za-z0-9_-]\+\.\)\+[A-Za-z]\{2,4}\&gt;\(?[A-Za-z0-9%&amp;=+.,@*_-]\+\)\=</span> </span><span id="L-402"><a name="L-402"></a> </span><span id="L-403"><a name="L-403"></a>map <span class="p">,</span><span class="k">d</span> <span class="p">&lt;</span>esc<span class="p">&gt;</span>my:%s<span class="sr">/\(^\n\{2,}\)/</span>\<span class="k">r</span>/<span class="k">g</span><span class="p">&lt;</span><span class="k">cr</span><span class="p">&gt;</span>`<span class="k">y</span> </span><span id="L-404"><a name="L-404"></a>nno <span class="p">&lt;</span>S<span class="p">-</span>F11<span class="p">&gt;</span> <span class="p">&lt;</span>esc<span class="p">&gt;</span>:<span class="k">set</span> <span class="nb">hls</span><span class="p">!</span> <span class="nb">hls</span>?<span class="p">&lt;</span><span class="k">cr</span><span class="p">&gt;</span> </span><span id="L-405"><a name="L-405"></a> </span><span id="L-406"><a name="L-406"></a><span class="c">&quot; Para inserir o simbolo use ^v ^M ou ^v Enter</span> </span><span id="L-407"><a name="L-407"></a><span class="k">if</span> has<span class="p">(</span><span class="s2">&quot;user_commands&quot;</span><span class="p">)</span> </span><span id="L-408"><a name="L-408"></a><span class="c"> &quot; remove from the file</span> </span><span id="L-409"><a name="L-409"></a> <span class="k">com</span><span class="p">!</span> RemoveCtrlM :%s<span class="sr">/\%x0d/</span>\<span class="k">r</span>/<span class="k">g</span> </span><span id="L-410"><a name="L-410"></a><span class="c"> &quot; change to directory of current file</span> </span><span id="L-411"><a name="L-411"></a> <span class="k">com</span><span class="p">!</span> CD <span class="k">cd</span> %:<span class="k">p</span>:<span class="k">h</span> </span><span id="L-412"><a name="L-412"></a><span class="k">endif</span> </span><span id="L-413"><a name="L-413"></a> </span><span id="L-414"><a name="L-414"></a><span class="c">&quot; o atalho &lt;leader&gt;m já está mapeado para FuzzyFinderMruFile</span> </span><span id="L-415"><a name="L-415"></a><span class="c">&quot;noremap &lt;Leader&gt;m mmHmt:%s/&lt;C-V&gt;&lt;cr&gt;//ge&lt;cr&gt;&#39;tzt&#39;m</span> </span><span id="L-416"><a name="L-416"></a><span class="c">&quot; no caso do sed faça:</span> </span><span id="L-417"><a name="L-417"></a><span class="c">&quot;sed -i &#39;s/\x0D$//&#39; *</span> </span><span id="L-418"><a name="L-418"></a><span class="c">&quot; Para apagar caracteres de final de linha do DOS manualmente faça:</span> </span><span id="L-419"><a name="L-419"></a><span class="c">&quot;:%s/\%x0d//g</span> </span><span id="L-420"><a name="L-420"></a> </span><span id="L-421"><a name="L-421"></a><span class="c">&quot; plugin potwiki</span> </span><span id="L-422"><a name="L-422"></a><span class="c">&quot; leia: http://sergioaraujo.pbwiki.com/potwiki</span> </span><span id="L-423"><a name="L-423"></a><span class="k">au</span> Filetype potwiki <span class="k">set</span> <span class="k">sts</span><span class="p">=</span><span class="m">4</span> </span><span id="L-424"><a name="L-424"></a><span class="nb">highlight</span> PotwikiWord guifg<span class="p">=</span>darkcyan </span><span id="L-425"><a name="L-425"></a><span class="nb">highlight</span> PotwikiWordNotFound guibg<span class="p">=</span>Red guifg<span class="p">=</span>Yellow </span><span id="L-426"><a name="L-426"></a> </span><span id="L-427"><a name="L-427"></a><span class="c">&quot; snippets</span> </span><span id="L-428"><a name="L-428"></a><span class="k">let</span> <span class="k">g</span>:snips_author <span class="p">=</span> <span class="s1">&#39;Sérgio Luiz Araújo Silva&#39;</span> </span><span id="L-429"><a name="L-429"></a><span class="c">&quot; para exibir os snippets disponíveis (inserção) &lt;c-r&gt;&lt;tab&gt; </span> </span><span id="L-430"><a name="L-430"></a> </span><span id="L-431"><a name="L-431"></a><span class="c">&quot;let snippetsEmy_key = &quot;&lt;C-Space&gt;&quot;</span> </span><span id="L-432"><a name="L-432"></a> </span><span id="L-433"><a name="L-433"></a><span class="c">&quot; place holders snippets</span> </span><span id="L-434"><a name="L-434"></a><span class="c">&quot; File Templates</span> </span><span id="L-435"><a name="L-435"></a><span class="c">&quot; --------------</span> </span><span id="L-436"><a name="L-436"></a><span class="c">&quot; ^J jumps to the next marker</span> </span><span id="L-437"><a name="L-437"></a><span class="c">&quot; iabbr &lt;buffer&gt; for for &lt;+i+&gt; in &lt;+intervalo+&gt;:&lt;cr&gt;&lt;tab&gt;&lt;+i+&gt;</span> </span><span id="L-438"><a name="L-438"></a><span class="k">function</span><span class="p">!</span> LoadFileTemplate<span class="p">()</span> </span><span id="L-439"><a name="L-439"></a><span class="c"> &quot;silent! 0r ~/.vim/templates/%:e.tmpl</span> </span><span id="L-440"><a name="L-440"></a> <span class="k">syn</span> <span class="k">match</span> vimTemplateMarker <span class="s2">&quot;&lt;+.\++&gt;&quot;</span> containedin<span class="p">=</span>ALL </span><span id="L-441"><a name="L-441"></a> <span class="k">hi</span> vimTemplateMarker guifg<span class="p">=</span><span class="mh">#67a42c</span> guibg<span class="p">=</span><span class="mh">#112300</span> <span class="k">gui</span><span class="p">=</span><span class="nb">bold</span> </span><span id="L-442"><a name="L-442"></a><span class="k">endfunction</span> </span><span id="L-443"><a name="L-443"></a><span class="k">function</span><span class="p">!</span> JumpToNextPlaceholder<span class="p">()</span> </span><span id="L-444"><a name="L-444"></a> <span class="k">let</span> old_query <span class="p">=</span> getreg<span class="p">(</span><span class="s1">&#39;/&#39;</span><span class="p">)</span> </span><span id="L-445"><a name="L-445"></a> echo search<span class="p">(</span><span class="s2">&quot;&lt;+.\\++&gt;&quot;</span><span class="p">)</span> </span><span id="L-446"><a name="L-446"></a> exec <span class="s2">&quot;norm! c/+&gt;/e\&lt;CR&gt;&quot;</span> </span><span id="L-447"><a name="L-447"></a> <span class="k">call</span> setreg<span class="p">(</span><span class="s1">&#39;/&#39;</span><span class="p">,</span> old_query<span class="p">)</span> </span><span id="L-448"><a name="L-448"></a><span class="k">endfunction</span> </span><span id="L-449"><a name="L-449"></a>autocmd <span class="nb">BufNewFile</span> * :<span class="k">call</span> LoadFileTemplate<span class="p">()</span> </span><span id="L-450"><a name="L-450"></a><span class="nb">nnoremap</span> <span class="p">&lt;</span>C<span class="p">-</span>J<span class="p">&gt;</span> :<span class="k">call</span> JumpToNextPlaceholder<span class="p">()&lt;</span>CR<span class="p">&gt;</span><span class="k">a</span> </span><span id="L-451"><a name="L-451"></a><span class="nb">inoremap</span> <span class="p">&lt;</span>C<span class="p">-</span>J<span class="p">&gt;</span> <span class="p">&lt;</span>ESC<span class="p">&gt;</span>:<span class="k">call</span> JumpToNextPlaceholder<span class="p">()&lt;</span>CR<span class="p">&gt;</span><span class="k">a</span> </span><span id="L-452"><a name="L-452"></a><span class="c">&quot;</span> </span><span id="L-453"><a name="L-453"></a> </span><span id="L-454"><a name="L-454"></a><span class="c">&quot; http://aurelio.net/doc/vim/txt.vim coloque em ~/.vim/syntax</span> </span><span id="L-455"><a name="L-455"></a><span class="k">au</span> <span class="nb">BufNewFile</span><span class="p">,</span><span class="nb">BufRead</span> *.txt source <span class="p">~</span><span class="sr">/.vim/</span><span class="nb">syntax</span>/txt.<span class="k">vim</span> </span><span id="L-456"><a name="L-456"></a> </span><span id="L-457"><a name="L-457"></a><span class="c">&quot; CTRL-X CTRL-F file names</span> </span><span id="L-458"><a name="L-458"></a><span class="c">&quot; CTRL-X CTRL-L whole lines</span> </span><span id="L-459"><a name="L-459"></a><span class="c">&quot; CTRL-X CTRL-D macro definitions (also in included files)</span> </span><span id="L-460"><a name="L-460"></a><span class="c">&quot; CTRL-X CTRL-I current and included files</span> </span><span id="L-461"><a name="L-461"></a><span class="c">&quot; CTRL-X CTRL-K words from a dictionary</span> </span><span id="L-462"><a name="L-462"></a><span class="c">&quot; CTRL-X CTRL-T words from a thesaurus</span> </span><span id="L-463"><a name="L-463"></a><span class="c">&quot; CTRL-X CTRL-] tags</span> </span><span id="L-464"><a name="L-464"></a><span class="c">&quot; CTRL-X CTRL-V Vim command line</span> </span><span id="L-465"><a name="L-465"></a><span class="c">&quot; CTRL-X CTRL-O códigos</span> </span><span id="L-466"><a name="L-466"></a> </span><span id="L-467"><a name="L-467"></a><span class="k">au</span> <span class="nb">FileType</span> * exe<span class="p">(</span><span class="s1">&#39;setl dict+=&#39;</span>.$VIMRUNTIME.<span class="s1">&#39;/syntax/&#39;</span>.&amp;<span class="k">filetype</span>.<span class="s1">&#39;.vim&#39;</span><span class="p">)</span> </span><span id="L-468"><a name="L-468"></a> </span><span id="L-469"><a name="L-469"></a><span class="c">&quot; numerar linhas</span> </span><span id="L-470"><a name="L-470"></a><span class="c">&quot;:let i=1 | g/^/s//\=i.&quot;\t&quot;/ | let i=i+1</span> </span><span id="L-471"><a name="L-471"></a>map <span class="p">,</span><span class="k">n</span> <span class="p">&lt;</span>esc<span class="p">&gt;</span>:<span class="k">let</span> <span class="k">i</span><span class="p">=</span><span class="m">1</span> <span class="p">&lt;</span>bar<span class="p">&gt;</span> <span class="k">g</span><span class="sr">/^/</span>s<span class="sr">//</span>\<span class="p">=</span><span class="k">i</span>.<span class="s2">&quot;\t&quot;</span>/ <span class="p">&lt;</span>bar<span class="p">&gt;</span> <span class="k">let</span> <span class="k">i</span><span class="p">=</span><span class="k">i</span><span class="p">+</span><span class="m">1</span><span class="p">&lt;</span><span class="k">cr</span><span class="p">&gt;</span> </span><span id="L-472"><a name="L-472"></a>map <span class="p">&lt;</span>F2<span class="p">&gt;</span> <span class="p">&lt;</span>esc<span class="p">&gt;</span>:NERDTreeToggle<span class="p">&lt;</span><span class="k">cr</span><span class="p">&gt;</span> </span><span id="L-473"><a name="L-473"></a><span class="nb">nnoremap</span> <span class="p">&lt;</span>F3<span class="p">&gt;</span> :<span class="k">set</span> <span class="nb">invpaste</span> <span class="nb">paste</span>?<span class="p">&lt;</span><span class="k">cr</span><span class="p">&gt;</span> </span><span id="L-474"><a name="L-474"></a><span class="c">&quot;imap &lt;F3&gt; &lt;C-O&gt;&lt;F3&gt;&lt;cr&gt;&lt;cr&gt;</span> </span><span id="L-475"><a name="L-475"></a>imap <span class="p">&lt;</span>F3<span class="p">&gt;</span> <span class="p">&lt;</span>esc<span class="p">&gt;</span>:<span class="k">set</span> <span class="nb">invpaste</span> <span class="nb">paste</span>?<span class="p">&lt;</span><span class="k">cr</span><span class="p">&gt;</span><span class="k">a</span><span class="p">&lt;</span><span class="k">cr</span><span class="p">&gt;</span> </span><span id="L-476"><a name="L-476"></a><span class="k">set</span> <span class="nb">pastetoggle</span><span class="p">=&lt;</span>F3<span class="p">&gt;</span> </span><span id="L-477"><a name="L-477"></a> </span><span id="L-478"><a name="L-478"></a><span class="c">&quot;usa o tab em modo insert para completar palavras</span> </span><span id="L-479"><a name="L-479"></a><span class="k">function</span><span class="p">!</span> InsertTabWrapper<span class="p">(</span>direction<span class="p">)</span> </span><span id="L-480"><a name="L-480"></a> <span class="k">let</span> <span class="k">col</span> <span class="p">=</span> <span class="k">col</span><span class="p">(</span><span class="s1">&#39;.&#39;</span><span class="p">)</span> <span class="p">-</span> <span class="m">1</span> </span><span id="L-481"><a name="L-481"></a> <span class="k">if</span> <span class="p">!</span><span class="k">col</span> <span class="p">||</span> getline<span class="p">(</span><span class="s1">&#39;.&#39;</span><span class="p">)</span>[<span class="k">col</span> <span class="p">-</span> <span class="m">1</span>] <span class="p">!~</span> <span class="s1">&#39;\k&#39;</span> </span><span id="L-482"><a name="L-482"></a> <span class="k">return</span> <span class="s2">&quot;\&lt;tab&gt;&quot;</span> </span><span id="L-483"><a name="L-483"></a> <span class="k">elseif</span> <span class="s2">&quot;backward&quot;</span> <span class="p">==</span> <span class="k">a</span>:direction </span><span id="L-484"><a name="L-484"></a> <span class="k">return</span> <span class="s2">&quot;\&lt;c-p&gt;&quot;</span> </span><span id="L-485"><a name="L-485"></a> <span class="k">else</span> </span><span id="L-486"><a name="L-486"></a> <span class="k">return</span> <span class="s2">&quot;\&lt;c-n&gt;&quot;</span> </span><span id="L-487"><a name="L-487"></a> <span class="k">endif</span> </span><span id="L-488"><a name="L-488"></a><span class="k">endfunction</span> </span><span id="L-489"><a name="L-489"></a> </span><span id="L-490"><a name="L-490"></a><span class="k">let</span> <span class="k">g</span>:AutoComplPop_CompleteoptPreview <span class="p">=</span> <span class="m">1</span> </span><span id="L-491"><a name="L-491"></a><span class="c">&quot;mapeia para completar comandos e busca com tab</span> </span><span id="L-492"><a name="L-492"></a><span class="c">&quot;cmap &lt;tab&gt; &lt;Plug&gt;CmdlineCompleteForward</span> </span><span id="L-493"><a name="L-493"></a> </span><span id="L-494"><a name="L-494"></a><span class="c">&quot;Fechamento automático de parênteses, chaves e colchetes</span> </span><span id="L-495"><a name="L-495"></a>imap { {}<span class="p">&lt;</span><span class="k">left</span><span class="p">&gt;</span> </span><span id="L-496"><a name="L-496"></a>imap <span class="p">(</span> <span class="p">()&lt;</span><span class="k">left</span><span class="p">&gt;</span> </span><span id="L-497"><a name="L-497"></a>imap [ []<span class="p">&lt;</span><span class="k">left</span><span class="p">&gt;</span> </span><span id="L-498"><a name="L-498"></a><span class="c">&quot; pular fora dos parênteses, colchetes e chaves, mover o cursor</span> </span><span id="L-499"><a name="L-499"></a><span class="c">&quot; no modo de inserção</span> </span><span id="L-500"><a name="L-500"></a>imap <span class="p">&lt;</span><span class="k">c</span><span class="p">-</span><span class="k">l</span><span class="p">&gt;</span> <span class="p">&lt;</span>Esc<span class="p">&gt;&lt;</span><span class="k">right</span><span class="p">&gt;</span><span class="k">a</span> </span><span id="L-501"><a name="L-501"></a> </span><span id="L-502"><a name="L-502"></a><span class="c">&quot;Para ir para a próxima linha usando l ou h</span> </span><span id="L-503"><a name="L-503"></a><span class="k">set</span> <span class="nb">whichwrap</span><span class="p">=</span><span class="k">h</span><span class="p">,</span><span class="k">l</span><span class="p">,~,</span>[<span class="p">,</span>] </span><span id="L-504"><a name="L-504"></a><span class="c">&quot;set matchpairs+=&lt;:&gt;</span> </span><span id="L-505"><a name="L-505"></a><span class="k">filetype</span> plugin indent <span class="k">on</span> </span><span id="L-506"><a name="L-506"></a><span class="k">set</span> <span class="nb">dictionary</span><span class="p">+=</span><span class="sr">/home/</span>sergio<span class="sr">/docs/</span><span class="k">conf</span><span class="sr">/dict/</span>.words.txt </span><span id="L-507"><a name="L-507"></a><span class="k">set</span> <span class="nb">infercase</span> </span><span id="L-508"><a name="L-508"></a><span class="k">set</span> <span class="nb">noequalalways</span> </span><span id="L-509"><a name="L-509"></a><span class="k">set</span> <span class="nb">wildmenu</span> </span><span id="L-510"><a name="L-510"></a><span class="k">set</span> <span class="nb">wildmode</span><span class="p">=</span><span class="nb">list</span>:longest<span class="p">,</span>full </span><span id="L-511"><a name="L-511"></a><span class="nb">inoremap</span> <span class="p">&lt;</span><span class="k">tab</span><span class="p">&gt;</span> <span class="p">&lt;</span><span class="k">c</span><span class="p">-</span><span class="k">r</span><span class="p">&gt;=</span>InsertTabWrapper <span class="p">(</span><span class="s2">&quot;forward&quot;</span><span class="p">)&lt;</span><span class="k">cr</span><span class="p">&gt;</span> </span><span id="L-512"><a name="L-512"></a><span class="nb">inoremap</span> <span class="p">&lt;</span>s<span class="p">-</span><span class="k">tab</span><span class="p">&gt;</span> <span class="p">&lt;</span><span class="k">c</span><span class="p">-</span><span class="k">r</span><span class="p">&gt;=</span>InsertTabWrapper <span class="p">(</span><span class="s2">&quot;backward&quot;</span><span class="p">)&lt;</span><span class="k">cr</span><span class="p">&gt;</span> </span><span id="L-513"><a name="L-513"></a> </span><span id="L-514"><a name="L-514"></a><span class="c">&quot; pydiction</span> </span><span id="L-515"><a name="L-515"></a><span class="c">&quot;if has(&quot;autocmd&quot;)</span> </span><span id="L-516"><a name="L-516"></a><span class="c">&quot; autocmd FileType python set complete+=k/.vim/dict/pydiction isk+=.,(</span> </span><span id="L-517"><a name="L-517"></a><span class="c">&quot;endif &quot; has(&quot;autocmd&quot;) </span> </span><span id="L-518"><a name="L-518"></a> </span><span id="L-519"><a name="L-519"></a><span class="c">&quot;let g:pydiction_location = &#39;vimfiles/ftplugin/pydiction/complete-dict&#39; </span> </span><span id="L-520"><a name="L-520"></a><span class="k">let</span> <span class="k">g</span>:pydiction_location <span class="p">=</span> <span class="s1">&#39;~/.vim/after/ftplugin/pydiction/complete-dict&#39;</span> </span><span id="L-521"><a name="L-521"></a> </span><span id="L-522"><a name="L-522"></a><span class="c">&quot;Complementação de palavras</span> </span><span id="L-523"><a name="L-523"></a><span class="k">if</span> <span class="k">v</span>:version <span class="p">&gt;=</span> <span class="m">700</span> </span><span id="L-524"><a name="L-524"></a> <span class="k">set</span> <span class="nb">completeopt</span><span class="p">+=</span>longest </span><span id="L-525"><a name="L-525"></a> <span class="k">set</span> <span class="nb">completeopt</span><span class="p">=</span>longest<span class="p">,</span>menuone </span><span id="L-526"><a name="L-526"></a> <span class="k">set</span> <span class="k">spell</span> <span class="nb">spelllang</span><span class="p">=</span><span class="nb">pt</span> </span><span id="L-527"><a name="L-527"></a> map <span class="p">&lt;</span><span class="k">silent</span><span class="p">&gt;</span> <span class="p">&lt;</span>C<span class="p">-</span>M<span class="p">-</span><span class="k">i</span><span class="p">&gt;</span> :<span class="k">setlocal</span> <span class="nb">invspell</span><span class="p">&lt;</span>CR<span class="p">&gt;</span> </span><span id="L-528"><a name="L-528"></a> imap <span class="p">&lt;</span><span class="k">silent</span><span class="p">&gt;</span> <span class="p">&lt;</span>C<span class="p">-</span>M<span class="p">-</span><span class="k">i</span><span class="p">&gt;</span> <span class="p">&lt;</span>ESC<span class="p">&gt;</span>:<span class="k">setlocal</span> <span class="nb">invspell</span><span class="p">&lt;</span>CR<span class="p">&gt;</span><span class="k">i</span> </span><span id="L-529"><a name="L-529"></a><span class="k">endif</span> </span><span id="L-530"><a name="L-530"></a> </span><span id="L-531"><a name="L-531"></a><span class="k">setlocal</span> <span class="nb">complete</span><span class="p">=</span>.<span class="p">,</span><span class="k">w</span><span class="p">,</span><span class="k">k</span><span class="p">,</span><span class="k">b</span><span class="p">,</span><span class="k">u</span><span class="p">,</span><span class="k">t</span><span class="p">,</span><span class="k">i</span> </span><span id="L-532"><a name="L-532"></a><span class="k">set</span> <span class="nb">complete</span><span class="p">-=</span><span class="k">k</span> <span class="nb">complete</span><span class="p">+=</span><span class="k">k</span> </span><span id="L-533"><a name="L-533"></a><span class="k">set</span> <span class="nb">nospell</span> <span class="c">&quot; usando &lt;c-i&gt; ativa spell</span> </span><span id="L-534"><a name="L-534"></a><span class="k">set</span> <span class="nb">spellsuggest</span><span class="p">=</span><span class="m">8</span> </span><span id="L-535"><a name="L-535"></a>map <span class="p">&lt;</span>s<span class="p">-</span>F7<span class="p">&gt;</span> <span class="p">&lt;</span>esc<span class="p">&gt;</span>:<span class="k">set</span> <span class="k">spell</span><span class="p">!&lt;</span><span class="k">cr</span><span class="p">&gt;</span> </span><span id="L-536"><a name="L-536"></a> </span><span id="L-537"><a name="L-537"></a><span class="c">&quot; status bar format</span> </span><span id="L-538"><a name="L-538"></a><span class="c">&quot; O trecho abaixo formata a barra de status com algumas opções interessantes!</span> </span><span id="L-539"><a name="L-539"></a><span class="c">&quot; mostra o código ascii do caractere sob o cursor e outras coisas mais</span> </span><span id="L-540"><a name="L-540"></a><span class="k">set</span> <span class="nb">statusline</span><span class="p">=</span>%<span class="p">&lt;</span>%F%<span class="k">h</span>%<span class="k">m</span>%<span class="k">r</span>%<span class="k">h</span>%<span class="k">w</span>%<span class="k">y</span>\ </span><span id="L-541"><a name="L-541"></a> \<span class="nb">ft</span>:%{&amp;<span class="nb">ft</span>}\ </span><span id="L-542"><a name="L-542"></a> \<span class="nb">ff</span>:%{&amp;<span class="nb">ff</span>}\ Modificado:\ </span><span id="L-543"><a name="L-543"></a> \%{strftime<span class="p">(</span>\&quot;%<span class="k">a</span>\ %<span class="k">d</span><span class="sr">/%B/</span>%Y\ </span><span id="L-544"><a name="L-544"></a> \%H:%M:%S\<span class="s2">&quot;,getftime(expand(\&quot;%:p\&quot;</span><span class="p">)))</span>}%<span class="p">=</span>\ </span><span id="L-545"><a name="L-545"></a> \#%<span class="k">n</span>\ \ </span><span id="L-546"><a name="L-546"></a> \LIN:%<span class="m">04</span>l\ COL:%<span class="m">04</span>v\ </span><span id="L-547"><a name="L-547"></a> \TOTAL:%<span class="m">04</span>L\ HEX:%<span class="m">03</span>.<span class="m">3</span>B\ ASCII:%<span class="m">03</span>.<span class="m">3</span>b\ %P </span><span id="L-548"><a name="L-548"></a><span class="k">set</span> <span class="nb">laststatus</span><span class="p">=</span><span class="m">2</span> <span class="c">&quot; Sempre exibe a barra de status</span> </span><span id="L-549"><a name="L-549"></a> </span><span id="L-550"><a name="L-550"></a>nmap <span class="k">n</span> nzz </span><span id="L-551"><a name="L-551"></a>nmap N Nzz </span><span id="L-552"><a name="L-552"></a>nmap * *zz </span><span id="L-553"><a name="L-553"></a>nmap # #zz </span><span id="L-554"><a name="L-554"></a>nmap <span class="k">g</span>* <span class="k">g</span>*zz </span><span id="L-555"><a name="L-555"></a>nmap <span class="k">g</span># <span class="k">g</span>#zz </span><span id="L-556"><a name="L-556"></a> </span><span id="L-557"><a name="L-557"></a><span class="c">&quot; recarregar o vimrc</span> </span><span id="L-558"><a name="L-558"></a><span class="c">&quot; Source the .vimrc or _vimrc file, depending on system</span> </span><span id="L-559"><a name="L-559"></a><span class="k">if</span> &amp;<span class="nb">term</span> <span class="p">==</span> <span class="s2">&quot;win32&quot;</span> <span class="p">||</span> <span class="s2">&quot;pcterm&quot;</span> <span class="p">||</span> has<span class="p">(</span><span class="s2">&quot;gui_win32&quot;</span><span class="p">)</span> </span><span id="L-560"><a name="L-560"></a> map <span class="p">,</span><span class="k">v</span> :<span class="k">e</span> $HOME/_vimrc<span class="p">&lt;</span>CR<span class="p">&gt;</span> </span><span id="L-561"><a name="L-561"></a> nmap <span class="p">&lt;</span>F12<span class="p">&gt;</span> :<span class="p">&lt;</span>C<span class="p">-</span><span class="k">u</span><span class="p">&gt;</span>source <span class="p">~</span>/_vimrc <span class="p">&lt;</span>BAR<span class="p">&gt;</span> echo <span class="s2">&quot;Vimrc recarregado!&quot;</span><span class="p">&lt;</span>CR<span class="p">&gt;</span> </span><span id="L-562"><a name="L-562"></a><span class="k">else</span> </span><span id="L-563"><a name="L-563"></a> map <span class="p">,</span><span class="k">v</span> :<span class="k">e</span> $HOME/.vimrc<span class="p">&lt;</span>CR<span class="p">&gt;</span> </span><span id="L-564"><a name="L-564"></a> nmap <span class="p">&lt;</span>F12<span class="p">&gt;</span> :<span class="p">&lt;</span>C<span class="p">-</span><span class="k">u</span><span class="p">&gt;</span>source <span class="p">~</span>/.vimrc <span class="p">&lt;</span>BAR<span class="p">&gt;</span> echo <span class="s2">&quot;Vimrc recarregado!&quot;</span><span class="p">&lt;</span>CR<span class="p">&gt;</span> </span><span id="L-565"><a name="L-565"></a><span class="k">endif</span> </span><span id="L-566"><a name="L-566"></a> </span><span id="L-567"><a name="L-567"></a><span class="c">&quot; Highlight redundant whitespace and tabs.</span> </span><span id="L-568"><a name="L-568"></a><span class="nb">highlight</span> RedundantWhitespace ctermbg<span class="p">=</span><span class="k">red</span> guibg<span class="p">=</span><span class="k">red</span> </span><span id="L-569"><a name="L-569"></a><span class="k">match</span> RedundantWhitespace <span class="sr">/\s\+$\| \+\ze\t/</span> </span><span id="L-570"><a name="L-570"></a>map <span class="p">&lt;</span>F7<span class="p">&gt;</span> <span class="p">&lt;</span>esc<span class="p">&gt;</span><span class="k">mz</span>:%s<span class="sr">/\s\+$/</span>/<span class="k">g</span><span class="p">&lt;</span><span class="k">cr</span><span class="p">&gt;</span>`z </span><span id="L-571"><a name="L-571"></a> </span><span id="L-572"><a name="L-572"></a><span class="k">fun</span><span class="p">!</span> LastChange<span class="p">()</span> </span><span id="L-573"><a name="L-573"></a> mark z </span><span id="L-574"><a name="L-574"></a> <span class="k">if</span> getline<span class="p">(</span><span class="m">1</span><span class="p">)</span> <span class="p">=~</span> <span class="s2">&quot;.*Last Change:&quot;</span> <span class="p">||</span> </span><span id="L-575"><a name="L-575"></a> \ getline<span class="p">(</span><span class="m">2</span><span class="p">)</span> <span class="p">=~</span> <span class="s2">&quot;.*Last Change:&quot;</span> <span class="p">||</span> </span><span id="L-576"><a name="L-576"></a> \ getline<span class="p">(</span><span class="m">3</span><span class="p">)</span> <span class="p">=~</span> <span class="s2">&quot;.*Last Change:&quot;</span> <span class="p">||</span> </span><span id="L-577"><a name="L-577"></a> \ getline<span class="p">(</span><span class="m">4</span><span class="p">)</span> <span class="p">=~</span> <span class="s2">&quot;.*Last Change:&quot;</span> <span class="p">||</span> </span><span id="L-578"><a name="L-578"></a> \ getline<span class="p">(</span><span class="m">5</span><span class="p">)</span> <span class="p">=~</span> <span class="s2">&quot;.*Last Change:&quot;</span> </span><span id="L-579"><a name="L-579"></a> exec <span class="s2">&quot;1,5s/\s*Last Change: .*$/Last Change: &quot;</span> . strftime<span class="p">(</span><span class="s2">&quot;%c&quot;</span><span class="p">)</span> . <span class="s2">&quot;/&quot;</span> </span><span id="L-580"><a name="L-580"></a> <span class="k">endif</span> </span><span id="L-581"><a name="L-581"></a> exec <span class="s2">&quot;&#39;z&quot;</span> </span><span id="L-582"><a name="L-582"></a><span class="k">endfun</span> </span><span id="L-583"><a name="L-583"></a> </span><span id="L-584"><a name="L-584"></a>nmap <span class="p">&lt;</span>F9<span class="p">&gt;</span> <span class="p">&lt;</span>esc<span class="p">&gt;</span>:<span class="k">w</span><span class="p">&lt;</span><span class="k">cr</span><span class="p">&gt;</span> </span><span id="L-585"><a name="L-585"></a>imap <span class="p">&lt;</span>F9<span class="p">&gt;</span> <span class="p">&lt;</span>C<span class="p">-</span>O<span class="p">&gt;&lt;</span>C<span class="p">-</span>S<span class="p">&gt;</span> </span><span id="L-586"><a name="L-586"></a> </span><span id="L-587"><a name="L-587"></a><span class="c">&quot; salva com &lt;F5&gt; e altera o time stamp chamando a função</span> </span><span id="L-588"><a name="L-588"></a><span class="c">&quot; LastChange() definina acima</span> </span><span id="L-589"><a name="L-589"></a>map <span class="p">&lt;</span>F5<span class="p">&gt;</span> <span class="p">&lt;</span>esc<span class="p">&gt;</span>:<span class="k">call</span> LastChange<span class="p">()</span> <span class="p">&lt;</span>BAR<span class="p">&gt;</span> <span class="k">w</span><span class="p">&lt;</span><span class="k">cr</span><span class="p">&gt;</span> </span><span id="L-590"><a name="L-590"></a><span class="c">&quot; abre o histórico de comandos</span> </span><span id="L-591"><a name="L-591"></a> </span><span id="L-592"><a name="L-592"></a><span class="c">&quot;ao salvar modificar o change log no começo do arquivo</span> </span><span id="L-593"><a name="L-593"></a>cab <span class="k">wq</span> <span class="k">call</span> LastChange<span class="p">()</span> <span class="p">&lt;</span>BAR<span class="p">&gt;</span> <span class="k">wq</span><span class="p">&lt;</span><span class="k">cr</span><span class="p">&gt;</span> </span><span id="L-594"><a name="L-594"></a> </span><span id="L-595"><a name="L-595"></a><span class="c">&quot;============ Fim da Data Automática ===================</span> </span><span id="L-596"><a name="L-596"></a> </span><span id="L-597"><a name="L-597"></a><span class="c">&quot; Abreviações</span> </span><span id="L-598"><a name="L-598"></a><span class="c">&quot;</span> </span><span id="L-599"><a name="L-599"></a><span class="c">&quot; Estas linhas sao para não dar erro</span> </span><span id="L-600"><a name="L-600"></a><span class="c">&quot; na hora de salvar arquivos</span> </span><span id="L-601"><a name="L-601"></a>cab W <span class="k">w</span> </span><span id="L-602"><a name="L-602"></a>cab Wq <span class="k">wq</span> </span><span id="L-603"><a name="L-603"></a>cab wQ <span class="k">wq</span> </span><span id="L-604"><a name="L-604"></a>cab WQ <span class="k">wq</span> </span><span id="L-605"><a name="L-605"></a>cab Q <span class="k">q</span> </span><span id="L-606"><a name="L-606"></a> </span><span id="L-607"><a name="L-607"></a>iab tambem também </span><span id="L-608"><a name="L-608"></a>iab teh the </span><span id="L-609"><a name="L-609"></a>iab them then </span><span id="L-610"><a name="L-610"></a>iab latex \LaTeX\ </span><span id="L-611"><a name="L-611"></a>iab <span class="p">,</span><span class="k">m</span> <span class="p">&lt;</span>[email protected]<span class="k">com</span><span class="p">&gt;</span> </span><span id="L-612"><a name="L-612"></a><span class="k">ab</span> <span class="k">slas</span> Sérgio Luiz Araújo Silva </span><span id="L-613"><a name="L-613"></a><span class="k">ab</span> vc você </span><span id="L-614"><a name="L-614"></a>iab teh the </span><span id="L-615"><a name="L-615"></a>iab <span class="k">a</span>. ª </span><span id="L-616"><a name="L-616"></a>iab analize análise </span><span id="L-617"><a name="L-617"></a>iab angulo ângulo </span><span id="L-618"><a name="L-618"></a>iab apos após </span><span id="L-619"><a name="L-619"></a>iab apra <span class="nb">para</span> </span><span id="L-620"><a name="L-620"></a>iab aqeule aquele </span><span id="L-621"><a name="L-621"></a>iab aqiulo aquilo </span><span id="L-622"><a name="L-622"></a>iab arcoíris arco<span class="p">-</span>íris </span><span id="L-623"><a name="L-623"></a>iab aré até </span><span id="L-624"><a name="L-624"></a>iab asim assim </span><span id="L-625"><a name="L-625"></a>iab aspeto aspecto </span><span id="L-626"><a name="L-626"></a>iab assenção ascenção </span><span id="L-627"><a name="L-627"></a>iab assin assim </span><span id="L-628"><a name="L-628"></a>iab assougue açougue </span><span id="L-629"><a name="L-629"></a>iab aue que </span><span id="L-630"><a name="L-630"></a>iab augum algum </span><span id="L-631"><a name="L-631"></a>iab augun algum </span><span id="L-632"><a name="L-632"></a>iab ben bem </span><span id="L-633"><a name="L-633"></a>iab beringela berinjela </span><span id="L-634"><a name="L-634"></a>iab bon bom </span><span id="L-635"><a name="L-635"></a>iab cafe café </span><span id="L-636"><a name="L-636"></a>iab caichote caixote </span><span id="L-637"><a name="L-637"></a>iab capitões capitães </span><span id="L-638"><a name="L-638"></a>iab cidadães cidadãos </span><span id="L-639"><a name="L-639"></a>iab ckaro claro </span><span id="L-640"><a name="L-640"></a>iab cliche clichê </span><span id="L-641"><a name="L-641"></a>iab compreenssão compreensão </span><span id="L-642"><a name="L-642"></a>iab comprensão compreensão </span><span id="L-643"><a name="L-643"></a>iab comun comum </span><span id="L-644"><a name="L-644"></a>iab <span class="k">con</span> <span class="k">com</span> </span><span id="L-645"><a name="L-645"></a>iab contezto contexto </span><span id="L-646"><a name="L-646"></a>iab corrijir corrigir </span><span id="L-647"><a name="L-647"></a>iab coxixar cochichar </span><span id="L-648"><a name="L-648"></a>iab cpm <span class="k">com</span> </span><span id="L-649"><a name="L-649"></a>iab cppara <span class="nb">para</span> </span><span id="L-650"><a name="L-650"></a>iab dai daí </span><span id="L-651"><a name="L-651"></a>iab danca dança </span><span id="L-652"><a name="L-652"></a>iab decer descer </span><span id="L-653"><a name="L-653"></a>iab definitamente definitivamente </span><span id="L-654"><a name="L-654"></a>iab deshonestidade desonestidade </span><span id="L-655"><a name="L-655"></a>iab deshonesto desonesto </span><span id="L-656"><a name="L-656"></a>iab detale detalhe </span><span id="L-657"><a name="L-657"></a>iab deven devem </span><span id="L-658"><a name="L-658"></a>iab díficil difícil </span><span id="L-659"><a name="L-659"></a>iab distingeu distingue </span><span id="L-660"><a name="L-660"></a>iab dsa das </span><span id="L-661"><a name="L-661"></a>iab dze dez </span><span id="L-662"><a name="L-662"></a>iab ecessão exceção </span><span id="L-663"><a name="L-663"></a>iab ecessões exceções </span><span id="L-664"><a name="L-664"></a>iab eentão <span class="k">e</span> então </span><span id="L-665"><a name="L-665"></a>iab emb bem </span><span id="L-666"><a name="L-666"></a>iab ems sem </span><span id="L-667"><a name="L-667"></a>iab emu meu </span><span id="L-668"><a name="L-668"></a>iab <span class="k">en</span> <span class="k">em</span> </span><span id="L-669"><a name="L-669"></a>iab enbora embora </span><span id="L-670"><a name="L-670"></a>iab equ que </span><span id="L-671"><a name="L-671"></a>iab ero erro </span><span id="L-672"><a name="L-672"></a>iab erv <span class="k">ver</span> </span><span id="L-673"><a name="L-673"></a>iab ese esse </span><span id="L-674"><a name="L-674"></a>iab esselência excelência </span><span id="L-675"><a name="L-675"></a>iab esu seu </span><span id="L-676"><a name="L-676"></a>iab excessão exceção </span><span id="L-677"><a name="L-677"></a>iab Excesões exceções </span><span id="L-678"><a name="L-678"></a>iab excurção excursão </span><span id="L-679"><a name="L-679"></a>iab Exenplo exemplo </span><span id="L-680"><a name="L-680"></a>iab exeplo exemplo </span><span id="L-681"><a name="L-681"></a>iab exijência exigência </span><span id="L-682"><a name="L-682"></a>iab exijir exigir </span><span id="L-683"><a name="L-683"></a>iab expontâneo espontâneo </span><span id="L-684"><a name="L-684"></a>iab ezemplo exemplo </span><span id="L-685"><a name="L-685"></a>iab ezercício exercício </span><span id="L-686"><a name="L-686"></a>iab faciu fácil </span><span id="L-687"><a name="L-687"></a>iab fas faz </span><span id="L-688"><a name="L-688"></a>iab fente gente </span><span id="L-689"><a name="L-689"></a>iab ferias férias </span><span id="L-690"><a name="L-690"></a>iab geito jeito </span><span id="L-691"><a name="L-691"></a>iab gibóia jibóia </span><span id="L-692"><a name="L-692"></a>iab gipe jipe </span><span id="L-693"><a name="L-693"></a>iab <span class="k">ha</span> há </span><span id="L-694"><a name="L-694"></a>iab hezitação hesitação </span><span id="L-695"><a name="L-695"></a>iab hezitar hesitar </span><span id="L-696"><a name="L-696"></a>iab http:\\ http: </span><span id="L-697"><a name="L-697"></a>iab iigor igor </span><span id="L-698"><a name="L-698"></a>iab interesado interessado </span><span id="L-699"><a name="L-699"></a>iab interese interesse </span><span id="L-700"><a name="L-700"></a>iab Irria Iria </span><span id="L-701"><a name="L-701"></a>iab isot isto </span><span id="L-702"><a name="L-702"></a>iab ítens itens </span><span id="L-703"><a name="L-703"></a>iab ja já </span><span id="L-704"><a name="L-704"></a>iab jente gente </span><span id="L-705"><a name="L-705"></a>iab linguiça lingüiça </span><span id="L-706"><a name="L-706"></a>iab linux GNU/Linux </span><span id="L-707"><a name="L-707"></a>iab masi mais </span><span id="L-708"><a name="L-708"></a>iab maz mas </span><span id="L-709"><a name="L-709"></a>iab <span class="k">con</span> <span class="k">com</span> </span><span id="L-710"><a name="L-710"></a>iab mema mesma </span><span id="L-711"><a name="L-711"></a>iab <span class="k">mes</span> mês </span><span id="L-712"><a name="L-712"></a>iab muinto muito </span><span id="L-713"><a name="L-713"></a>iab nao não </span><span id="L-714"><a name="L-714"></a>iab nehum nenhum </span><span id="L-715"><a name="L-715"></a>iab nenina menina </span><span id="L-716"><a name="L-716"></a>iab noã não </span><span id="L-717"><a name="L-717"></a>iab no. nº </span><span id="L-718"><a name="L-718"></a>iab N. Nº </span><span id="L-719"><a name="L-719"></a>iab <span class="k">o</span>. º </span><span id="L-720"><a name="L-720"></a>iab obiter obter </span><span id="L-721"><a name="L-721"></a>iab observacao observação </span><span id="L-722"><a name="L-722"></a>iab ons nos </span><span id="L-723"><a name="L-723"></a>iab orijem origem </span><span id="L-724"><a name="L-724"></a>iab ospital hospital </span><span id="L-725"><a name="L-725"></a>iab poden podem </span><span id="L-726"><a name="L-726"></a>iab portugu6es português </span><span id="L-727"><a name="L-727"></a>iab potuguês português </span><span id="L-728"><a name="L-728"></a>iab precisan precisam </span><span id="L-729"><a name="L-729"></a>iab própio próprio </span><span id="L-730"><a name="L-730"></a>iab quado quando </span><span id="L-731"><a name="L-731"></a>iab quiz quis </span><span id="L-732"><a name="L-732"></a>iab recizão rescisão </span><span id="L-733"><a name="L-733"></a>iab sanque sangue </span><span id="L-734"><a name="L-734"></a>iab sao são </span><span id="L-735"><a name="L-735"></a>iab sen sem </span><span id="L-736"><a name="L-736"></a>iab sensivel sensível </span><span id="L-737"><a name="L-737"></a>iab sequéncia seqüência </span><span id="L-738"><a name="L-738"></a>iab significatimente significativam </span><span id="L-739"><a name="L-739"></a>iab sinceranete sinceramente </span><span id="L-740"><a name="L-740"></a>iab sovre sobre </span><span id="L-741"><a name="L-741"></a>iab susseder suceder </span><span id="L-742"><a name="L-742"></a>iab tanbem também </span><span id="L-743"><a name="L-743"></a>iab testo texto </span><span id="L-744"><a name="L-744"></a>iab téxtil têxtil </span><span id="L-745"><a name="L-745"></a>iab tydo tudo </span><span id="L-746"><a name="L-746"></a>iab <span class="k">una</span> uma </span><span id="L-747"><a name="L-747"></a>iab unico único </span><span id="L-748"><a name="L-748"></a>iab utilise utilize </span><span id="L-749"><a name="L-749"></a>iab vega veja </span><span id="L-750"><a name="L-750"></a>iab vivaotux http:<span class="sr">//</span>vivaotux.blogspot.<span class="k">com</span> </span><span id="L-751"><a name="L-751"></a>iab vja veja </span><span id="L-752"><a name="L-752"></a>iab voc6e você </span><span id="L-753"><a name="L-753"></a>iab wue que </span><span id="L-754"><a name="L-754"></a>iab xave chave </span><span id="L-755"><a name="L-755"></a> </span><span id="L-756"><a name="L-756"></a>iab <span class="m">1</span>a. <span class="m">1</span>ª </span><span id="L-757"><a name="L-757"></a>iab <span class="m">2</span>a. <span class="m">2</span>ª </span><span id="L-758"><a name="L-758"></a>iab <span class="m">3</span>a. <span class="m">3</span>ª </span><span id="L-759"><a name="L-759"></a>iab <span class="m">4</span>a. <span class="m">4</span>ª </span><span id="L-760"><a name="L-760"></a>iab <span class="m">5</span>a. <span class="m">5</span>ª </span><span id="L-761"><a name="L-761"></a>iab <span class="m">6</span>a. <span class="m">6</span>ª </span><span id="L-762"><a name="L-762"></a>iab <span class="m">7</span>a. <span class="m">7</span>ª </span><span id="L-763"><a name="L-763"></a>iab <span class="m">8</span>a. <span class="m">8</span>ª </span><span id="L-764"><a name="L-764"></a>iab <span class="m">9</span>a. <span class="m">9</span>ª </span><span id="L-765"><a name="L-765"></a>iab <span class="m">10</span>a. <span class="m">10</span>ª </span><span id="L-766"><a name="L-766"></a>iab <span class="m">11</span>a. <span class="m">11</span>ª </span><span id="L-767"><a name="L-767"></a>iab <span class="m">12</span>a. <span class="m">12</span>ª </span><span id="L-768"><a name="L-768"></a>iab <span class="m">13</span>a. <span class="m">13</span>ª </span><span id="L-769"><a name="L-769"></a>iab <span class="m">14</span>a. <span class="m">14</span>ª </span><span id="L-770"><a name="L-770"></a>iab <span class="m">15</span>a. <span class="m">15</span>ª </span><span id="L-771"><a name="L-771"></a> </span><span id="L-772"><a name="L-772"></a><span class="c">&quot; caso o teclado esteja desconfigurado use:</span> </span><span id="L-773"><a name="L-773"></a><span class="c">&quot;iab &#39;a á</span> </span><span id="L-774"><a name="L-774"></a><span class="c">&quot;iab &#39;A Á</span> </span><span id="L-775"><a name="L-775"></a><span class="c">&quot;iab &#39;e é</span> </span><span id="L-776"><a name="L-776"></a><span class="c">&quot;iab &#39;E É</span> </span><span id="L-777"><a name="L-777"></a><span class="c">&quot;iab &#39;i í</span> </span><span id="L-778"><a name="L-778"></a><span class="c">&quot;iab &#39;I Í</span> </span><span id="L-779"><a name="L-779"></a><span class="c">&quot;iab &#39;o ó</span> </span><span id="L-780"><a name="L-780"></a><span class="c">&quot;iab &#39;O Ó</span> </span><span id="L-781"><a name="L-781"></a><span class="c">&quot;iab ~a ã</span> </span><span id="L-782"><a name="L-782"></a><span class="c">&quot;iab ~A Ã</span> </span><span id="L-783"><a name="L-783"></a><span class="c">&quot;iab ^a â</span> </span><span id="L-784"><a name="L-784"></a><span class="c">&quot;iab ^A Â</span> </span><span id="L-785"><a name="L-785"></a><span class="c">&quot;iab `a à</span> </span><span id="L-786"><a name="L-786"></a><span class="c">&quot;iab `A À</span> </span><span id="L-787"><a name="L-787"></a><span class="c">&quot;iab ,c ç</span> </span><span id="L-788"><a name="L-788"></a><span class="c">&quot;iab ,C Ç</span> </span><span id="L-789"><a name="L-789"></a><span class="c">&quot;iab ^e ê</span> </span><span id="L-790"><a name="L-790"></a><span class="c">&quot;iab ^E Ê</span> </span><span id="L-791"><a name="L-791"></a><span class="c">&quot;iab ^o ô</span> </span><span id="L-792"><a name="L-792"></a><span class="c">&quot;iab ^O Ô</span> </span><span id="L-793"><a name="L-793"></a><span class="c">&quot;iab ~o õ</span> </span><span id="L-794"><a name="L-794"></a><span class="c">&quot;iab ~O Õ</span> </span><span id="L-795"><a name="L-795"></a><span class="c">&quot;iab &#39;u ú</span> </span><span id="L-796"><a name="L-796"></a><span class="c">&quot;iab &#39;U Ú</span> </span><span id="L-797"><a name="L-797"></a> </span><span id="L-798"><a name="L-798"></a><span class="k">if</span> exists<span class="p">(</span><span class="s1">&#39;+autochdir&#39;</span><span class="p">)</span> </span><span id="L-799"><a name="L-799"></a> <span class="k">set</span> <span class="nb">autochdir</span> </span><span id="L-800"><a name="L-800"></a><span class="k">else</span> </span><span id="L-801"><a name="L-801"></a> autocmd <span class="nb">BufEnter</span> * <span class="k">silent</span><span class="p">!</span> <span class="k">lcd</span> %:<span class="k">p</span>:<span class="k">h</span>:gs<span class="sr">/ /</span>\\ / </span><span id="L-802"><a name="L-802"></a><span class="k">endif</span> </span><span id="L-803"><a name="L-803"></a><span class="c">&quot;autocmd BufEnter * lcd %:p:h</span> </span><span id="L-804"><a name="L-804"></a> </span><span id="L-805"><a name="L-805"></a>autocmd <span class="nb">BufReadPost</span> * </span><span id="L-806"><a name="L-806"></a> \ <span class="k">if</span> line<span class="p">(</span><span class="s2">&quot;&#39;\&quot;&quot;</span><span class="p">)</span> <span class="p">&gt;</span> <span class="m">0</span> &amp;&amp; line<span class="p">(</span><span class="s2">&quot;&#39;\&quot;&quot;</span><span class="p">)</span> <span class="p">&lt;=</span> line<span class="p">(</span><span class="s2">&quot;$&quot;</span><span class="p">)</span> <span class="p">|</span> </span><span id="L-807"><a name="L-807"></a> \ exe <span class="s2">&quot;normal g`\&quot;&quot;</span> <span class="p">|</span> </span><span id="L-808"><a name="L-808"></a> \ <span class="k">endif</span> </span><span id="L-809"><a name="L-809"></a> </span><span id="L-810"><a name="L-810"></a><span class="c">&quot; autocomandos para python</span> </span><span id="L-811"><a name="L-811"></a>augroup python </span><span id="L-812"><a name="L-812"></a> <span class="k">au</span><span class="p">!</span> <span class="nb">BufRead</span> *.<span class="k">py</span> <span class="k">set</span> <span class="nb">smartindent</span> <span class="nb">cinwords</span><span class="p">=</span><span class="k">if</span><span class="p">,</span>elif<span class="p">,</span><span class="k">else</span><span class="p">,</span><span class="k">for</span><span class="p">,</span><span class="k">while</span><span class="p">,</span><span class="k">try</span><span class="p">,</span>except<span class="p">,</span><span class="k">finally</span><span class="p">,</span><span class="nb">def</span><span class="p">,</span>class </span><span id="L-813"><a name="L-813"></a> <span class="k">au</span><span class="p">!</span> <span class="nb">BufRead</span><span class="p">,</span>Bufnewfile *.<span class="k">py</span> <span class="nb">im</span> :<span class="p">&lt;</span>CR<span class="p">&gt;</span> :<span class="p">&lt;</span>CR<span class="p">&gt;&lt;</span>TAB<span class="p">&gt;</span> </span><span id="L-814"><a name="L-814"></a><span class="c"> &quot;autocmd FileType python set textwidth=79</span> </span><span id="L-815"><a name="L-815"></a> autocmd <span class="nb">FileType</span> python <span class="k">filetype</span> indent <span class="k">on</span> </span><span id="L-816"><a name="L-816"></a> <span class="k">let</span> python_highlight_all<span class="p">=</span><span class="m">1</span> </span><span id="L-817"><a name="L-817"></a> <span class="k">let</span> python_highlight_builtins<span class="p">=</span><span class="m">0</span> </span><span id="L-818"><a name="L-818"></a> <span class="k">let</span> python_highlight_builtins<span class="p">=</span><span class="m">1</span> </span><span id="L-819"><a name="L-819"></a> <span class="k">let</span> python_highlight_exceptions<span class="p">=</span><span class="m">1</span> </span><span id="L-820"><a name="L-820"></a> <span class="k">let</span> python_highlight_numbers<span class="p">=</span><span class="m">1</span> </span><span id="L-821"><a name="L-821"></a> <span class="k">let</span> python_highlight_space_errors<span class="p">=</span><span class="m">1</span> </span><span id="L-822"><a name="L-822"></a>augroup <span class="k">end</span> </span><span id="L-823"><a name="L-823"></a> </span><span id="L-824"><a name="L-824"></a><span class="c">&quot; setando o path do python</span> </span><span id="L-825"><a name="L-825"></a><span class="k">python</span> <span class="o">&lt;&lt;</span> EOF </span><span id="L-826"><a name="L-826"></a><span class="kn">import</span> <span class="nn">os</span> </span><span id="L-827"><a name="L-827"></a><span class="kn">import</span> <span class="nn">sys</span> </span><span id="L-828"><a name="L-828"></a><span class="kn">import</span> <span class="nn">vim</span> </span><span id="L-829"><a name="L-829"></a><span class="k">for</span> <span class="n">p</span> <span class="ow">in</span> <span class="n">sys</span><span class="o">.</span><span class="n">path</span><span class="p">:</span> </span><span id="L-830"><a name="L-830"></a> <span class="c1"># Add each directory in sys.path, if it exists.</span> </span><span id="L-831"><a name="L-831"></a> <span class="k">if</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">isdir</span><span class="p">(</span><span class="n">p</span><span class="p">):</span> </span><span id="L-832"><a name="L-832"></a> <span class="c1"># Command &#39;set&#39; needs backslash before each space.</span> </span><span id="L-833"><a name="L-833"></a> <span class="n">vim</span><span class="o">.</span><span class="n">command</span><span class="p">(</span><span class="s2">r&quot;set path+=</span><span class="si">%s</span><span class="s2">&quot;</span> <span class="o">%</span> <span class="p">(</span><span class="n">p</span><span class="o">.</span><span class="n">replace</span><span class="p">(</span><span class="s2">&quot; &quot;</span><span class="p">,</span> <span class="s2">r&quot;\ &quot;</span><span class="p">)))</span> </span><span id="L-834"><a name="L-834"></a>EOF </span><span id="L-835"><a name="L-835"></a><span class="c">&quot; fim da seção do path do python </span> </span><span id="L-836"><a name="L-836"></a> </span><span id="L-837"><a name="L-837"></a>augroup html </span><span id="L-838"><a name="L-838"></a><span class="c">&quot; au! &lt;--&gt; Remove all html autocommands</span> </span><span id="L-839"><a name="L-839"></a><span class="k">au</span><span class="p">!</span> </span><span id="L-840"><a name="L-840"></a> <span class="k">au</span> <span class="nb">BufNewFile</span><span class="p">,</span><span class="nb">BufRead</span> *.html<span class="p">,</span>*.shtml<span class="p">,</span>*.htm <span class="k">set</span> <span class="nb">ft</span><span class="p">=</span>html </span><span id="L-841"><a name="L-841"></a><span class="c"> &quot;au BufNewFile,BufRead,BufEnter *.html,*.shtml,*.htm so ~/.vim/skel/skel.html</span> </span><span id="L-842"><a name="L-842"></a> <span class="k">au</span> <span class="nb">BufNewFile</span> *.html <span class="m">0</span>r <span class="p">~</span><span class="sr">/.vim/</span>skel/skel.html </span><span id="L-843"><a name="L-843"></a><span class="c"> &quot;au BufNewFile *.html,*.shtml,*.htm /body/+</span> </span><span id="L-844"><a name="L-844"></a> <span class="k">au</span> <span class="nb">BufNewFile</span><span class="p">,</span><span class="nb">BufRead</span> *.html<span class="p">,</span>*.shtml<span class="p">,</span>*.htm <span class="k">set</span> <span class="nb">noautoindent</span> </span><span id="L-845"><a name="L-845"></a> <span class="k">au</span> <span class="nb">BufNewFile</span><span class="p">,</span><span class="nb">BufRead</span> *.html<span class="p">,</span>*.shtml<span class="p">,</span>*.htm <span class="k">set</span> <span class="nb">nolist</span> </span><span id="L-846"><a name="L-846"></a>augroup <span class="k">end</span> </span><span id="L-847"><a name="L-847"></a>map <span class="p">&lt;</span>M<span class="p">-</span><span class="k">right</span><span class="p">&gt;</span> :<span class="k">wn</span><span class="p">&lt;</span><span class="k">cr</span><span class="p">&gt;</span> </span><span id="L-848"><a name="L-848"></a>map <span class="p">&lt;</span>M<span class="p">-</span><span class="k">left</span><span class="p">&gt;</span> :<span class="k">wp</span><span class="p">&lt;</span><span class="k">cr</span><span class="p">&gt;</span> </span><span id="L-849"><a name="L-849"></a> </span><span id="L-850"><a name="L-850"></a><span class="c">&quot; carregamento do plugin closetag</span> </span><span id="L-851"><a name="L-851"></a><span class="k">au</span> Filetype html<span class="p">,</span>xml<span class="p">,</span>xsl source <span class="p">~</span><span class="sr">/.vim/</span>plugin/closetag.<span class="k">vim</span> </span><span id="L-852"><a name="L-852"></a> </span><span id="L-853"><a name="L-853"></a>augroup css </span><span id="L-854"><a name="L-854"></a> <span class="k">au</span> Bufnewfile<span class="p">,</span><span class="nb">BufRead</span> *.css <span class="k">set</span> <span class="nb">ft</span><span class="p">=</span>css </span><span id="L-855"><a name="L-855"></a> <span class="k">au</span> <span class="nb">BufNewFile</span> *.css <span class="m">0</span>r <span class="p">~</span><span class="sr">/.vim/</span>skel/template.css </span><span id="L-856"><a name="L-856"></a><span class="c"> &quot;autocmd FileType css set omnifunc=csscomplete#CompleteCSS</span> </span><span id="L-857"><a name="L-857"></a>augroup <span class="k">end</span> </span><span id="L-858"><a name="L-858"></a> </span><span id="L-859"><a name="L-859"></a><span class="c">&quot; (window)Define o número de linhas deslocadas com os comandos</span> </span><span id="L-860"><a name="L-860"></a><span class="c">&quot; ^B (Ctrl+B) e ^F (Ctrl+F)</span> </span><span id="L-861"><a name="L-861"></a><span class="k">setlocal</span> <span class="nb">window</span><span class="p">=</span><span class="m">5</span> </span><span id="L-862"><a name="L-862"></a><span class="c">&quot;</span> </span><span id="L-863"><a name="L-863"></a> </span><span id="L-864"><a name="L-864"></a><span class="c">&quot; fazer rolagem no documento</span> </span><span id="L-865"><a name="L-865"></a><span class="c">&quot; tem que estar em modo normal!</span> </span><span id="L-866"><a name="L-866"></a>map <span class="p">&lt;</span>C<span class="p">-</span>Down<span class="p">&gt;</span> <span class="p">&lt;</span><span class="k">c</span><span class="p">-</span><span class="k">d</span><span class="p">&gt;</span> </span><span id="L-867"><a name="L-867"></a>map <span class="p">&lt;</span>C<span class="p">-</span>Up<span class="p">&gt;</span> <span class="p">&lt;</span><span class="k">c</span><span class="p">-</span><span class="k">u</span><span class="p">&gt;</span> </span><span id="L-868"><a name="L-868"></a><span class="c">&quot;</span> </span><span id="L-869"><a name="L-869"></a> </span><span id="L-870"><a name="L-870"></a><span class="c">&quot; define a cor para o menu contextual dos complementos</span> </span><span id="L-871"><a name="L-871"></a><span class="nb">highlight</span> Pmenu ctermbg<span class="p">=</span><span class="m">13</span> guibg<span class="p">=</span>Gray </span><span id="L-872"><a name="L-872"></a><span class="nb">highlight</span> PmenuSel ctermbg<span class="p">=</span><span class="m">7</span> guibg<span class="p">=</span>DarkBlue guifg<span class="p">=</span>White </span><span id="L-873"><a name="L-873"></a><span class="nb">highlight</span> PmenuSbar ctermbg<span class="p">=</span><span class="m">7</span> guibg<span class="p">=</span>DarkGray </span><span id="L-874"><a name="L-874"></a><span class="nb">highlight</span> PmenuThumb guibg<span class="p">=</span>Black </span><span id="L-875"><a name="L-875"></a><span class="c">&quot;</span> </span><span id="L-876"><a name="L-876"></a> </span><span id="L-877"><a name="L-877"></a><span class="c">&quot; MinusculasMaiusculas: converte a primeira letra de cada frase p/MAIUSCULAS</span> </span><span id="L-878"><a name="L-878"></a>map <span class="p">,</span><span class="nb">mm</span> :<span class="k">set</span> <span class="nb">noic</span><span class="p">&lt;</span><span class="k">cr</span><span class="p">&gt;</span> </span><span id="L-879"><a name="L-879"></a> \:%s<span class="sr">/\(\(\([.!?]\s*\\|^\s*\)\n^\\|[.?!-] \)\s*&quot;\?\s*\)\([a-zàáéóú]\)/</span>\<span class="m">1</span>\U\<span class="m">4</span>/<span class="k">g</span><span class="p">&lt;</span><span class="k">cr</span><span class="p">&gt;</span> </span><span id="L-880"><a name="L-880"></a><span class="c">&quot;</span> </span><span id="L-881"><a name="L-881"></a> </span><span id="L-882"><a name="L-882"></a><span class="c">&quot; Coloca em maiúsculo a primeira letra de cada sentença</span> </span><span id="L-883"><a name="L-883"></a>map <span class="p">,</span><span class="k">u</span> :%s<span class="sr">/\([.!?]\)\(\_s\+\)\(\a\)/</span>\<span class="m">1</span>\<span class="m">2</span>\U\<span class="m">3</span>/<span class="k">g</span><span class="p">&lt;</span><span class="k">cr</span><span class="p">&gt;</span> </span><span id="L-884"><a name="L-884"></a><span class="c">&quot;</span> </span><span id="L-885"><a name="L-885"></a> </span><span id="L-886"><a name="L-886"></a><span class="c">&quot; um destaque especial para MinhasNotas</span> </span><span id="L-887"><a name="L-887"></a><span class="nb">highlight</span> MinhasNotas ctermbg<span class="p">=</span>Yellow ctermfg<span class="p">=</span><span class="k">red</span> guibg<span class="p">=</span>Yellow guifg<span class="p">=</span><span class="k">red</span> </span><span id="L-888"><a name="L-888"></a><span class="k">match</span> MinhasNotas <span class="sr">/[Nn]otas\?:\?/</span> </span><span id="L-889"><a name="L-889"></a><span class="c">&quot;</span> </span><span id="L-890"><a name="L-890"></a> </span><span id="L-891"><a name="L-891"></a><span class="c">&quot;Auto formatação para parágrafos</span> </span><span id="L-892"><a name="L-892"></a>map <span class="p">&lt;</span>F8<span class="p">&gt;</span> gqap </span><span id="L-893"><a name="L-893"></a><span class="c">&quot;</span> </span><span id="L-894"><a name="L-894"></a> </span><span id="L-895"><a name="L-895"></a><span class="c">&quot; mapeamento para abrir e fechar folders em modo normal usando</span> </span><span id="L-896"><a name="L-896"></a><span class="c">&quot; a barra de espaços -- zR abre todos os folders</span> </span><span id="L-897"><a name="L-897"></a><span class="nb">nnoremap</span> <span class="p">&lt;</span>space<span class="p">&gt;</span> @<span class="p">=((</span>foldclosed<span class="p">(</span>line<span class="p">(</span><span class="s1">&#39;.&#39;</span><span class="p">))</span> <span class="p">&lt;</span> <span class="m">0</span><span class="p">)</span> ? <span class="s1">&#39;zc&#39;</span> : <span class="s1">&#39;zo&#39;</span><span class="p">)&lt;</span>CR<span class="p">&gt;</span> </span><span id="L-898"><a name="L-898"></a><span class="c">&quot;nmap &lt;space&gt; :</span> </span><span id="L-899"><a name="L-899"></a> </span><span id="L-900"><a name="L-900"></a><span class="c">&quot; o mapeamento abaixo coloca e retira a numeração</span> </span><span id="L-901"><a name="L-901"></a><span class="c">&quot; o sistema alterna a numeração para ativa ou desativada</span> </span><span id="L-902"><a name="L-902"></a>map <span class="p">&lt;</span>F11<span class="p">&gt;</span> <span class="p">&lt;</span>esc<span class="p">&gt;</span>:<span class="k">set</span> <span class="nb">invnu</span><span class="p">&lt;</span><span class="k">cr</span><span class="p">&gt;</span> </span><span id="L-903"><a name="L-903"></a>map <span class="p">&lt;</span>S<span class="p">-</span>F12<span class="p">&gt;</span> <span class="p">&lt;</span>esc<span class="p">&gt;</span>:<span class="k">dig</span><span class="p">&lt;</span><span class="k">cr</span><span class="p">&gt;</span> <span class="c">&quot; mostra os digrafos do tipo Word®</span> </span><span id="L-904"><a name="L-904"></a> </span><span id="L-905"><a name="L-905"></a><span class="c">&quot; for txt, autoformat and wrap text at 70 chars.</span> </span><span id="L-906"><a name="L-906"></a>autocmd <span class="nb">BufNewFile</span><span class="p">,</span><span class="nb">BufRead</span> *.txt <span class="k">set</span> <span class="nb">wrapmargin</span><span class="p">=</span><span class="m">70</span> <span class="nb">textwidth</span><span class="p">=</span><span class="m">70</span> </span><span id="L-907"><a name="L-907"></a> </span><span id="L-908"><a name="L-908"></a>map <span class="p">&lt;</span>BS<span class="p">&gt;</span> X </span><span id="L-909"><a name="L-909"></a><span class="c">&quot; vim:foldmethod=marker:tw=78:ts=3</span> </span></pre></div> </td></tr></table>
gvim, vim