snipt

Ctrl+h for KB shortcuts

VimL

Arquivo .vimrc

   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
 910
 911
 912
 913
 914
 915
 916
 917
 918
 919
 920
 921
 922
 923
 924
 925
 926
 927
 928
 929
 930
 931
 932
 933
 934
 935
 936
 937
 938
 939
 940
 941
 942
 943
 944
 945
 946
 947
 948
 949
 950
 951
 952
 953
 954
 955
 956
 957
 958
 959
 960
 961
 962
 963
 964
 965
 966
 967
 968
 969
 970
 971
 972
 973
 974
 975
 976
 977
 978
 979
 980
 981
 982
 983
 984
 985
 986
 987
 988
 989
 990
 991
 992
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
" ****************************************************************************
" * File: .vimrc                                              
" * Author: J. F. Mitre <jfmitre (at) gmail.com>
" * Url: <URL:http://jfmitre.com, http://notasemcfd.blogspot.com>    
" * Last Update: Qua 03 Jun 2009 15:31:23 BRT
" * Created: Sex 22 Mai 2009 10:01:22 BRT                                
" * Installation: - As dotfile drop the file into your $HOME/ folder.        
" *               - In Command line put $vim -U .vimrc.                      
" * License: GNU General Public License v3
" *          <http://www.gnu.org/licenses/gpl.html>
" * Version: 2.0
" * Notes: Based on the file .vimrc (1.0) made by Ivan Carlos da Silva Lopes 
" *        .vimrc made by Aurelio Marinho Jarga (verde) and                          
" *        .vimrc made by Sérgio Luiz Araújo Silva  (voyeg3r) 
" * 
" ****************************************************************************

" Configuração do Ambiente de Edição {{{
" ----------------------------------------------------------------------------
" Use VIM padrão é muito melhor
" Valores padrão para algumas opções são adequados ao Vim, não Vi.
" ----------------------------------------------------------------------------
   set nocompatible
" ----------------------------------------------------------------------------
" Definindo o bash para o GNU/Linux
" ---------------------------------------------------------------------------- 
   if has("unix")
    let &shell="bash"
    set clipboard=autoselect
   endif   
" ----------------------------------------------------------------------------
" Numerando as linhas do arquivo, isto é, qualquer arquivo carregado é
" Editado com a numeração de linhas ligada
" ----------------------------------------------------------------------------
   set number
" ----------------------------------------------------------------------------
" Permite remover e adicionar o número de linhas
" ----------------------------------------------------------------------------
   map <C-F11> :set nu!<cr>
   imap <C-F11> <Esc>:set nu!<cr>
" ----------------------------------------------------------------------------
" Exibe o modo atual de operações do VI (Inserção ou comandos)
" Mostra o modo que você esta.
" ----------------------------------------------------------------------------
   set showmode
" ----------------------------------------------------------------------------
" Recua cada linha para o mesmo nível da linha superior
" ----------------------------------------------------------------------------
   set autoindent
" ----------------------------------------------------------------------------
" Aqui definimos uma chave para a alternância entre os modos:
"
"  -- INSERT (paste) --          e             -- INSERT --
"
"  O primeiro não segue o padrão de linha indentada enquanto o segundo
"  é o modo normal de trabalho. Digitar <F2> alterna entre os dois modos
" ----------------------------------------------------------------------------
   set pastetoggle=<F2>
" ----------------------------------------------------------------------------
" régua: mostra a posição do cursor
" ----------------------------------------------------------------------------
   set ruler
" ----------------------------------------------------------------------------
" Caso o arquivo seja modificado FORA do vim ele é atualizado DENTRO do vim
" ----------------------------------------------------------------------------
   set autoread
" ----------------------------------------------------------------------------
" tabstop: número de colunas para o comando <TAB>
" A tecla TAB no vim vem padronizada com 8 espaços, sendo assim, quando
" editar um código em c, c++, pascal ou outra linguagem qualquer o texto
" do código torna-se algo meio confuso, principalmente quando o código é
" longo e possui inúmeros escopos. Para tanto, podemos mudar o tamanho do
" TAB, isto é do número de espaços gerados pelo mesmo, utilizando o comando
" 'set tabstop=3' que transforma o tamanho do TAB de 8 para 3.
" ----------------------------------------------------------------------------
   set ts=3
" ----------------------------------------------------------------------------
" Tabs são convertidos para espaços por padrão
" ----------------------------------------------------------------------------
   set expandtab
"  set noexpandtab
" ----------------------------------------------------------------------------
" ShiftWidth: número de colunas deslocadas pelo comando > ou <
" ----------------------------------------------------------------------------
   set sw=3
" ----------------------------------------------------------------------------
" SHortMessages: encurta as mensagem da régua
" ----------------------------------------------------------------------------
"  set shm=filmnrwxt
" ----------------------------------------------------------------------------
" ShowMatch: Toda vez que você fecha um parêntese, colchete
" ou chave, o Vi mostra onde este foi aberto. Caso  não haja
" nenhum aberto para este, deixa em vermelho parênteses ou
" chaves que não têm um par.
" ----------------------------------------------------------------------------
   set sm
" ----------------------------------------------------------------------------
" mostra os comandos sendo executados
" ----------------------------------------------------------------------------
   set showcmd
" ----------------------------------------------------------------------------
" Configurações de filetype
" Check :filetype para status atual 
" ----------------------------------------------------------------------------
   filetype on       
   filetype plugin on
"  filetype indent on
" ----------------------------------------------------------------------------
" reporta ações com linhas no rodapé
" ----------------------------------------------------------------------------
   set report=0
" ----------------------------------------------------------------------------
" Usando <BkSpc> para deletar linha
" ----------------------------------------------------------------------------
   set backspace=eol,start,indent
" ----------------------------------------------------------------------------
" Tecla Backspace volta 4 espaços quando estiver numa indentação.
" ----------------------------------------------------------------------------
   set softtabstop=3
" ----------------------------------------------------------------------------
" Permite mover com as setas para áreas onde não tem texto.
" ----------------------------------------------------------------------------
"  set ve=all
" ----------------------------------------------------------------------------
" (window) Define o número de linhas deslocadas com os comandos
"  ^B (Ctrl+B) e ^F (Ctrl+F)
" ----------------------------------------------------------------------------
   set window=10
" ----------------------------------------------------------------------------
" Define o número de linhas deslocadas com os comandos
" ^U (Ctrl+U) e ^D (Ctrl+D)
" ----------------------------------------------------------------------------
   set scroll=5
" ----------------------------------------------------------------------------
" Em caso de se cometer um comando inválido aciona-se um alarme visual
" visual-bells
" ----------------------------------------------------------------------------
"  set visualbell
" ----------------------------------------------------------------------------
" Em caso de se cometer um comando inválido aciona-se um alarme sonoro
" error-bells
" ----------------------------------------------------------------------------
" Para habilitar
"  set eb
" Para desabilitar
   set noerrorbells
" ----------------------------------------------------------------------------
" Habilita o salvamento automático (parcial ou completo)
" ----------------------------------------------------------------------------
"  set autowrite 
"  set autowriteall
" ----------------------------------------------------------------------------
" Envia mais caracteres ao terminal, melhorando o redraw de janelas.
" ----------------------------------------------------------------------------
   set ttyfast
" ----------------------------------------------------------------------------
" Antes de sobrescrever um arquivo mantém um backup do mesmo
"
" Por exemplo, após salvar um arquivo de nome Alfa.txt, o vim cria uo
" outro arquivo chamado Alfa.txt~ com a configuração anterior do arquivo
" antes do  mesmo ser alterado
" ----------------------------------------------------------------------------
   set bk
" ----------------------------------------------------------------------------
" Usar a pasta pessoal de backup
" É onde será escrito o arquivo *~ 
" Nessa configuração, primeiro usa o diretório ~/.vim/.backup, se não existir
" usa o diretório corrente
" ----------------------------------------------------------------------------
   set backupdir=~/.vim/.backup/,.
" ----------------------------------------------------------------------------
" Habilita a mudança de coluna quando movimenta-se através das linhas
" ----------------------------------------------------------------------------
"  set startofline
" ----------------------------------------------------------------------------
" Diretórios onde o VIM busca por arquivos
" ----------------------------------------------------------------------------
   set path=.,./include/,/usr/include/,/usr/local/bin/,~/.vim/scripts/
" ----------------------------------------------------------------------------
" Uma configuração interessante da barra de status é defini-la com tamanho de 
" duas linhas e fundo com cor azul e fonte branca.
" ----------------------------------------------------------------------------
" Mostra duas linhas
   set laststatus=2
" Fundo azul e fonte branca (foi adicionando ao meu código de cores nativas)
"  highlight StatusLine ctermfg=blue ctermbg=white
" ----------------------------------------------------------------------------
" Configurando o formato da régua
" Novos arquivos possuem uma data de modificação em um certo dia muito tempo
" no passado. Ignore. 
" ----------------------------------------------------------------------------
"  set statusline=%t%m%r%h%w
"                 \%=[FORMATO=%{&ff}]
"                 \[TIPO=%Y]
"                 \[ASCII=%03b]
"                 \[HEX=%02B]
"                 \[\ XY=%04v,%04l]
"                 \[%03P]
"  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\")))}%=\ coluna:%04v\ linha:%04l\ 
"                 \total:%04L\ hex:%03.3B\ ascii:%03.3b\ %03P\
   set statusline=%<%F%h%m%r%h%w%y\ ft:%{&ft}\ ff:%{&ff}\ 
                  \Modificado:\ %{strftime(\"%c\",getftime(expand(\"%:p\")))}
                  \%=\ coluna:%04v\ linha:%04l\ 
                  \total:%04L\ hex:%03.3B\ ascii:%03.3b\ %03P\ 
" ----------------------------------------------------------------------------
" Mostra o nome do arquivo na parte superior do prompt
" ----------------------------------------------------------------------------
   set title
" ----------------------------------------------------------------------------
" Alguns tipos de arquivos devem ser ignorados pelo Vim.
" ----------------------------------------------------------------------------
   set wildignore=*.o,*.obj,*.bak,*.exe,*.dll,*.com,*.class,*.au,*.wav,*.ps,\
                 \*.avi,*.wmv,*.flv,*.djvu,*.pdf,*.chm,*.dvi,*.svn/,*~
" ----------------------------------------------------------------------------
" Definindo e trabalhando com histórico da linha de comando
" ----------------------------------------------------------------------------
   set cedit=<Esc>
" ----------------------------------------------------------------------------
" (history) Define o tamanho do arquivo de histórico, onde <valor> é o
" número de linhas de comandos a serem armazenados (5000).
" ----------------------------------------------------------------------------
   set hi=5000
" ----------------------------------------------------------------------------
" Guarda posição do cursor e histórico da linha de comando :
" ----------------------------------------------------------------------------
   set viminfo='100,\"1000,:40,%,n~/.viminfo
   au BufReadPost * if line("'\"")|execute("normal `\"")|endif
   autocmd BufReadPost *
    \ if line("'\"") > 0 && line("'\"") <= line("$") |
    \   exe "normal g`\"" |
    \ endif
" ----------------------------------------------------------------------------
" Tamanho da barra de título
" ----------------------------------------------------------------------------
   set titlelen=78
" ----------------------------------------------------------------------------
" Exibe a barra de título no formato configurado
"
" Exemplo1:
" ---------
" formato:"nome="NomeArq.EXT [se alterado mostrar +]
"  set titlestring=%t%(\ %M%)%(\ (%{expand(\"%:~:.:h\")})%)%(\ %a%)
"
" Exemplos2:
" ----------
"  set titlestring=%t%(\ %M%)%(\ (%{expand(\"%:p\")})%)%(\ %a%)
" ----------------------------------------------------------------------------
" -------------------------- [Formato] ---------------------------------------
" [Nome=nome]       buffer={current}   [Total de linhas=999]                 '
" ----------------------------------------------------------------------------
" Se editar múltiplos arquivos
" ----------------------------------------------------------------------------
" [Nome=nome]  buffer={current} [{current} of {max})]  [Total de linhas=999] '
" ----------------------------------------------------------------------------
"  set titlestring=%<Nome=%t%m%r%h%w
"   \%=
"   \BUFFER=%n
"   \%(\ %a%)
"   \%28([Total\ de\ linhas=%L]%) 
   set titlestring=%<%F%h%m%r%h%w\ \ \ \ \ \ coluna:%04v\ \ \
                    \ linha:%04l\ de\ %04L\ \ \ \ %03P\ 
" ----------------------------------------------------------------------------
" Define qual é o tamanho da margem direita para a quebra de linhas
"  automáticas, wrapmargin
" ----------------------------------------------------------------------------
   set wm=10
" ----------------------------------------------------------------------------
" Quando esta opção encontra-se ativa o VIM lê o arquivo, e qualquer
" comando de configuração que estiver nas cinco primeiras linhas e cinco
" ultimas do arquivo, serão executados. Um exemplo disso são os arquivos
" do help, onde as últimas linhas a apresentam a seguinte sintaxe:
" 'vim:tw=78:ts=8:ft=help:norl:'
" A opção nomodeline assegura que esse recurso estará desabilitado
" ----------------------------------------------------------------------------
"  set modeline
   set nomodeline 
" ----------------------------------------------------------------------------
" Utilizando a barra de espaço para mover  uma página
" ----------------------------------------------------------------------------
"  noremap <Space> <PageDown> 
" ----------------------------------------------------------------------------
" }}}

" Configurações de cores, fonte, visual, etc {{{
" ----------------------------------------------------------------------------
" Ligando configurações de cor, isto é, faz com que o vim busque no
" diretório /usr/share/vim/vim62/syntax os arquivos de configuração de
" cores de acordo com o tipo de arquivo que é aberto
" ----------------------------------------------------------------------------
   syntax on
" ----------------------------------------------------------------------------
" Sintaxe para fundo escuro (dark) ou claro (light) 
" ----------------------------------------------------------------------------
   set background=dark
"  set background=light
" ----------------------------------------------------------------------------
" Mapeamento para trocar o tipo de background
" Pode fazer com que a função SwitchColorSchemes() pare de funcionar
" dependendo do tema que estiver sendo usado ao acionar esse mapeamento
" Para quem não usa temas, não há qualquer problema.
" ----------------------------------------------------------------------------
   map  <S-F6> <ESC>:set background=light<CR>
   map  <C-S-F6> <ESC>:set background=dark<CR>
" ----------------------------------------------------------------------------
" Função para trocar o tema de cores
" A primeira linha refere-se ao esquema padrão
" ----------------------------------------------------------------------------
   colorscheme native
   function! <SID>SwitchColorSchemes()
    if g:colors_name == 'native'
     colorscheme automation
    elseif g:colors_name == 'automation'
     colorscheme moria
    elseif g:colors_name == 'moria'
     colorscheme desert
    elseif g:colors_name == 'desert'
     colorscheme colorful
    elseif g:colors_name == 'colorful'
     colorscheme navajo-night
    elseif g:colors_name == 'navajo-night'
     colorscheme bmichaelsen
    elseif g:colors_name == 'bmichaelsen'
     colorscheme impact
    elseif g:colors_name == 'impact'
     colorscheme ir_black
    elseif g:colors_name == 'ir_black'
     set background=dark
    colorscheme native
    endif
   endfunction
   map <F6> :call <SID>SwitchColorSchemes()<CR>:echo g:colors_name<CR>
" ----------------------------------------------------------------------------
" 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    
" ----------------------------------------------------------------------------
"  Cor da numeração lateral
" ----------------------------------------------------------------------------
"  hi LineNr     guifg=pink     ctermfg=lightMagenta
   hi LineNr     guifg=green    ctermfg=lightGreen
" ----------------------------------------------------------------------------
" Destaca a linha e coluna sobre o cursor e define a cor
" Não há como especificar a cor e conseguir algo bom para todos os ambientes
" ----------------------------------------------------------------------------
   set cursorline
"  hi CursorLine ctermbg=blue cterm=none
"  hi CursorLine ctermbg=black cterm=none 
"  set cursorcolumn
"  hi CursorColumn ctermbg=4 
" ----------------------------------------------------------------------------
" Configuração de fonte (tamanho e nome) para o GVim
" ----------------------------------------------------------------------------
   if has("gui_running")
	  if has("gui_gtk2")
       " Para GTK2
       " Ajustando o tamanho da fonte de acordo com o tamanho da resolução
       " Adicionando no ~/.bashrc as linhas :
       " #--------------------------------------------------------------------
       " # Definindo variável de screen para o vim
       " #--------------------------------------------------------------------
       "  export SCREENSIZE=$(xdpyinfo  | grep 'dim'\
       "                     | sed -e 's/x.*//g' -e 's/^.*[a-z]: *//g')
       " #--------------------------------------------------------------------
       " A beleza dessas linhas é que elas observam o tamanho da resolução do
       " computador cliente, e não do host. Apenas o tamanho horizontal é 
       " utilizado como referência, ou seja, 1280x1024, apenas 1280 é 
       " verificado para determinar o tamanho da fonte. Isso não funciona bem
       " em monitores cujo o maior tamanho seja o vertical.
       if exists("$SCREENSIZE")
        " se existe a variável $SCREENSIZE
        if ($SCREENSIZE > 1300)
          " se $SCREENSIZE é maior que 1300
          set guifont=monospace\ 14
        elseif ($SCREENSIZE < 850)
          " se $SCREENSIZE é menor que 850
          set guifont=monospace\ 8
        else
          " se $SCREENSIZE é maior que 850 e menor que 1300
          set guifont=monospace\ 10
        endif " Existe SCREENSIZE, e com base nele define-se guifont 
       else
        " caso a variável $SCREENSIZE não exista, use...
 		  set guifont=monospace\ 10
       endif  " Define tamanho se existe ou não $SCREENSIZE 
	  elseif has("x11")
       " Para GTK1
		 set guifont=*-lucidatypewriter-medium-r-normal-*-*-180-*-*-m-*-*
     elseif has("gui_win32")
       " Para Windows
		 set guifont=Luxi_Mono:h12:cANSI
     else
       " Para todos as outras gui use ...
		 set guifont=monospace\ 12
     endif " Conclui a verificação do tipo de interface gráfica
   endif " Conclui sobre a existência de uma interface gráfica
" ----------------------------------------------------------------------------
" }}}

" Configurações de Dobras (folders) {{{
" ----------------------------------------------------------------------------
" Ajuda:
"   zf ................ operador para criar folders
"   zfis .............. cria um folder da sentença atual
"   zd ................ delete folder
"   zo ................ abrir dobra sob o cursor
"   zc ................ fechar dobra sob o cursor
"   zv ................ visualizar linha sob o cursor
"   zR ................ abre todos os folders    
"   zM ................ fecha todos os folders
" ----------------------------------------------------------------------------
" Método das dobras
" ----------------------------------------------------------------------------
   set foldmethod=marker
" ----------------------------------------------------------------------------
" Dobra padrão 
" Quando cria-se ou deleta-se uma dobra, são esses caracteres que são 
" adicionados ou removidos do texto.
" ----------------------------------------------------------------------------
   set fmr={{{,}}} 
" ----------------------------------------------------------------------------
" Mapeamento para dobras
" ----------------------------------------------------------------------------
" Abrindo uma dobra
   map + zo
" Fechando um certa dobra 
   map - zc
" Abrindo todo mundo 
   map ++ zR
" Fechando todo mundo 
   map -- zM
" ----------------------------------------------------------------------------
" folderlevel define quantos níveis de dobras ficam abertos por padrão
" ----------------------------------------------------------------------------
   set foldlevel=0 
" ----------------------------------------------------------------------------
" Barra de espaço abre e fecha folders
" ----------------------------------------------------------------------------
   nnoremap <space> @=((foldclosed(line(".")) < 0) ? 'zc' : 'zo')<CR>
" ----------------------------------------------------------------------------
" }}}

" Configurando a busca {{{
" ----------------------------------------------------------------------------
" Ativa o recurso de colorir, dando realce a pesquisa de palavra(s)
" que estiver em andamento. O hlsearch abreviado chama-se hls
" ----------------------------------------------------------------------------
   set hlsearch
" ----------------------------------------------------------------------------
" O método de busca pode ser incrementado com a adição do comando
" incsearch". A pesquisa torna-se diferenciada e dinâmica em tempo de
" pesquisa, isto é, antes do usuário entrar com o comando <enter> a fim
" de buscar os resultados, os mesmos já aparecerão em sua tela.
" ----------------------------------------------------------------------------
   set incsearch
" ---------------------------------------------------------------------------- 
" Se começar uma busca em maiúsculo ele habilita o case 
" ---------------------------------------------------------------------------- 
"  set smartcase    
" ----------------------------------------------------------------------------
" Que tal trocar a cor do texto ?
" daquela seleção que aparece quando você procura algo com o comando " / ?
" é fácil, basta definir a cor do componente da sintaxe. Ah sim, a
" opção  hls (veja acima) deve estar ativa.
" você pode colocar as cores que quiser, em inglês. Note que é
" ctermBG e FG, de  background e foreground  (fundo e letra). E veja
" também que o IncSearch (busca enquanto você digita) é invertido!
" ----------------------------------------------------------------------------
"  hi    Search ctermbg=yellow ctermfg=red
"  hi IncSearch ctermbg=green  ctermfg=cyan
" ----------------------------------------------------------------------------
" No vim temos diversas opções para  modificar seu comportamento
" através do comando set. para ver  todas as opções  disponíveis, faça
" :set all. Diversas  opções já vêem  ligadas por  padrão, então
" vamos mais opções de busca
" IncrementedSearch, HighLightedSearch, IgnoreCase e SmartCaSe
" ----------------------------------------------------------------------------
   set ic scs            
" ----------------------------------------------------------------------------
" Limpando o registro de buscas
" ----------------------------------------------------------------------------  
   nno <S-F11> <Esc>:let @/=""<CR>
" ----------------------------------------------------------------------------  
" }}}

" Abreviações, correções e jeitinhos para o modo de inserção {{{
" ----------------------------------------------------------------------------
" Mapeando abreviações para o modo de inserção
" ----------------------------------------------------------------------------   
   iab linux              GNU/Linux
   iab gnome              GNOME
   iab kde                KDE
   iab latex              LaTeX
" ----------------------------------------------------------------------------
" Mapeando correções para o modo de inserção
" ---------------------------------------------------------------------------- 
   iab tambem             também
   iab vc                 você
   iab assenção           ascenção
   iab assougue           açougue
   iab corrijir           corrigir
   iab definitamente      definitivamente
   iab deshonestidade     desonestidade
   iab díficil            difícil
   iab distingeu          distingue
   iab ecessão            exceção
   iab ecessões           exceções
   iab excessão           exceção
   iab Excesões           exceções
   iab excurção           excursão
   iab exijir             exigir
   iab nao                não
   iab noã                não
   iab portugu6es         português
   iab portugês           português
   iab portugues          português
   iab dividos            divididos
   iab lisensa            licença
   iab licenssa           licença
   iab licensa            licença
   iab Licensa            Licença
   iab drives             drivers
   iab drive              driver
   iab Drive              Driver
   iab Drives             Drivers
" ----------------------------------------------------------------------------
" 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 Ú"
" }}}

" Configurando o dicionário e corretor ortográfico {{{
" ----------------------------------------------------------------------------
" Utilizando o dicionário do aspell
" ----------------------------------------------------------------------------
   cmap ckBR w!<CR>:!aspell check %<CR>:e! %<CR>
   cmap ckEN w!<CR>:!aspell --lang=en check %<CR>:e! %<CR>
" ----------------------------------------------------------------------------
" Verificação automática do arquivo (spell check interno ao vim)
" Para baixar o dicionário: http://www.broffice.org/verortografico/baixar
" Descompacte e no diretório abra o vim. Nele execute:
" :mkspell pt pt_BR
" cp pt*.spl ~/.vim/spell/
" Adicione no .vimrc as linhas:
" ----------------------------------------------------------------------------
  set spelllang=pt
  map <S-F8> :set spelllang=en<CR>
  map <C-S-F8> :set spelllang=pt<CR>
  set nospell
  nnoremap <C-F8> :set spell! spell?<CR>
" ----------------------------------------------------------------------------
" Para habilitar a identificação automática das palavras erradas, por tipo de
" arquivo, use:
" ----------------------------------------------------------------------------
"   autocmd BufNewFile,BufRead *.txt setl spell spl=pt
" ----------------------------------------------------------------------------
" Plugin vimspell. Somente foi implementado devido ao funcionamento pouco 
" correto do plugin interno do vim.
" URL: http://www.vim.org/scripts/script.php?script_id=465
" ----------------------------------------------------------------------------
" Para desabilitar o vimspell (habilite apenas quando for usar). 
   let loaded_vimspell = 1
" Configurando a coloração de sintaxe
   highlight link SpellErrors  Error
" Usando o aspell (opções: aspell e ispell)
   let spell_executable = "aspell"
" Restrigindo os idiomas disponíveis
" Para o aspell
   let spell_language_list = "pt_BR,en"
" Para o ispell
"   let spell_language_list = "brazilian,english"
" Não quero auto correção ativa. Aguarde eu chamar o programa
   let spell_auto_type = "none"
" ----------------------------------------------------------------------------
" Dicionário para procurar o auto-complemento de palavras
" ----------------------------------------------------------------------------
   set dictionary=~/.vim/dict/words.dic
" ----------------------------------------------------------------------------
" Auto-complemento de palavras
" ----------------------------------------------------------------------------
" Exemplo de como usar o dicionário com mapeamento:
"  (1)  dentro do modo de inserção       -- INSERT --
"  (2)  posicione o cursor sob a palavra a ser completada
"  (3)  ligar dicionário  ao pressionar a seqüência  "<C-D>"
   imap <C-D> <c-x><c-k>
"  (4)  busca palavra no arquivo corrente            "<F8>"
   imap <F8> <c-x><c-i>
"  (5)  o <C-N> trava meu computador, assim, eliminarei ele
   imap <C-N> <C-P>
" ----------------------------------------------------------------------------
" Quando completar uma palavra seguir a seguinte seqüência de
" busca, sendo primeiro em 1, segundo em 2, ...
"
"  1 - no buffer atual                  (.)
"  2 - buffer de outra janela           (w)
"  3 - outros buffers carregados        (b)
"  4 - buffers não carregados           (u)
"  5 - arquivo de tags                  (t)
"  6 - arquivo de include               (i)
"  7 - dicionário                       (K)
" ----------------------------------------------------------------------------
"  set complete=.,w,b,u,t,i,k     "(*default*)
   set complete=k,.,w,t,i,b,u 
"  set complete=.,w,k,t,i
" ----------------------------------------------------------------------------
" Completa a palavra ignorando se é maiúscula ou minúscula
" Não é uma idéia muito boa, se o propósito envolver completar códigos.
" ----------------------------------------------------------------------------
"  set infercase
" ----------------------------------------------------------------------------
" Marca como erro duas palavras idênticas separadas por espaço
" ----------------------------------------------------------------------------
   syntax match DoubleWordErr "\c\<\(\a\+\)\_s\+\1\>"
   hi def link DoubleWordErr Error
" ----------------------------------------------------------------------------
" }}}

" Configurações do taglist {{{
" ----------------------------------------------------------------------------
" URL: http://www.vim.org/scripts/script.php?script_id=273
" ----------------------------------------------------------------------------
" Inclua:
" --langdef=tex
" --langmap=tex:.tex
" --regex-tex=/\\subsubsection[ \t]*\*?\{[ \t]*([^}]*)\}/- \1/s,subsubsection/
" --regex-tex=/\\subsection[ \t]*\*?\{[ \t]*([^}]*)\}/+\1/s,subsection/
" --regex-tex=/\\section[ \t]*\*?\{[ \t]*([^}]*)\}/\1/s,section/
" --regex-tex=/\\chapter[ \t]*\*?\{[ \t]*([^}]*)\}/\1/c,chapter/
" --regex-tex=/\\label[ \t]*\*?\{[ \t]*([^}]*)\}/\1/l,label/
" --regex-tex=/\\ref[ \t]*\*?\{[ \t]*([^}]*)\}/\1/r,ref/
"
" no arquivo ~/.ctags para permitir ajustar o ctags para o LaTeX.
" URL: http://vim.wikia.com/wiki/Use_Taglist_with_LaTeX_files
" ----------------------------------------------------------------------------
" Auto Update da lista de tags 
" ----------------------------------------------------------------------------
   let Tlist_Auto_Update = 1
" ----------------------------------------------------------------------------
" Habilitando o menu tags no gvim 
" ----------------------------------------------------------------------------
   let Tlist_Show_Menu = 1
" ----------------------------------------------------------------------------
" Ajustando o tamanho da janela do taglist 
" ----------------------------------------------------------------------------
   let Tlist_WinWidth = 30
   let Tlist_WinHeight = 30
" ----------------------------------------------------------------------------
" Fechamento automático das dobras que estão inativas
" ----------------------------------------------------------------------------
   let Tlist_File_Fold_Auto_Close = 1
" ----------------------------------------------------------------------------
" Se ao fechar, apenas o taglist estiver aberto, fechar o vim
" ----------------------------------------------------------------------------
   let Tlist_Exit_OnlyWindow = 1
" ----------------------------------------------------------------------------
" Abreviações para linha de comando 
" ----------------------------------------------------------------------------
   cab ctg TlistToggle
   cab ctgo TlistOpen
   cab ctgs Tlist
   cab ctgadd TlistAddFiles
   cab ctgaddall TlistAddFilesRecursive
   cab ctgup TlistUpdate
   cab ctglock TlistLock
   cab ctgsync TlistSync
   cab ctgsave TlistSessionSave
   cab ctgopen TlistSessionLoad
" ----------------------------------------------------------------------------
" }}}

" Configurações do PotWiki {{{
" ----------------------------------------------------------------------------
" URL: http://www.vim.org/scripts/script.php?script_id=1018  
" ----------------------------------------------------------------------------
" Definindo o caminho padrão para o wiki
" ----------------------------------------------------------------------------
   let potwiki_home = "$HOME/.vim/.wiki/HomePage"
" ----------------------------------------------------------------------------
" Habilitando o autosalvamento para o wiki
" ----------------------------------------------------------------------------
   let potwiki_autowrite = 1
" ----------------------------------------------------------------------------
" Personalizando as cores do wiki
" ----------------------------------------------------------------------------
   highlight PotwikiWord          guifg=darkcyan
   highlight PotwikiWordNotFound  guibg=Red guifg=Yellow
" ----------------------------------------------------------------------------
" }}}

" Configurações do NERDTree {{{
" ----------------------------------------------------------------------------
" URL: http://www.vim.org/scripts/script.php?script_id=1658 
" ----------------------------------------------------------------------------
" Veja ~/.vim/doc/NERDTree.txt para mais informações
" ----------------------------------------------------------------------------  
" Abreviando a inicialização dele
" ----------------------------------------------------------------------------
   cab ntree NERDTree
   map <F5> :NERDTree<CR>
   imap <F5> <ESC>:NERDTree<CR>
" ----------------------------------------------------------------------------
" Configurando o arquivo que registrará os bookmarks
" ----------------------------------------------------------------------------
   let NERDTreeBookmarksFilee="~/.vim/.NERDTreeBookmarks"
" ----------------------------------------------------------------------------
" Ativando os Bookmarks ao iniciar
" ----------------------------------------------------------------------------
   let NERDTreeShowBookmarks=1
" ----------------------------------------------------------------------------
" Ajustando o tamanho da janela para melhor aproveitamento do espaço
" ----------------------------------------------------------------------------
   let NERDTreeWinSize=45
" ----------------------------------------------------------------------------
" }}}

" Configurações para o snipMate {{{
" ----------------------------------------------------------------------------
" URL: http://www.vim.org/scripts/script.php?script_id=2540
" ----------------------------------------------------------------------------
" Os snippets utilizados por esse .vimrc e que são diferentes da versão de
" instalação, podem ser encontrados em:
" URL: http://snipt.net/jfmitre/tag/snippet
" ----------------------------------------------------------------------------
" O snipMate deve usar tabulação para funcionar
" ----------------------------------------------------------------------------
   au BufNewFile,BufRead *.snippets set noexpandtab
" ----------------------------------------------------------------------------
" Não quero usar folder nos arquivos do snipMate
" ----------------------------------------------------------------------------
   au BufNewFile,BufRead *.snippets  set foldlevel=2
" ----------------------------------------------------------------------------
" }}}

" Configuração para GNU GPG {{{
" ----------------------------------------------------------------------------
" URL: http://www.vim.org/scripts/script.php?script_id=661
" ----------------------------------------------------------------------------
" Definindo a variável GPG_TTY no .vimrc 
" O correto é acrescentar ao .bashrc:
"  export GPG_TTY="tty" 
" ----------------------------------------------------------------------------
   let $GPG_TTY = "tty"
" ----------------------------------------------------------------------------
" Não crie arquivo de backup de arquivos encriptados
" ----------------------------------------------------------------------------
   au BufNewFile,BufRead *.gpg,*.asc,*.pgp setlocal nobk 
                                       \ | setlocal noswf
" ----------------------------------------------------------------------------
" Utilizando o mesmo esquema de cores que foi criado para arquivos .txt
" Vide 'Funções, mapeamentos e abreviações para edição de texto em geral'
" ----------------------------------------------------------------------------
   au BufNewFile,BufRead *.gpg,*.asc,*.pgp source ~/.vim/data/txt.vim 
" ----------------------------------------------------------------------------
" Facilitando o acesso ao meu arquivo de senhas, abre o mesmo em uma nova tab
" Para navegar entre tabs:
" :tabnext, :tabprev, :tabfirst, :tablast ou :tab n
" O mapeamento abaixo refere-se a <C-7>
" ----------------------------------------------------------------------------
   map  <ESC>:tabnew ~/.passwords.gpg<CR>
" ----------------------------------------------------------------------------
" }}}

" Para melhor uso do vim e seus plugins {{{
" ----------------------------------------------------------------------------
" Utilizando abreviações em linha de comando
" Para tanto vamos utilizar o comando Cab
" ----------------------------------------------------------------------------
   cab W  w
   cab Wq wq
   cab wQ wq
   cab WQ wq
   cab Q  q
" ----------------------------------------------------------------------------  
" Melhorando o trabalho com várias janelas
" ----------------------------------------------------------------------------  
   imap <C-W> <ESC><C-W>
" Teclas de copiar, colar e recortar tipo: <C-C>, <C-V> e <C-X>
" ----------------------------------------------------------------------------
" copy - copiar
" ----------------------------------------------------------------------------
   vmap <C-C> y
" ----------------------------------------------------------------------------     
" paste - colar
" ----------------------------------------------------------------------------
   nmap <C-V> p
   imap <C-V> <C-O>p
" ----------------------------------------------------------------------------
" cut - cortar
" ----------------------------------------------------------------------------
   vmap <C-X> x
" ----------------------------------------------------------------------------
" undo - desfazer
" ----------------------------------------------------------------------------
   noremap <C-Z> u
   inoremap <C-Z> <C-O>u
" ----------------------------------------------------------------------------
" select all - selecionar tudo
" ----------------------------------------------------------------------------
   map <C-a> <esc>ggvG
" ----------------------------------------------------------------------------
" Faz o shift-insert comportar-se semelhante ao Xterm
" Sendo assim você seleciona um bloco de texto com o mouse
" e cola com o botão do meio do mouse
" ----------------------------------------------------------------------------
   map  <S-Insert> <MiddleMouse>
   map! <S-Insert> <MiddleMouse>
" ----------------------------------------------------------------------------
" Atalhos para o plugin Calendar
" ----------------------------------------------------------------------------
" URL: http://www.vim.org/scripts/script.php?script_id=52
" ----------------------------------------------------------------------------  
   cab C Calendar
   cab CH CalendarH
" ----------------------------------------------------------------------------
" Embaralha a tela para evitar bisbilhoteiros
" ----------------------------------------------------------------------------
   map <F4> ggVGg?
" ----------------------------------------------------------------------------
" Alterna o modo de quebra de linha
" ----------------------------------------------------------------------------
   map <leader>b :set wrap! <bar> ec &wrap ? 'wrap' : 'nowrap'<cr>
" ----------------------------------------------------------------------------
" }}}

" Funções, mapeamentos e abreviações para edição de texto em geral  {{{
" ----------------------------------------------------------------------------
" Definindo tamanho da linha, isto é, coluna onde a linha deve ser "quebrada"
" com a inserção de fim de linha (<EOL>, abreviação de  end-of-line).
" Existe a recomendação majoritária de ter textos com quebra inferior ou igual
" a 80. Contudo, 90 é uma boa escolha para uma formatação genérica.
" Especifique outros valores de acordo com interesse
" ----------------------------------------------------------------------------
   set textwidth=90
" ----------------------------------------------------------------------------
" Se uma linha ultrapassar o valor estipulado em textwidth ela será
" mostrada em destaque colocá-la em uma função de liga desliga junto
" com uma que mostre as linhas e colunas de um arquivo em destaque
" ----------------------------------------------------------------------------
   au BufNewFile,BufRead  *  exec 'match Error /\%>' .  &textwidth . 'v.\+/'
" ----------------------------------------------------------------------------
" Fazer a primeiria letra depois de uma pontuação tornar-se maiúscula
" ----------------------------------------------------------------------------
"  :%s/[.!?]\_s\+\a/\U&\E/g 
" ----------------------------------------------------------------------------
" Para remover linhas em branco duplicadas
" ----------------------------------------------------------------------------
"  map ,d my:%s/\(^\n\{2,}\)/\r/g`y
" ----------------------------------------------------------------------------
"  Adição de um cabeçalho genérico
" ----------------------------------------------------------------------------
   fun! InsertUpdateData()
    normal(1G)
    call append(0, " File: ")
    call append(1, " Author: J. F. Mitre <http://jfmitre.com>")
" Escreve a data na forma: DD/MM/AA hs HH:MM
"   call append(2, " Created: " . strftime("%a %d/%b/%Y hs %H:%M"))   
" Escreve a data na forma: Semana DD MES AAAA HH:MM:SS TIMEZONE
    call append(2, " Created: " . strftime("%c"))
" Escreve a data na forma: DD/MM/AA hs HH:MM
"   call append(3, " Last Update: " . strftime("%a %d/%b/%Y hs %H:%M"))   
" Escreve a data na forma: Semana DD MES AAAA HH:MM:SS TIMEZONE
    call append(3, " Last Update: " . strftime("%c"))
    call append(4, " Notes: ")
    normal($)
   endfun
   cmap ,cl call InsertUpdateData()<CR>A 
" ----------------------------------------------------------------------------
" Dando destaque para notas
" http://vivaotux.blogspot.com/2009/01/
"                              \ uniformizao-de-espaamento-nos-cdigos.html
" ----------------------------------------------------------------------------
   highlight MinhasNotas ctermbg=blue ctermfg=yellow guibg=blue guifg=yellow
   match MinhasNotas /[Nn]otas\? \?:/  
" ----------------------------------------------------------------------------
" a função (strftime) é predefinida pelo sistema
" ----------------------------------------------------------------------------
   iab YDATE <C-R>=strftime("%a %d/%b/%Y hs %H:%M")<CR>
   iab HDATE <C-R>=strftime("%a %d/%b/%Y hs %H:%M")<CR> 
" ----------------------------------------------------------------------------
" Adicionando o suporte a calculadora no vim
" ----------------------------------------------------------------------------
   command! -nargs=+ Calc :py print <args>
   py from math import *
" ----------------------------------------------------------------------------
" Fechamento automático para parênteses
" ----------------------------------------------------------------------------
   inoremap ( ()<esc>i
   inoremap { {}<esc>i
   inoremap [ []<esc>i
" ----------------------------------------------------------------------------
" Função para atualizar a data da última modificação
" Verifica se existe uma data nas 5 primeiras linhas do documento
" Se não existe, escreve na primeira linha
" Se existe, atualiza a informação
" Essa função gera uma mensagem de erro em documento com menos de 5 linhas
" ----------------------------------------------------------------------------
   fun! LastUpdate()
   mark z
    if getline(0) =~ ".*Last Update:"  ||
     \ getline(1) =~ ".*Last Update:"  ||
     \ getline(2) =~ ".*Last Update:"  ||
     \ getline(3) =~ ".*Last Update:"  ||
     \ getline(4) =~ ".*Last Update:"  ||
     \ getline(5) =~ ".*Last Update:"  
" Atualiza apenas o que estiver nas 5 primeiras linhas
     exec "1,5s/\s*Last Update: .*$/Last Update: " . strftime("%c") . "/"
" Atualiza apenas a linha que contém o cursor
"    exec "s/\s*Last Update: .*$/Last Update: " . strftime("%c") . "/"
    else
"     call append(0, " Last Update: " . strftime("%a %d/%b/%Y hs %H:%M"))
     call append(0, " Last Update: " . strftime("%c"))
    endif
   exec "'z"
   endfun  
" ----------------------------------------------------------------------------
" Abreviação para a função acima
" ----------------------------------------------------------------------------
   cmap data call LastUpdate()<CR>
" ----------------------------------------------------------------------------
" Man: Páginas de manual são na verdade textos em NROFF 
" ----------------------------------------------------------------------------
   au BufNewFile,BufRead *.man set ft=nroff
" ----------------------------------------------------------------------------
" MostraTab: mostra TAB no inicio e espaços no fim das linhas
" ----------------------------------------------------------------------------
   map ,mt /^\t\+\\|\s\+$<cr>
" ----------------------------------------------------------------------------
" PalavrasRepetidas: procura palavras repetidas no texto
" ----------------------------------------------------------------------------
   map ,pr /\<\(\w*\) \1\><cr>
" ----------------------------------------------------------------------------
" Numerar linhas dentro do arquivo
" :let i=1 | g/^/s//\=i."\t"/ | let i=i+1
" ----------------------------------------------------------------------------
   map ,n :let i=1  g/^/s//\=i."\t"/  let i=i+1   
" ----------------------------------------------------------------------------
" Destaca uma linha no texto com o código de erro
" ---------------------------------------------------------------------------- 
   nnoremap <Leader>k mk:exe 'match Search /<Bslash>%'.line(".").'l/'<CR>
" ----------------------------------------------------------------------------
" Justifica: justifica os textos com o justificador em sed
" ----------------------------------------------------------------------------
   vmap ,je :!sed.alinha-justify<cr>
" ----------------------------------------------------------------------------
" Digitar ";l" retira espaços em branco de final de arquivo
" ----------------------------------------------------------------------------
   map ;l   :%s/\s*$//g<cr>
" ----------------------------------------------------------------------------
" Mail: Configurações especiais para arquivos de e-mail
" ----------------------------------------------------------------------------
   au FileType Mail set fo=ctq tw=65 et
" ----------------------------------------------------------------------------
" Identação de textos e códigos com o TAB no modo visual
" URL: http://gustavodutra.com/post/72/
"               \ dicas-de-movimentacao-e-identacao-no-gvim/
" ----------------------------------------------------------------------------
   vnoremap < <gv
   vnoremap > >gv
   vmap  <TAB> >
   vmap  <S-TAB> <
   imap  <S-TAB> <ESC><<i
" ----------------------------------------------------------------------------
" Permite abrir um arquivo mencionado com o caminho dentro de outro arquivo
" Funciona em cabeçalhos de programação
" ----------------------------------------------------------------------------
   nmap gf :new %:p:h/<cfile><CR>
" ----------------------------------------------------------------------------
" }}}

" Funções, mapeamentos e abreviações para aquivos .txt {{{
" ----------------------------------------------------------------------------
" Quebra os arquivos de texto na coluna 79
" ----------------------------------------------------------------------------
   au BufNewFile,BufRead *.txt setl tw=79
" ----------------------------------------------------------------------------
" Usa uma source para edição de arquivo .txt
" Source txt.vim do Aurelio Marinho Jarga
" URL: http://aurelio.net/vim/txt.vim
" ----------------------------------------------------------------------------
   au BufNewFile,BufRead *.txt source ~/.vim/data/txt.vim
" ----------------------------------------------------------------------------
" Os arquivo README, NEWS e ToDo também são arquivos de texto 
" ----------------------------------------------------------------------------
   au BufNewFile,BufRead *{R,r}{E,e}{A,a}{D,d}{M,m}{E,e} setl ft=txt tw=79
   au BufNewFile,BufRead *{R,r}{E,e}{A,a}{D,d}{M,m}{E,e}
                                             \ source ~/.vim/data/txt.vim
   au BufNewFile,BufRead *{N,n}{E,e}{W,w}{S,s} setl ft=txt tw=79
   au BufNewFile,BufRead *{N,n}{E,e}{W,w}{S,s} source ~/.vim/data/txt.vim
   au BufNewFile,BufRead *{T,t}{O,o}{D,d}{O,o} setl ft=txt tw=79
   au BufNewFile,BufRead *{T,t}{O,o}{D,d}{O,o} source ~/.vim/data/txt.vim
" }}}

" Funções, mapeamentos e abreviações para programação e edição de dotfiles {{{
" ----------------------------------------------------------------------------
" Função que mapeia <F9> para mostrar/ocultar comentários
" ----------------------------------------------------------------------------
   fu! CommOnOff()
    if !exists('g:hiddcomm')
     let g:hiddcomm=1 | hi Comment ctermfg=black guifg=black
    else
     unlet g:hiddcomm | hi Comment ctermfg=cyan  guifg=cyan term=bold
    endif
   endfu
   map <F9> :call CommOnOff()<cr>
" ----------------------------------------------------------------------------
" Função para comentar vários arquivos de acordo com o tipo
" URL: http://vim.wikia.com/wiki/Comment_Lines_according_to_a_given_filetype
" ----------------------------------------------------------------------------
   fu! CommentLines()
     "let Comment="#" " shell, tcl, php, perl
      exe ":[email protected]^@".g:Comment."@g"
      exe ":[email protected][email protected]".g:EndComment."@g"
   endfu
" mapeando a função no modo visual com a combinação 'co'
   vmap co :call CommentLines()<CR>a
" definindo os comentários por tipo de arquivo (a primeira linha é um padrão)
   au BufRead,BufNewFile * let Comment="# " | let EndComment=""
   au BufRead,BufNewFile *.inc,*.ihtml,*.html,*.tpl,*.class 
     \ let Comment="<!-- " | let EndComment=" -->"
   au BufRead,BufNewFile *.sh,*.pl,*.tcl let Comment="# " | let EndComment=""
   au BufRead,BufNewFile *.js set | let Comment="// " | let EndComment=""
   au BufRead,BufNewFile *.cc,*.php,*.cxx,*.cpp 
     \ let Comment="// " | let EndComment=""
   au BufRead,BufNewFile *.c,*.h let Comment="/* " | let EndComment=" */"
   au BufRead,BufNewFile *.f90,*.f95 let Comment="! " | let EndComment=""
   au BufRead,BufNewFile *.f let Comment="C " | let EndComment=""
   au BufRead,BufNewFile *.tex,*.bib let Comment="% " | let EndComment=""
   au BufRead,BufNewFile *.vim,.vimrc let Comment="\" " | let EndComment="" 
" ----------------------------------------------------------------------------
" }}}

" Para editar o vimrc {{{
" ----------------------------------------------------------------------------
" Permite recarregar e editar o ~/.vimrc
" ----------------------------------------------------------------------------
" Para recarregar o .vimrc manualmente
   imap ,u <ESC>:source ~/.vimrc<CR>
" Para permitir que ele seja automaticamente carregado ao ser salvo
"  autocmd! bufwritepost .vimrc source %
" Para editar o .vimrc
   imap ,v <ESC>:e ~/.vimrc<CR>
" ----------------------------------------------------------------------------
" }}}

" Funções, mapeamentos e abreviações para Makefiles {{{
" ----------------------------------------------------------------------------
" O Makefile deve usar Tabs
" ----------------------------------------------------------------------------
   au BufNewFile,BufRead *[mM]akefile setlocal noexpandtab
" ----------------------------------------------------------------------------
" Esses arquivos também são tipo scripts
" ----------------------------------------------------------------------------
   au BufNewFile,BufRead *[mM]akefile* setlocal ft=make
" ----------------------------------------------------------------------------
" }}}

" Funções, mapeamentos e abreviações para LaTeX {{{
" ----------------------------------------------------------------------------
" Identificando o .tex como código LaTeX
" ----------------------------------------------------------------------------
   let g:tex_flavor='latex'
" ----------------------------------------------------------------------------
" Registrando tamanho de coluna em arquivo LaTeX
" ----------------------------------------------------------------------------
   au BufNewFile,BufRead *.tex setlocal tw=79
" ----------------------------------------------------------------------------
" Dicionário que é a lista dos nomes dos snippets utilizados pelo snipMate 
" quando o LaTeX é utilizado
" ----------------------------------------------------------------------------
   au BufNewFile,BufRead *.tex setlocal dictionary=~/.vim/dict/latex.dic
" ----------------------------------------------------------------------------
" Dicionário relativo as tags do arquivo de bibliografia.
" Digite <F7> (ou sua tecla personalizada) para criar o arquivo ./bib.dic
" ----------------------------------------------------------------------------
   au BufNewFile,BufRead *.tex setlocal dictionary+=./bib.dic
" ----------------------------------------------------------------------------
" Dicionário completo de comandos. Adaptado do dicionário do Kile.
" URL: http://sites.google.com/site/bemylifeeasy/Home/tex.zip
" ----------------------------------------------------------------------------
   au BufNewFile,BufRead *.tex setlocal dictionary+=~/.vim/dict/tex/*.cwl 
     \ iskeyword+=\\,.,{,},[,],*,=,/,(,),>,<
" ----------------------------------------------------------------------------
" Alguns comandos para LaTeX (para o modo de inserção)
" Ative a complementação de chaves para melhor aproveitamento
" ----------------------------------------------------------------------------
   au BufNewFile,BufRead *.tex imap ,bf \textbf{
                           \ | imap ,it \textit{
                           \ | imap ,tt \texttt{
                           \ | imap ,fn \footnote{
                           \ | imap ,se \section{
                           \ | imap ,ch \chapter{
                           \ | imap ,un \underline{
                           \ | iab latex \LaTeX
" ----------------------------------------------------------------------------
" Gerando um dicionário de bibliografia
" O script (em bash) catbib varre todos os .bib do diretório corrente e 
" cria o arquivo ./bib.dic que é parte da lista de dicionários acima
" 
" Código do script: catbib
" #!/bin/bash
" #  File: catbib
" #  Author: J. F. Mitre <http://jfmitre.com>
" #  Created: Qui 28/Mai/2009 hs 23:15
" #  Last Update: Dom 31 Mai 2009 13:17:25 BRT
" #  Notes: write an bib.dic with labels for \cite{}
"
" TEMP=`ls *.bib 2>/dev/null`
" if [ ! -z $TEMP ]; then
"   #if there is/are *.bib, then
"   grep @ *.bib |sed -e '/STRING/d' \
"                     -e '/ /d' \
"                     -e 's/^.*{//g' >bib.dic 2>/dev/null
" fi
" ----------------------------------------------------------------------------
   au BufNewFile,BufRead *.tex,*.bib
     \ map <F7> <ESC>:!~/.vim/scripts/catbib<CR>
" ----------------------------------------------------------------------------
" Correlacionando as aspas estilo LaTeX
" e mapeando a função "" para ser  ``'' se digitar '"<space>"', ou seja,
" aspas, espaço, aspas, será incluído as aspas comuns.
" ---------------------------------------------------------------------------- 
   au BufNewFile,BufRead *.tex setlocal matchpairs+=`:'
                              \ | inoremap "" ``''<esc><left><left>a
" ----------------------------------------------------------------------------
" Gerenciando folders em LaTeX (apenas seções são folders)
" ----------------------------------------------------------------------------
   au BufNewFile,BufRead *.tex setlocal foldmarker=%\ bsec,%\ endsec
                                 \ | setlocal foldlevel=0
" ----------------------------------------------------------------------------
" Construindo e gerenciando um 'projeto' com o taglist
" Não deixa de ser abreviações criadas anteriormente, mas aqui possui um 
" propósito mais definido, com um nome mais claro.
" ----------------------------------------------------------------------------
   cab texctg TlistAddFilesRecursive ./ *.tex
   cab texp Tlist
" ----------------------------------------------------------------------------
" Filtrando e abrindo log para melhor avaliação do resultado da compilação
" modifique vsplit para split caso prefira dividir a tela horizontalmente.

" ----------------------------------------------------------------------------
   au BufNewFile,BufRead *.tex,*.bib
     \ map <S-F7> <ESC>:!~/.vim/scripts/latexfilter &>./filter.log<CR>
     \<ESC>:vsplit ./filter.log<CR>
" ----------------------------------------------------------------------------
" Carregando sintaxe para destacar erros no código LaTeX
" Ela será aplicada apenas ao arquivo filter.log criado no item anterior
" ----------------------------------------------------------------------------
   au BufNewFile,BufRead filter.log syn clear | syn case ignore
           \ | syn match   logError          '.*Error.*'
           \ | syn match   logWarning        '.*Warning.*'
           \ | syn match   logOverUnderFull  '.*[Over|Under].*[v|h]box.*'
           \ | syn match   logFile           '.*\.\/.*\....$'
           \ | syn match   logNoFile1        '.*No\ file.*'
           \ | syn match   logNoFile2        '.*File.*does.not.*'
           \ | hi logOverUnderFull   ctermfg=LightGrey cterm=bold
           \ | hi logWarning         ctermfg=Red cterm=bold 
           \ | hi logFile            ctermfg=Green cterm=bold 
           \ | hi logError           ctermfg=yellow ctermbg=Red
           \ | hi logNoFile1         ctermfg=Blue
           \ | hi logNoFile2         ctermfg=Blue 
" ----------------------------------------------------------------------------
" Templates em LaTeX
" ----------------------------------------------------------------------------
" Documento para escrever relatórios e textos em geral.
   au BufNewFile,BufRead *.tex cmap TEXD r ~/.vim/headers/documento.tex<CR>
" Escrever pequenos resumos de uma página
   au BufNewFile,BufRead *.tex cmap TEXD r ~/.vim/headers/resumo.tex<CR>
" Escrever cartas
   au BufNewFile,BufRead *.tex cmap TEXL r ~/.vim/headers/carta.tex<CR>
" Apresentação com o Prosper
   au BufNewFile,BufRead *.tex cmap TEXP r ~/.vim/headers/prosper.tex<CR>
" ----------------------------------------------------------------------------
" }}}

" Funções, mapeamentos e abreviações para programação em shell script {{{
" ----------------------------------------------------------------------------
" BashTemp: linha de criação do arquivo temporário com o mktemp
" ----------------------------------------------------------------------------
"  map ,bt IA_TMP=`mktemp /tmp/$(basename $0).XXXXXX`
" ----------------------------------------------------------------------------
" O arquivo .sh é na verdade um arquivo bash
" ----------------------------------------------------------------------------
   au FileType sh let b:is_bash=1
" ----------------------------------------------------------------------------
" Esss arquivos também são tipo scritps
" ----------------------------------------------------------------------------
   au BufNewFile,BufRead .alias*,.funcoes* set ft=sh
" ----------------------------------------------------------------------------
" Cria um cabeçalho para scripts bash
" ----------------------------------------------------------------------------
   fun! InsertHeadBash()
    normal(1G)
    call append(0, "#!/bin/bash")
    call append(1, "#  File: <name>")
    call append(2, "#  Author: J. F. Mitre <http://jfmitre.com>")
    call append(3, "#  Created: " . strftime("%c"))
    call append(4, "#  Last Update: " . strftime("%c"))
    call append(5, "#  Notes:")
    normal($)
   endfun
   cmap ,sh call InsertHeadBash()<CR>A
" ----------------------------------------------------------------------------
" Se for um arquivo .sh e ele estiver vazio, insira o cabeçalho
" ----------------------------------------------------------------------------
"  au BufNewFile,BufRead *.sh if getline(1) == "" | normal ,sh
   au BufNewFile,BufRead *.sh if getline(1) == "" | call InsertHeadBash()
" }}} 

" Funções, mapeamentos e abreviações para programação em Python {{{
" ----------------------------------------------------------------------------
" Cria uma cabeçalho para programas em Python
" ----------------------------------------------------------------------------
   fun! BufNewFile_PY()
     normal(1G)
     call append(0, "#!/usr/bin/env python")
     call append(1, "# # -*- coding: UTF-8 -*-")
     call append(2, "# Author: J. F. Mitre <http://jfmitre.com>")
     call append(3, "# Created: " . strftime("%c"))
     call append(4, "# Last Update: " . strftime("%c"))
     call append(5, "# File: <name>")
     call append(6, "# Notes: ")
     normal gg
   endfun
   cmap ,py call BufNewFile_PY()<CR>A
" ----------------------------------------------------------------------------
" Arquivos Python devem ter tabulação
" ----------------------------------------------------------------------------
   au FileType python set noexpandtab 
" ----------------------------------------------------------------------------
" Se for um arquivo .py e ele estiver vazio, insira o cabeçalho
" ----------------------------------------------------------------------------
   au BufNewFile,BufRead *.py  if getline(1) == "" | call BufNewFile_PY()
" ----------------------------------------------------------------------------
" Indentação inteligente para python
" ----------------------------------------------------------------------------
   au! FileType python set smartindent
     \ cinwords=if,elif,else,for,while,try,except,finally,def,class
" ----------------------------------------------------------------------------
" Pydoc, plugin que integra o Pydoc com o vim 
" URL: http://www.vim.org/scripts/script.php?script_id=910
" Uso: no modo normal, digite \pw com o cursor sobre o verbete
" ----------------------------------------------------------------------------
" Para desabilitar o highlight na busca por ajuda
"  let g:pydoc_highlight = 0
" ----------------------------------------------------------------------------
" }}}

" Funções, mapeamentos e abreviações para programação para web {{{
" ----------------------------------------------------------------------------
" Relaciona o caractere < com o caractere > em arquivo HTML
" ----------------------------------------------------------------------------
   au FileType html set matchpairs+=<:> 
" ----------------------------------------------------------------------------
" Auto complete < com > em arquivo HTML
" ----------------------------------------------------------------------------
   au FileType html inoremap < <><esc>i
" ----------------------------------------------------------------------------
" Dicionário para snippets de arquivo HTML
" ----------------------------------------------------------------------------
   au FileType html set dictionary=~/.vim/dict/html.dic 
" ----------------------------------------------------------------------------
" Convertendo arquivo do vim para página em HTML (sintaxe colorida)
" ----------------------------------------------------------------------------
   map <leader>2html <ESC>:so $VIMRUNTIME/syntax/2html.vim<CR>
" ----------------------------------------------------------------------------
" }}}

" Funções, mapeamentos e abreviações programação em FORTRAN {{{
" ----------------------------------------------------------------------------
" Leia a parte relativa a FORTRAN em: http://www.vim.org/htmldoc/syntax.html
" ----------------------------------------------------------------------------
" Define qual é a extensão do arquivo
" ----------------------------------------------------------------------------
   let s:extfname = expand("%:e")
" ----------------------------------------------------------------------------
" Dependendo da extensão, é FORTRAN 77 ou FORTRAN 90/95
" Para cada caso é definido formato fixo ou formato livre do código
" Considerar ou não considerar a tabulação
" E para o caso de formato fixo, definir o exato tamanho permitido
" ----------------------------------------------------------------------------
   if s:extfname ==? "f90"
    let fortran_free_source=1
    unlet! fortran_fixed_source
    let fortran_have_tabs=1
   elseif s:extfname ==? "f95"
    let fortran_free_source=1
    unlet! fortran_fixed_source
    let fortran_have_tabs=1
   elseif s:extfname ==? "f"
    let fortran_fixed_source=1
    unlet! fortran_free_source
    set tw=72
   endif
" ----------------------------------------------------------------------------
" Mais precisão na definição de sintaxe do código
" ----------------------------------------------------------------------------
   let fortran_more_precise=1
" ----------------------------------------------------------------------------
" Usar ou não usar folders no código
" ----------------------------------------------------------------------------
"  let fortran_fold=1
"  let fortran_fold_conditionals=1
"  let fortran_fold_multilinecomments=1
" ----------------------------------------------------------------------------
" }}}

" Referências {{{
" ----------------------------------------------------------------------------
"
"    * vimbook      - tirei muitas dicas dali, mais do que isso, aprendi coisas
"                     para adaptar e escrever outras. Aliás, essa foi a força
"                     motriz para a iniciativa dessa configuração.
"      URL: http://vivaotux.blogspot.com/2009/01/nosso-livro-sobre-o-vim.html
"
"    * aurelio.net  - referência clássica, mesmo que eu não tivesse visitado a
"                     página do camarada (e eu visitei), eu teria absorvido
"                     através de terceiros.
"      URL: http://aurelio.net/
"
"    * vivaotux     - muitas dicas sobre vim (plugins e outras coisas).
"      URL: http://vivaotux.blogspot.com/
"
"    * Vim (Página oficial) - a documentação existente nesse site é fantástica.
"      URL: http://www.vim.org/
"
"    * Alguns arquivos vimrc:
"
"      * http://aurelio.net/vim/vimrc-ivan.txt
"      * http://aurelio.net/doc/vim/vimrc-voyeg3r.txt
"      * http://dotfiles.org/~voyeg3r/.vimrc
"      * http://aurelio.net/doc/dotfiles/vimrc.txt
"      * http://www.stripey.com/vim/vimrc.html
"      * http://www.8t8.us/configs/vimrc.txt
"      * http://snipt.net/voyeg3r/my-vimrc
" ----------------------------------------------------------------------------
" }}}
https://snipt.net/embed/c586054b7ab46d177e9a5f717c311eb3/
/raw/c586054b7ab46d177e9a5f717c311eb3/
c586054b7ab46d177e9a5f717c311eb3
vim
VimL
1364
2019-07-21T04:26:49
True
False
False
/api/public/snipt/6047/
arquivo-vimrc
<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> <a href="#L-910"> 910</a> <a href="#L-911"> 911</a> <a href="#L-912"> 912</a> <a href="#L-913"> 913</a> <a href="#L-914"> 914</a> <a href="#L-915"> 915</a> <a href="#L-916"> 916</a> <a href="#L-917"> 917</a> <a href="#L-918"> 918</a> <a href="#L-919"> 919</a> <a href="#L-920"> 920</a> <a href="#L-921"> 921</a> <a href="#L-922"> 922</a> <a href="#L-923"> 923</a> <a href="#L-924"> 924</a> <a href="#L-925"> 925</a> <a href="#L-926"> 926</a> <a href="#L-927"> 927</a> <a href="#L-928"> 928</a> <a href="#L-929"> 929</a> <a href="#L-930"> 930</a> <a href="#L-931"> 931</a> <a href="#L-932"> 932</a> <a href="#L-933"> 933</a> <a href="#L-934"> 934</a> <a href="#L-935"> 935</a> <a href="#L-936"> 936</a> <a href="#L-937"> 937</a> <a href="#L-938"> 938</a> <a href="#L-939"> 939</a> <a href="#L-940"> 940</a> <a href="#L-941"> 941</a> <a href="#L-942"> 942</a> <a href="#L-943"> 943</a> <a href="#L-944"> 944</a> <a href="#L-945"> 945</a> <a href="#L-946"> 946</a> <a href="#L-947"> 947</a> <a href="#L-948"> 948</a> <a href="#L-949"> 949</a> <a href="#L-950"> 950</a> <a href="#L-951"> 951</a> <a href="#L-952"> 952</a> <a href="#L-953"> 953</a> <a href="#L-954"> 954</a> <a href="#L-955"> 955</a> <a href="#L-956"> 956</a> <a href="#L-957"> 957</a> <a href="#L-958"> 958</a> <a href="#L-959"> 959</a> <a href="#L-960"> 960</a> <a href="#L-961"> 961</a> <a href="#L-962"> 962</a> <a href="#L-963"> 963</a> <a href="#L-964"> 964</a> <a href="#L-965"> 965</a> <a href="#L-966"> 966</a> <a href="#L-967"> 967</a> <a href="#L-968"> 968</a> <a href="#L-969"> 969</a> <a href="#L-970"> 970</a> <a href="#L-971"> 971</a> <a href="#L-972"> 972</a> <a href="#L-973"> 973</a> <a href="#L-974"> 974</a> <a href="#L-975"> 975</a> <a href="#L-976"> 976</a> <a href="#L-977"> 977</a> <a href="#L-978"> 978</a> <a href="#L-979"> 979</a> <a href="#L-980"> 980</a> <a href="#L-981"> 981</a> <a href="#L-982"> 982</a> <a href="#L-983"> 983</a> <a href="#L-984"> 984</a> <a href="#L-985"> 985</a> <a href="#L-986"> 986</a> <a href="#L-987"> 987</a> <a href="#L-988"> 988</a> <a href="#L-989"> 989</a> <a href="#L-990"> 990</a> <a href="#L-991"> 991</a> <a href="#L-992"> 992</a> <a href="#L-993"> 993</a> <a href="#L-994"> 994</a> <a href="#L-995"> 995</a> <a href="#L-996"> 996</a> <a href="#L-997"> 997</a> <a href="#L-998"> 998</a> <a href="#L-999"> 999</a> <a href="#L-1000">1000</a> <a href="#L-1001">1001</a> <a href="#L-1002">1002</a> <a href="#L-1003">1003</a> <a href="#L-1004">1004</a> <a href="#L-1005">1005</a> <a href="#L-1006">1006</a> <a href="#L-1007">1007</a> <a href="#L-1008">1008</a> <a href="#L-1009">1009</a> <a href="#L-1010">1010</a> <a href="#L-1011">1011</a> <a href="#L-1012">1012</a> <a href="#L-1013">1013</a> <a href="#L-1014">1014</a> <a href="#L-1015">1015</a> <a href="#L-1016">1016</a> <a href="#L-1017">1017</a> <a href="#L-1018">1018</a> <a href="#L-1019">1019</a> <a href="#L-1020">1020</a> <a href="#L-1021">1021</a> <a href="#L-1022">1022</a> <a href="#L-1023">1023</a> <a href="#L-1024">1024</a> <a href="#L-1025">1025</a> <a href="#L-1026">1026</a> <a href="#L-1027">1027</a> <a href="#L-1028">1028</a> <a href="#L-1029">1029</a> <a href="#L-1030">1030</a> <a href="#L-1031">1031</a> <a href="#L-1032">1032</a> <a href="#L-1033">1033</a> <a href="#L-1034">1034</a> <a href="#L-1035">1035</a> <a href="#L-1036">1036</a> <a href="#L-1037">1037</a> <a href="#L-1038">1038</a> <a href="#L-1039">1039</a> <a href="#L-1040">1040</a> <a href="#L-1041">1041</a> <a href="#L-1042">1042</a> <a href="#L-1043">1043</a> <a href="#L-1044">1044</a> <a href="#L-1045">1045</a> <a href="#L-1046">1046</a> <a href="#L-1047">1047</a> <a href="#L-1048">1048</a> <a href="#L-1049">1049</a> <a href="#L-1050">1050</a> <a href="#L-1051">1051</a> <a href="#L-1052">1052</a> <a href="#L-1053">1053</a> <a href="#L-1054">1054</a> <a href="#L-1055">1055</a> <a href="#L-1056">1056</a> <a href="#L-1057">1057</a> <a href="#L-1058">1058</a> <a href="#L-1059">1059</a> <a href="#L-1060">1060</a> <a href="#L-1061">1061</a> <a href="#L-1062">1062</a> <a href="#L-1063">1063</a> <a href="#L-1064">1064</a> <a href="#L-1065">1065</a> <a href="#L-1066">1066</a> <a href="#L-1067">1067</a> <a href="#L-1068">1068</a> <a href="#L-1069">1069</a> <a href="#L-1070">1070</a> <a href="#L-1071">1071</a> <a href="#L-1072">1072</a> <a href="#L-1073">1073</a> <a href="#L-1074">1074</a> <a href="#L-1075">1075</a> <a href="#L-1076">1076</a> <a href="#L-1077">1077</a> <a href="#L-1078">1078</a> <a href="#L-1079">1079</a> <a href="#L-1080">1080</a> <a href="#L-1081">1081</a> <a href="#L-1082">1082</a> <a href="#L-1083">1083</a> <a href="#L-1084">1084</a> <a href="#L-1085">1085</a> <a href="#L-1086">1086</a> <a href="#L-1087">1087</a> <a href="#L-1088">1088</a> <a href="#L-1089">1089</a> <a href="#L-1090">1090</a> <a href="#L-1091">1091</a> <a href="#L-1092">1092</a> <a href="#L-1093">1093</a> <a href="#L-1094">1094</a> <a href="#L-1095">1095</a> <a href="#L-1096">1096</a> <a href="#L-1097">1097</a> <a href="#L-1098">1098</a> <a href="#L-1099">1099</a> <a href="#L-1100">1100</a> <a href="#L-1101">1101</a> <a href="#L-1102">1102</a> <a href="#L-1103">1103</a> <a href="#L-1104">1104</a> <a href="#L-1105">1105</a> <a href="#L-1106">1106</a> <a href="#L-1107">1107</a> <a href="#L-1108">1108</a> <a href="#L-1109">1109</a> <a href="#L-1110">1110</a> <a href="#L-1111">1111</a> <a href="#L-1112">1112</a> <a href="#L-1113">1113</a> <a href="#L-1114">1114</a> <a href="#L-1115">1115</a> <a href="#L-1116">1116</a> <a href="#L-1117">1117</a> <a href="#L-1118">1118</a> <a href="#L-1119">1119</a> <a href="#L-1120">1120</a> <a href="#L-1121">1121</a> <a href="#L-1122">1122</a> <a href="#L-1123">1123</a> <a href="#L-1124">1124</a> <a href="#L-1125">1125</a> <a href="#L-1126">1126</a> <a href="#L-1127">1127</a> <a href="#L-1128">1128</a> <a href="#L-1129">1129</a> <a href="#L-1130">1130</a> <a href="#L-1131">1131</a> <a href="#L-1132">1132</a> <a href="#L-1133">1133</a> <a href="#L-1134">1134</a> <a href="#L-1135">1135</a> <a href="#L-1136">1136</a> <a href="#L-1137">1137</a> <a href="#L-1138">1138</a> <a href="#L-1139">1139</a> <a href="#L-1140">1140</a> <a href="#L-1141">1141</a> <a href="#L-1142">1142</a> <a href="#L-1143">1143</a> <a href="#L-1144">1144</a> <a href="#L-1145">1145</a> <a href="#L-1146">1146</a> <a href="#L-1147">1147</a> <a href="#L-1148">1148</a> <a href="#L-1149">1149</a> <a href="#L-1150">1150</a> <a href="#L-1151">1151</a> <a href="#L-1152">1152</a> <a href="#L-1153">1153</a> <a href="#L-1154">1154</a> <a href="#L-1155">1155</a> <a href="#L-1156">1156</a> <a href="#L-1157">1157</a> <a href="#L-1158">1158</a> <a href="#L-1159">1159</a> <a href="#L-1160">1160</a> <a href="#L-1161">1161</a> <a href="#L-1162">1162</a> <a href="#L-1163">1163</a> <a href="#L-1164">1164</a> <a href="#L-1165">1165</a> <a href="#L-1166">1166</a> <a href="#L-1167">1167</a> <a href="#L-1168">1168</a> <a href="#L-1169">1169</a> <a href="#L-1170">1170</a> <a href="#L-1171">1171</a> <a href="#L-1172">1172</a> <a href="#L-1173">1173</a> <a href="#L-1174">1174</a> <a href="#L-1175">1175</a> <a href="#L-1176">1176</a> <a href="#L-1177">1177</a> <a href="#L-1178">1178</a> <a href="#L-1179">1179</a> <a href="#L-1180">1180</a> <a href="#L-1181">1181</a> <a href="#L-1182">1182</a> <a href="#L-1183">1183</a> <a href="#L-1184">1184</a> <a href="#L-1185">1185</a> <a href="#L-1186">1186</a> <a href="#L-1187">1187</a> <a href="#L-1188">1188</a> <a href="#L-1189">1189</a> <a href="#L-1190">1190</a> <a href="#L-1191">1191</a> <a href="#L-1192">1192</a> <a href="#L-1193">1193</a> <a href="#L-1194">1194</a> <a href="#L-1195">1195</a> <a href="#L-1196">1196</a> <a href="#L-1197">1197</a> <a href="#L-1198">1198</a> <a href="#L-1199">1199</a> <a href="#L-1200">1200</a> <a href="#L-1201">1201</a> <a href="#L-1202">1202</a> <a href="#L-1203">1203</a> <a href="#L-1204">1204</a> <a href="#L-1205">1205</a> <a href="#L-1206">1206</a> <a href="#L-1207">1207</a> <a href="#L-1208">1208</a> <a href="#L-1209">1209</a> <a href="#L-1210">1210</a> <a href="#L-1211">1211</a> <a href="#L-1212">1212</a> <a href="#L-1213">1213</a> <a href="#L-1214">1214</a> <a href="#L-1215">1215</a> <a href="#L-1216">1216</a> <a href="#L-1217">1217</a> <a href="#L-1218">1218</a> <a href="#L-1219">1219</a> <a href="#L-1220">1220</a> <a href="#L-1221">1221</a> <a href="#L-1222">1222</a> <a href="#L-1223">1223</a> <a href="#L-1224">1224</a> <a href="#L-1225">1225</a> <a href="#L-1226">1226</a> <a href="#L-1227">1227</a> <a href="#L-1228">1228</a> <a href="#L-1229">1229</a> <a href="#L-1230">1230</a> <a href="#L-1231">1231</a> <a href="#L-1232">1232</a> <a href="#L-1233">1233</a> <a href="#L-1234">1234</a> <a href="#L-1235">1235</a> <a href="#L-1236">1236</a> <a href="#L-1237">1237</a> <a href="#L-1238">1238</a> <a href="#L-1239">1239</a> <a href="#L-1240">1240</a> <a href="#L-1241">1241</a> <a href="#L-1242">1242</a> <a href="#L-1243">1243</a> <a href="#L-1244">1244</a> <a href="#L-1245">1245</a> <a href="#L-1246">1246</a> <a href="#L-1247">1247</a> <a href="#L-1248">1248</a> <a href="#L-1249">1249</a> <a href="#L-1250">1250</a> <a href="#L-1251">1251</a> <a href="#L-1252">1252</a> <a href="#L-1253">1253</a> <a href="#L-1254">1254</a> <a href="#L-1255">1255</a> <a href="#L-1256">1256</a> <a href="#L-1257">1257</a> <a href="#L-1258">1258</a> <a href="#L-1259">1259</a> <a href="#L-1260">1260</a> <a href="#L-1261">1261</a> <a href="#L-1262">1262</a> <a href="#L-1263">1263</a> <a href="#L-1264">1264</a> <a href="#L-1265">1265</a> <a href="#L-1266">1266</a> <a href="#L-1267">1267</a> <a href="#L-1268">1268</a> <a href="#L-1269">1269</a> <a href="#L-1270">1270</a> <a href="#L-1271">1271</a> <a href="#L-1272">1272</a> <a href="#L-1273">1273</a> <a href="#L-1274">1274</a> <a href="#L-1275">1275</a> <a href="#L-1276">1276</a> <a href="#L-1277">1277</a> <a href="#L-1278">1278</a> <a href="#L-1279">1279</a> <a href="#L-1280">1280</a> <a href="#L-1281">1281</a> <a href="#L-1282">1282</a> <a href="#L-1283">1283</a> <a href="#L-1284">1284</a> <a href="#L-1285">1285</a> <a href="#L-1286">1286</a> <a href="#L-1287">1287</a> <a href="#L-1288">1288</a> <a href="#L-1289">1289</a> <a href="#L-1290">1290</a> <a href="#L-1291">1291</a> <a href="#L-1292">1292</a> <a href="#L-1293">1293</a> <a href="#L-1294">1294</a> <a href="#L-1295">1295</a> <a href="#L-1296">1296</a> <a href="#L-1297">1297</a> <a href="#L-1298">1298</a> <a href="#L-1299">1299</a> <a href="#L-1300">1300</a> <a href="#L-1301">1301</a> <a href="#L-1302">1302</a> <a href="#L-1303">1303</a> <a href="#L-1304">1304</a> <a href="#L-1305">1305</a> <a href="#L-1306">1306</a> <a href="#L-1307">1307</a> <a href="#L-1308">1308</a> <a href="#L-1309">1309</a> <a href="#L-1310">1310</a> <a href="#L-1311">1311</a> <a href="#L-1312">1312</a> <a href="#L-1313">1313</a> <a href="#L-1314">1314</a> <a href="#L-1315">1315</a> <a href="#L-1316">1316</a> <a href="#L-1317">1317</a> <a href="#L-1318">1318</a> <a href="#L-1319">1319</a> <a href="#L-1320">1320</a> <a href="#L-1321">1321</a> <a href="#L-1322">1322</a> <a href="#L-1323">1323</a> <a href="#L-1324">1324</a> <a href="#L-1325">1325</a> <a href="#L-1326">1326</a> <a href="#L-1327">1327</a> <a href="#L-1328">1328</a> <a href="#L-1329">1329</a> <a href="#L-1330">1330</a> <a href="#L-1331">1331</a> <a href="#L-1332">1332</a> <a href="#L-1333">1333</a> <a href="#L-1334">1334</a> <a href="#L-1335">1335</a> <a href="#L-1336">1336</a> <a href="#L-1337">1337</a> <a href="#L-1338">1338</a> <a href="#L-1339">1339</a> <a href="#L-1340">1340</a> <a href="#L-1341">1341</a> <a href="#L-1342">1342</a> <a href="#L-1343">1343</a> <a href="#L-1344">1344</a> <a href="#L-1345">1345</a> <a href="#L-1346">1346</a> <a href="#L-1347">1347</a> <a href="#L-1348">1348</a> <a href="#L-1349">1349</a> <a href="#L-1350">1350</a> <a href="#L-1351">1351</a> <a href="#L-1352">1352</a> <a href="#L-1353">1353</a> <a href="#L-1354">1354</a> <a href="#L-1355">1355</a> <a href="#L-1356">1356</a> <a href="#L-1357">1357</a> <a href="#L-1358">1358</a> <a href="#L-1359">1359</a> <a href="#L-1360">1360</a> <a href="#L-1361">1361</a> <a href="#L-1362">1362</a> <a href="#L-1363">1363</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; ****************************************************************************</span> </span><span id="L-2"><a name="L-2"></a><span class="c">&quot; * File: .vimrc </span> </span><span id="L-3"><a name="L-3"></a><span class="c">&quot; * Author: J. F. Mitre &lt;jfmitre (at) gmail.com&gt;</span> </span><span id="L-4"><a name="L-4"></a><span class="c">&quot; * Url: &lt;URL:http://jfmitre.com, http://notasemcfd.blogspot.com&gt; </span> </span><span id="L-5"><a name="L-5"></a><span class="c">&quot; * Last Update: Qua 03 Jun 2009 15:31:23 BRT</span> </span><span id="L-6"><a name="L-6"></a><span class="c">&quot; * Created: Sex 22 Mai 2009 10:01:22 BRT </span> </span><span id="L-7"><a name="L-7"></a><span class="c">&quot; * Installation: - As dotfile drop the file into your $HOME/ folder. </span> </span><span id="L-8"><a name="L-8"></a><span class="c">&quot; * - In Command line put $vim -U .vimrc. </span> </span><span id="L-9"><a name="L-9"></a><span class="c">&quot; * License: GNU General Public License v3</span> </span><span id="L-10"><a name="L-10"></a><span class="c">&quot; * &lt;http://www.gnu.org/licenses/gpl.html&gt;</span> </span><span id="L-11"><a name="L-11"></a><span class="c">&quot; * Version: 2.0</span> </span><span id="L-12"><a name="L-12"></a><span class="c">&quot; * Notes: Based on the file .vimrc (1.0) made by Ivan Carlos da Silva Lopes </span> </span><span id="L-13"><a name="L-13"></a><span class="c">&quot; * .vimrc made by Aurelio Marinho Jarga (verde) and </span> </span><span id="L-14"><a name="L-14"></a><span class="c">&quot; * .vimrc made by Sérgio Luiz Araújo Silva (voyeg3r) </span> </span><span id="L-15"><a name="L-15"></a><span class="c">&quot; * </span> </span><span id="L-16"><a name="L-16"></a><span class="c">&quot; ****************************************************************************</span> </span><span id="L-17"><a name="L-17"></a> </span><span id="L-18"><a name="L-18"></a><span class="c">&quot; Configuração do Ambiente de Edição {{{</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; Use VIM padrão é muito melhor</span> </span><span id="L-21"><a name="L-21"></a><span class="c">&quot; Valores padrão para algumas opções são adequados ao Vim, não Vi.</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="k">set</span> <span class="nb">nocompatible</span> </span><span id="L-24"><a name="L-24"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-25"><a name="L-25"></a><span class="c">&quot; Definindo o bash para o GNU/Linux</span> </span><span id="L-26"><a name="L-26"></a><span class="c">&quot; ---------------------------------------------------------------------------- </span> </span><span id="L-27"><a name="L-27"></a> <span class="k">if</span> has<span class="p">(</span><span class="s2">&quot;unix&quot;</span><span class="p">)</span> </span><span id="L-28"><a name="L-28"></a> <span class="k">let</span> &amp;<span class="k">shell</span><span class="p">=</span><span class="s2">&quot;bash&quot;</span> </span><span id="L-29"><a name="L-29"></a> <span class="k">set</span> <span class="nb">clipboard</span><span class="p">=</span>autoselect </span><span id="L-30"><a name="L-30"></a> <span class="k">endif</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="c">&quot; Numerando as linhas do arquivo, isto é, qualquer arquivo carregado é</span> </span><span id="L-33"><a name="L-33"></a><span class="c">&quot; Editado com a numeração de linhas ligada</span> </span><span id="L-34"><a name="L-34"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-35"><a name="L-35"></a> <span class="k">set</span> <span class="k">number</span> </span><span id="L-36"><a name="L-36"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-37"><a name="L-37"></a><span class="c">&quot; Permite remover e adicionar o número de linhas</span> </span><span id="L-38"><a name="L-38"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-39"><a name="L-39"></a> map <span class="p">&lt;</span>C<span class="p">-</span>F11<span class="p">&gt;</span> :<span class="k">set</span> <span class="k">nu</span><span class="p">!&lt;</span><span class="k">cr</span><span class="p">&gt;</span> </span><span id="L-40"><a name="L-40"></a> imap <span class="p">&lt;</span>C<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="k">nu</span><span class="p">!&lt;</span><span class="k">cr</span><span class="p">&gt;</span> </span><span id="L-41"><a name="L-41"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-42"><a name="L-42"></a><span class="c">&quot; Exibe o modo atual de operações do VI (Inserção ou comandos)</span> </span><span id="L-43"><a name="L-43"></a><span class="c">&quot; Mostra o modo que você esta.</span> </span><span id="L-44"><a name="L-44"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-45"><a name="L-45"></a> <span class="k">set</span> <span class="nb">showmode</span> </span><span id="L-46"><a name="L-46"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-47"><a name="L-47"></a><span class="c">&quot; Recua cada linha para o mesmo nível da linha superior</span> </span><span id="L-48"><a name="L-48"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-49"><a name="L-49"></a> <span class="k">set</span> <span class="nb">autoindent</span> </span><span id="L-50"><a name="L-50"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-51"><a name="L-51"></a><span class="c">&quot; Aqui definimos uma chave para a alternância entre os modos:</span> </span><span id="L-52"><a name="L-52"></a><span class="c">&quot;</span> </span><span id="L-53"><a name="L-53"></a><span class="c">&quot; -- INSERT (paste) -- e -- INSERT --</span> </span><span id="L-54"><a name="L-54"></a><span class="c">&quot;</span> </span><span id="L-55"><a name="L-55"></a><span class="c">&quot; O primeiro não segue o padrão de linha indentada enquanto o segundo</span> </span><span id="L-56"><a name="L-56"></a><span class="c">&quot; é o modo normal de trabalho. Digitar &lt;F2&gt; alterna entre os dois modos</span> </span><span id="L-57"><a name="L-57"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-58"><a name="L-58"></a> <span class="k">set</span> <span class="nb">pastetoggle</span><span class="p">=&lt;</span>F2<span class="p">&gt;</span> </span><span id="L-59"><a name="L-59"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-60"><a name="L-60"></a><span class="c">&quot; régua: mostra a posição do cursor</span> </span><span id="L-61"><a name="L-61"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-62"><a name="L-62"></a> <span class="k">set</span> <span class="nb">ruler</span> </span><span id="L-63"><a name="L-63"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-64"><a name="L-64"></a><span class="c">&quot; Caso o arquivo seja modificado FORA do vim ele é atualizado DENTRO do vim</span> </span><span id="L-65"><a name="L-65"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-66"><a name="L-66"></a> <span class="k">set</span> <span class="nb">autoread</span> </span><span id="L-67"><a name="L-67"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-68"><a name="L-68"></a><span class="c">&quot; tabstop: número de colunas para o comando &lt;TAB&gt;</span> </span><span id="L-69"><a name="L-69"></a><span class="c">&quot; A tecla TAB no vim vem padronizada com 8 espaços, sendo assim, quando</span> </span><span id="L-70"><a name="L-70"></a><span class="c">&quot; editar um código em c, c++, pascal ou outra linguagem qualquer o texto</span> </span><span id="L-71"><a name="L-71"></a><span class="c">&quot; do código torna-se algo meio confuso, principalmente quando o código é</span> </span><span id="L-72"><a name="L-72"></a><span class="c">&quot; longo e possui inúmeros escopos. Para tanto, podemos mudar o tamanho do</span> </span><span id="L-73"><a name="L-73"></a><span class="c">&quot; TAB, isto é do número de espaços gerados pelo mesmo, utilizando o comando</span> </span><span id="L-74"><a name="L-74"></a><span class="c">&quot; &#39;set tabstop=3&#39; que transforma o tamanho do TAB de 8 para 3.</span> </span><span id="L-75"><a name="L-75"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-76"><a name="L-76"></a> <span class="k">set</span> <span class="k">ts</span><span class="p">=</span><span class="m">3</span> </span><span id="L-77"><a name="L-77"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-78"><a name="L-78"></a><span class="c">&quot; Tabs são convertidos para espaços por padrão</span> </span><span id="L-79"><a name="L-79"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-80"><a name="L-80"></a> <span class="k">set</span> <span class="nb">expandtab</span> </span><span id="L-81"><a name="L-81"></a><span class="c">&quot; set noexpandtab</span> </span><span id="L-82"><a name="L-82"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-83"><a name="L-83"></a><span class="c">&quot; ShiftWidth: número de colunas deslocadas pelo comando &gt; ou &lt;</span> </span><span id="L-84"><a name="L-84"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-85"><a name="L-85"></a> <span class="k">set</span> <span class="k">sw</span><span class="p">=</span><span class="m">3</span> </span><span id="L-86"><a name="L-86"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-87"><a name="L-87"></a><span class="c">&quot; SHortMessages: encurta as mensagem da régua</span> </span><span id="L-88"><a name="L-88"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-89"><a name="L-89"></a><span class="c">&quot; set shm=filmnrwxt</span> </span><span id="L-90"><a name="L-90"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-91"><a name="L-91"></a><span class="c">&quot; ShowMatch: Toda vez que você fecha um parêntese, colchete</span> </span><span id="L-92"><a name="L-92"></a><span class="c">&quot; ou chave, o Vi mostra onde este foi aberto. Caso não haja</span> </span><span id="L-93"><a name="L-93"></a><span class="c">&quot; nenhum aberto para este, deixa em vermelho parênteses ou</span> </span><span id="L-94"><a name="L-94"></a><span class="c">&quot; chaves que não têm um par.</span> </span><span id="L-95"><a name="L-95"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-96"><a name="L-96"></a> <span class="k">set</span> <span class="k">sm</span> </span><span id="L-97"><a name="L-97"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-98"><a name="L-98"></a><span class="c">&quot; mostra os comandos sendo executados</span> </span><span id="L-99"><a name="L-99"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-100"><a name="L-100"></a> <span class="k">set</span> <span class="nb">showcmd</span> </span><span id="L-101"><a name="L-101"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-102"><a name="L-102"></a><span class="c">&quot; Configurações de filetype</span> </span><span id="L-103"><a name="L-103"></a><span class="c">&quot; Check :filetype para status atual </span> </span><span id="L-104"><a name="L-104"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-105"><a name="L-105"></a> <span class="k">filetype</span> <span class="k">on</span> </span><span id="L-106"><a name="L-106"></a> <span class="k">filetype</span> plugin <span class="k">on</span> </span><span id="L-107"><a name="L-107"></a><span class="c">&quot; filetype indent on</span> </span><span id="L-108"><a name="L-108"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-109"><a name="L-109"></a><span class="c">&quot; reporta ações com linhas no rodapé</span> </span><span id="L-110"><a name="L-110"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-111"><a name="L-111"></a> <span class="k">set</span> <span class="nb">report</span><span class="p">=</span><span class="m">0</span> </span><span id="L-112"><a name="L-112"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-113"><a name="L-113"></a><span class="c">&quot; Usando &lt;BkSpc&gt; para deletar linha</span> </span><span id="L-114"><a name="L-114"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-115"><a name="L-115"></a> <span class="k">set</span> <span class="nb">backspace</span><span class="p">=</span><span class="nb">eol</span><span class="p">,</span><span class="k">start</span><span class="p">,</span>indent </span><span id="L-116"><a name="L-116"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-117"><a name="L-117"></a><span class="c">&quot; Tecla Backspace volta 4 espaços quando estiver numa indentação.</span> </span><span id="L-118"><a name="L-118"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-119"><a name="L-119"></a> <span class="k">set</span> <span class="nb">softtabstop</span><span class="p">=</span><span class="m">3</span> </span><span id="L-120"><a name="L-120"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-121"><a name="L-121"></a><span class="c">&quot; Permite mover com as setas para áreas onde não tem texto.</span> </span><span id="L-122"><a name="L-122"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-123"><a name="L-123"></a><span class="c">&quot; set ve=all</span> </span><span id="L-124"><a name="L-124"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-125"><a name="L-125"></a><span class="c">&quot; (window) Define o número de linhas deslocadas com os comandos</span> </span><span id="L-126"><a name="L-126"></a><span class="c">&quot; ^B (Ctrl+B) e ^F (Ctrl+F)</span> </span><span id="L-127"><a name="L-127"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-128"><a name="L-128"></a> <span class="k">set</span> <span class="nb">window</span><span class="p">=</span><span class="m">10</span> </span><span id="L-129"><a name="L-129"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-130"><a name="L-130"></a><span class="c">&quot; Define o número de linhas deslocadas com os comandos</span> </span><span id="L-131"><a name="L-131"></a><span class="c">&quot; ^U (Ctrl+U) e ^D (Ctrl+D)</span> </span><span id="L-132"><a name="L-132"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-133"><a name="L-133"></a> <span class="k">set</span> <span class="nb">scroll</span><span class="p">=</span><span class="m">5</span> </span><span id="L-134"><a name="L-134"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-135"><a name="L-135"></a><span class="c">&quot; Em caso de se cometer um comando inválido aciona-se um alarme visual</span> </span><span id="L-136"><a name="L-136"></a><span class="c">&quot; visual-bells</span> </span><span id="L-137"><a name="L-137"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-138"><a name="L-138"></a><span class="c">&quot; set visualbell</span> </span><span id="L-139"><a name="L-139"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-140"><a name="L-140"></a><span class="c">&quot; Em caso de se cometer um comando inválido aciona-se um alarme sonoro</span> </span><span id="L-141"><a name="L-141"></a><span class="c">&quot; error-bells</span> </span><span id="L-142"><a name="L-142"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-143"><a name="L-143"></a><span class="c">&quot; Para habilitar</span> </span><span id="L-144"><a name="L-144"></a><span class="c">&quot; set eb</span> </span><span id="L-145"><a name="L-145"></a><span class="c">&quot; Para desabilitar</span> </span><span id="L-146"><a name="L-146"></a> <span class="k">set</span> <span class="nb">noerrorbells</span> </span><span id="L-147"><a name="L-147"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-148"><a name="L-148"></a><span class="c">&quot; Habilita o salvamento automático (parcial ou completo)</span> </span><span id="L-149"><a name="L-149"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-150"><a name="L-150"></a><span class="c">&quot; set autowrite </span> </span><span id="L-151"><a name="L-151"></a><span class="c">&quot; set autowriteall</span> </span><span id="L-152"><a name="L-152"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-153"><a name="L-153"></a><span class="c">&quot; Envia mais caracteres ao terminal, melhorando o redraw de janelas.</span> </span><span id="L-154"><a name="L-154"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-155"><a name="L-155"></a> <span class="k">set</span> <span class="nb">ttyfast</span> </span><span id="L-156"><a name="L-156"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-157"><a name="L-157"></a><span class="c">&quot; Antes de sobrescrever um arquivo mantém um backup do mesmo</span> </span><span id="L-158"><a name="L-158"></a><span class="c">&quot;</span> </span><span id="L-159"><a name="L-159"></a><span class="c">&quot; Por exemplo, após salvar um arquivo de nome Alfa.txt, o vim cria uo</span> </span><span id="L-160"><a name="L-160"></a><span class="c">&quot; outro arquivo chamado Alfa.txt~ com a configuração anterior do arquivo</span> </span><span id="L-161"><a name="L-161"></a><span class="c">&quot; antes do mesmo ser alterado</span> </span><span id="L-162"><a name="L-162"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-163"><a name="L-163"></a> <span class="k">set</span> <span class="nb">bk</span> </span><span id="L-164"><a name="L-164"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-165"><a name="L-165"></a><span class="c">&quot; Usar a pasta pessoal de backup</span> </span><span id="L-166"><a name="L-166"></a><span class="c">&quot; É onde será escrito o arquivo *~ </span> </span><span id="L-167"><a name="L-167"></a><span class="c">&quot; Nessa configuração, primeiro usa o diretório ~/.vim/.backup, se não existir</span> </span><span id="L-168"><a name="L-168"></a><span class="c">&quot; usa o diretório corrente</span> </span><span id="L-169"><a name="L-169"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-170"><a name="L-170"></a> <span class="k">set</span> <span class="nb">backupdir</span><span class="p">=~</span><span class="sr">/.vim/</span>.<span class="nb">backup</span>/<span class="p">,</span>. </span><span id="L-171"><a name="L-171"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-172"><a name="L-172"></a><span class="c">&quot; Habilita a mudança de coluna quando movimenta-se através das linhas</span> </span><span id="L-173"><a name="L-173"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-174"><a name="L-174"></a><span class="c">&quot; set startofline</span> </span><span id="L-175"><a name="L-175"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-176"><a name="L-176"></a><span class="c">&quot; Diretórios onde o VIM busca por arquivos</span> </span><span id="L-177"><a name="L-177"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-178"><a name="L-178"></a> <span class="k">set</span> <span class="nb">path</span><span class="p">=</span>.<span class="p">,</span>.<span class="sr">/include/</span><span class="p">,</span><span class="sr">/usr/</span><span class="nb">include</span><span class="sr">/,/</span>usr<span class="sr">/local/</span><span class="nb">bin</span><span class="sr">/,~/</span>.<span class="k">vim</span><span class="sr">/scripts/</span> </span><span id="L-179"><a name="L-179"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-180"><a name="L-180"></a><span class="c">&quot; Uma configuração interessante da barra de status é defini-la com tamanho de </span> </span><span id="L-181"><a name="L-181"></a><span class="c">&quot; duas linhas e fundo com cor azul e fonte branca.</span> </span><span id="L-182"><a name="L-182"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-183"><a name="L-183"></a><span class="c">&quot; Mostra duas linhas</span> </span><span id="L-184"><a name="L-184"></a> <span class="k">set</span> <span class="nb">laststatus</span><span class="p">=</span><span class="m">2</span> </span><span id="L-185"><a name="L-185"></a><span class="c">&quot; Fundo azul e fonte branca (foi adicionando ao meu código de cores nativas)</span> </span><span id="L-186"><a name="L-186"></a><span class="c">&quot; highlight StatusLine ctermfg=blue ctermbg=white</span> </span><span id="L-187"><a name="L-187"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-188"><a name="L-188"></a><span class="c">&quot; Configurando o formato da régua</span> </span><span id="L-189"><a name="L-189"></a><span class="c">&quot; Novos arquivos possuem uma data de modificação em um certo dia muito tempo</span> </span><span id="L-190"><a name="L-190"></a><span class="c">&quot; no passado. Ignore. </span> </span><span id="L-191"><a name="L-191"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-192"><a name="L-192"></a><span class="c">&quot; set statusline=%t%m%r%h%w</span> </span><span id="L-193"><a name="L-193"></a><span class="c">&quot; \%=[FORMATO=%{&amp;ff}]</span> </span><span id="L-194"><a name="L-194"></a><span class="c">&quot; \[TIPO=%Y]</span> </span><span id="L-195"><a name="L-195"></a><span class="c">&quot; \[ASCII=%03b]</span> </span><span id="L-196"><a name="L-196"></a><span class="c">&quot; \[HEX=%02B]</span> </span><span id="L-197"><a name="L-197"></a><span class="c">&quot; \[\ XY=%04v,%04l]</span> </span><span id="L-198"><a name="L-198"></a><span class="c">&quot; \[%03P]</span> </span><span id="L-199"><a name="L-199"></a><span class="c">&quot; set statusline=%&lt;%F%h%m%r%h%w%y\ ft:%{&amp;ft}\ ff:%{&amp;ff}\ </span> </span><span id="L-200"><a name="L-200"></a><span class="c">&quot; \Modificado:\ %{strftime(\&quot;%a\ %d/%B/%Y\ %H:%M:%S\&quot;,</span> </span><span id="L-201"><a name="L-201"></a><span class="c">&quot; \getftime(expand(\&quot;%:p\&quot;)))}%=\ coluna:%04v\ linha:%04l\ </span> </span><span id="L-202"><a name="L-202"></a><span class="c">&quot; \total:%04L\ hex:%03.3B\ ascii:%03.3b\ %03P\</span> </span><span id="L-203"><a name="L-203"></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 class="nb">ft</span>:%{&amp;<span class="nb">ft</span>}\ <span class="nb">ff</span>:%{&amp;<span class="nb">ff</span>}\ </span><span id="L-204"><a name="L-204"></a> \Modificado:\ %{strftime<span class="p">(</span>\<span class="s2">&quot;%c\&quot;,getftime(expand(\&quot;%:p\&quot;</span><span class="p">)))</span>} </span><span id="L-205"><a name="L-205"></a> \%<span class="p">=</span>\ coluna:%<span class="m">04</span>v\ linha:%<span class="m">04</span>l\ </span><span id="L-206"><a name="L-206"></a> \total:%<span class="m">04</span>L\ hex:%<span class="m">03</span>.<span class="m">3</span>B\ <span class="k">ascii</span>:%<span class="m">03</span>.<span class="m">3</span>b\ %<span class="m">03</span>P\ </span><span id="L-207"><a name="L-207"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-208"><a name="L-208"></a><span class="c">&quot; Mostra o nome do arquivo na parte superior do prompt</span> </span><span id="L-209"><a name="L-209"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-210"><a name="L-210"></a> <span class="k">set</span> <span class="nb">title</span> </span><span id="L-211"><a name="L-211"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-212"><a name="L-212"></a><span class="c">&quot; Alguns tipos de arquivos devem ser ignorados pelo Vim.</span> </span><span id="L-213"><a name="L-213"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-214"><a name="L-214"></a> <span class="k">set</span> <span class="nb">wildignore</span><span class="p">=</span>*.<span class="k">o</span><span class="p">,</span>*.obj<span class="p">,</span>*.bak<span class="p">,</span>*.exe<span class="p">,</span>*.dll<span class="p">,</span>*.<span class="k">com</span><span class="p">,</span>*.class<span class="p">,</span>*.<span class="k">au</span><span class="p">,</span>*.wav<span class="p">,</span>*.<span class="k">ps</span><span class="p">,</span>\ </span><span id="L-215"><a name="L-215"></a> \*.avi<span class="p">,</span>*.wmv<span class="p">,</span>*.flv<span class="p">,</span>*.djvu<span class="p">,</span>*.pdf<span class="p">,</span>*.chm<span class="p">,</span>*.dvi<span class="p">,</span>*.svn/<span class="p">,</span>*<span class="p">~</span> </span><span id="L-216"><a name="L-216"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-217"><a name="L-217"></a><span class="c">&quot; Definindo e trabalhando com histórico da linha de comando</span> </span><span id="L-218"><a name="L-218"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-219"><a name="L-219"></a> <span class="k">set</span> <span class="nb">cedit</span><span class="p">=&lt;</span>Esc<span class="p">&gt;</span> </span><span id="L-220"><a name="L-220"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-221"><a name="L-221"></a><span class="c">&quot; (history) Define o tamanho do arquivo de histórico, onde &lt;valor&gt; é o</span> </span><span id="L-222"><a name="L-222"></a><span class="c">&quot; número de linhas de comandos a serem armazenados (5000).</span> </span><span id="L-223"><a name="L-223"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-224"><a name="L-224"></a> <span class="k">set</span> <span class="k">hi</span><span class="p">=</span><span class="m">5000</span> </span><span id="L-225"><a name="L-225"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-226"><a name="L-226"></a><span class="c">&quot; Guarda posição do cursor e histórico da linha de comando :</span> </span><span id="L-227"><a name="L-227"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-228"><a name="L-228"></a> <span class="k">set</span> <span class="nb">viminfo</span><span class="p">=</span>&#39;<span class="m">100</span><span class="p">,</span>\&quot;<span class="m">1000</span><span class="p">,</span>:<span class="m">40</span><span class="p">,</span>%<span class="p">,</span><span class="k">n</span><span class="p">~</span>/.<span class="nb">viminfo</span> </span><span id="L-229"><a name="L-229"></a> <span class="k">au</span> <span class="nb">BufReadPost</span> * <span class="k">if</span> line<span class="p">(</span><span class="s2">&quot;&#39;\&quot;&quot;</span><span class="p">)|</span>execute<span class="p">(</span><span class="s2">&quot;normal `\&quot;&quot;</span><span class="p">)|</span><span class="k">endif</span> </span><span id="L-230"><a name="L-230"></a> autocmd <span class="nb">BufReadPost</span> * </span><span id="L-231"><a name="L-231"></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-232"><a name="L-232"></a> \ exe <span class="s2">&quot;normal g`\&quot;&quot;</span> <span class="p">|</span> </span><span id="L-233"><a name="L-233"></a> \ <span class="k">endif</span> </span><span id="L-234"><a name="L-234"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-235"><a name="L-235"></a><span class="c">&quot; Tamanho da barra de título</span> </span><span id="L-236"><a name="L-236"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-237"><a name="L-237"></a> <span class="k">set</span> <span class="nb">titlelen</span><span class="p">=</span><span class="m">78</span> </span><span id="L-238"><a name="L-238"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-239"><a name="L-239"></a><span class="c">&quot; Exibe a barra de título no formato configurado</span> </span><span id="L-240"><a name="L-240"></a><span class="c">&quot;</span> </span><span id="L-241"><a name="L-241"></a><span class="c">&quot; Exemplo1:</span> </span><span id="L-242"><a name="L-242"></a><span class="c">&quot; ---------</span> </span><span id="L-243"><a name="L-243"></a><span class="c">&quot; formato:&quot;nome=&quot;NomeArq.EXT [se alterado mostrar +]</span> </span><span id="L-244"><a name="L-244"></a><span class="c">&quot; set titlestring=%t%(\ %M%)%(\ (%{expand(\&quot;%:~:.:h\&quot;)})%)%(\ %a%)</span> </span><span id="L-245"><a name="L-245"></a><span class="c">&quot;</span> </span><span id="L-246"><a name="L-246"></a><span class="c">&quot; Exemplos2:</span> </span><span id="L-247"><a name="L-247"></a><span class="c">&quot; ----------</span> </span><span id="L-248"><a name="L-248"></a><span class="c">&quot; set titlestring=%t%(\ %M%)%(\ (%{expand(\&quot;%:p\&quot;)})%)%(\ %a%)</span> </span><span id="L-249"><a name="L-249"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-250"><a name="L-250"></a><span class="c">&quot; -------------------------- [Formato] ---------------------------------------</span> </span><span id="L-251"><a name="L-251"></a><span class="c">&quot; [Nome=nome] buffer={current} [Total de linhas=999] &#39;</span> </span><span id="L-252"><a name="L-252"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-253"><a name="L-253"></a><span class="c">&quot; Se editar múltiplos arquivos</span> </span><span id="L-254"><a name="L-254"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-255"><a name="L-255"></a><span class="c">&quot; [Nome=nome] buffer={current} [{current} of {max})] [Total de linhas=999] &#39;</span> </span><span id="L-256"><a name="L-256"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-257"><a name="L-257"></a><span class="c">&quot; set titlestring=%&lt;Nome=%t%m%r%h%w</span> </span><span id="L-258"><a name="L-258"></a><span class="c">&quot; \%=</span> </span><span id="L-259"><a name="L-259"></a><span class="c">&quot; \BUFFER=%n</span> </span><span id="L-260"><a name="L-260"></a><span class="c">&quot; \%(\ %a%)</span> </span><span id="L-261"><a name="L-261"></a><span class="c">&quot; \%28([Total\ de\ linhas=%L]%) </span> </span><span id="L-262"><a name="L-262"></a> <span class="k">set</span> <span class="nb">titlestring</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>\ \ \ \ \ \ coluna:%<span class="m">04</span>v\ \ \ </span><span id="L-263"><a name="L-263"></a> \ linha:%<span class="m">04</span>l\ <span class="k">de</span>\ %<span class="m">04</span>L\ \ \ \ %<span class="m">03</span>P\ </span><span id="L-264"><a name="L-264"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-265"><a name="L-265"></a><span class="c">&quot; Define qual é o tamanho da margem direita para a quebra de linhas</span> </span><span id="L-266"><a name="L-266"></a><span class="c">&quot; automáticas, wrapmargin</span> </span><span id="L-267"><a name="L-267"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-268"><a name="L-268"></a> <span class="k">set</span> <span class="nb">wm</span><span class="p">=</span><span class="m">10</span> </span><span id="L-269"><a name="L-269"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-270"><a name="L-270"></a><span class="c">&quot; Quando esta opção encontra-se ativa o VIM lê o arquivo, e qualquer</span> </span><span id="L-271"><a name="L-271"></a><span class="c">&quot; comando de configuração que estiver nas cinco primeiras linhas e cinco</span> </span><span id="L-272"><a name="L-272"></a><span class="c">&quot; ultimas do arquivo, serão executados. Um exemplo disso são os arquivos</span> </span><span id="L-273"><a name="L-273"></a><span class="c">&quot; do help, onde as últimas linhas a apresentam a seguinte sintaxe:</span> </span><span id="L-274"><a name="L-274"></a><span class="c">&quot; &#39;vim:tw=78:ts=8:ft=help:norl:&#39;</span> </span><span id="L-275"><a name="L-275"></a><span class="c">&quot; A opção nomodeline assegura que esse recurso estará desabilitado</span> </span><span id="L-276"><a name="L-276"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-277"><a name="L-277"></a><span class="c">&quot; set modeline</span> </span><span id="L-278"><a name="L-278"></a> <span class="k">set</span> <span class="nb">nomodeline</span> </span><span id="L-279"><a name="L-279"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-280"><a name="L-280"></a><span class="c">&quot; Utilizando a barra de espaço para mover uma página</span> </span><span id="L-281"><a name="L-281"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-282"><a name="L-282"></a><span class="c">&quot; noremap &lt;Space&gt; &lt;PageDown&gt; </span> </span><span id="L-283"><a name="L-283"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-284"><a name="L-284"></a><span class="c">&quot; }}}</span> </span><span id="L-285"><a name="L-285"></a> </span><span id="L-286"><a name="L-286"></a><span class="c">&quot; Configurações de cores, fonte, visual, etc {{{</span> </span><span id="L-287"><a name="L-287"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-288"><a name="L-288"></a><span class="c">&quot; Ligando configurações de cor, isto é, faz com que o vim busque no</span> </span><span id="L-289"><a name="L-289"></a><span class="c">&quot; diretório /usr/share/vim/vim62/syntax os arquivos de configuração de</span> </span><span id="L-290"><a name="L-290"></a><span class="c">&quot; cores de acordo com o tipo de arquivo que é aberto</span> </span><span id="L-291"><a name="L-291"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-292"><a name="L-292"></a> <span class="nb">syntax</span> <span class="k">on</span> </span><span id="L-293"><a name="L-293"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-294"><a name="L-294"></a><span class="c">&quot; Sintaxe para fundo escuro (dark) ou claro (light) </span> </span><span id="L-295"><a name="L-295"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-296"><a name="L-296"></a> <span class="k">set</span> <span class="nb">background</span><span class="p">=</span><span class="nb">dark</span> </span><span id="L-297"><a name="L-297"></a><span class="c">&quot; set background=light</span> </span><span id="L-298"><a name="L-298"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-299"><a name="L-299"></a><span class="c">&quot; Mapeamento para trocar o tipo de background</span> </span><span id="L-300"><a name="L-300"></a><span class="c">&quot; Pode fazer com que a função SwitchColorSchemes() pare de funcionar</span> </span><span id="L-301"><a name="L-301"></a><span class="c">&quot; dependendo do tema que estiver sendo usado ao acionar esse mapeamento</span> </span><span id="L-302"><a name="L-302"></a><span class="c">&quot; Para quem não usa temas, não há qualquer problema.</span> </span><span id="L-303"><a name="L-303"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-304"><a name="L-304"></a> map <span class="p">&lt;</span>S<span class="p">-</span>F6<span class="p">&gt;</span> <span class="p">&lt;</span>ESC<span class="p">&gt;</span>:<span class="k">set</span> <span class="nb">background</span><span class="p">=</span><span class="nb">light</span><span class="p">&lt;</span>CR<span class="p">&gt;</span> </span><span id="L-305"><a name="L-305"></a> map <span class="p">&lt;</span>C<span class="p">-</span>S<span class="p">-</span>F6<span class="p">&gt;</span> <span class="p">&lt;</span>ESC<span class="p">&gt;</span>:<span class="k">set</span> <span class="nb">background</span><span class="p">=</span><span class="nb">dark</span><span class="p">&lt;</span>CR<span class="p">&gt;</span> </span><span id="L-306"><a name="L-306"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-307"><a name="L-307"></a><span class="c">&quot; Função para trocar o tema de cores</span> </span><span id="L-308"><a name="L-308"></a><span class="c">&quot; A primeira linha refere-se ao esquema padrão</span> </span><span id="L-309"><a name="L-309"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-310"><a name="L-310"></a> <span class="k">colorscheme</span> native </span><span id="L-311"><a name="L-311"></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-312"><a name="L-312"></a> <span class="k">if</span> <span class="k">g</span>:colors_name <span class="p">==</span> <span class="s1">&#39;native&#39;</span> </span><span id="L-313"><a name="L-313"></a> <span class="k">colorscheme</span> automation </span><span id="L-314"><a name="L-314"></a> <span class="k">elseif</span> <span class="k">g</span>:colors_name <span class="p">==</span> <span class="s1">&#39;automation&#39;</span> </span><span id="L-315"><a name="L-315"></a> <span class="k">colorscheme</span> moria </span><span id="L-316"><a name="L-316"></a> <span class="k">elseif</span> <span class="k">g</span>:colors_name <span class="p">==</span> <span class="s1">&#39;moria&#39;</span> </span><span id="L-317"><a name="L-317"></a> <span class="k">colorscheme</span> desert </span><span id="L-318"><a name="L-318"></a> <span class="k">elseif</span> <span class="k">g</span>:colors_name <span class="p">==</span> <span class="s1">&#39;desert&#39;</span> </span><span id="L-319"><a name="L-319"></a> <span class="k">colorscheme</span> colorful </span><span id="L-320"><a name="L-320"></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-321"><a name="L-321"></a> <span class="k">colorscheme</span> navajo<span class="p">-</span>night </span><span id="L-322"><a name="L-322"></a> <span class="k">elseif</span> <span class="k">g</span>:colors_name <span class="p">==</span> <span class="s1">&#39;navajo-night&#39;</span> </span><span id="L-323"><a name="L-323"></a> <span class="k">colorscheme</span> bmichaelsen </span><span id="L-324"><a name="L-324"></a> <span class="k">elseif</span> <span class="k">g</span>:colors_name <span class="p">==</span> <span class="s1">&#39;bmichaelsen&#39;</span> </span><span id="L-325"><a name="L-325"></a> <span class="k">colorscheme</span> impact </span><span id="L-326"><a name="L-326"></a> <span class="k">elseif</span> <span class="k">g</span>:colors_name <span class="p">==</span> <span class="s1">&#39;impact&#39;</span> </span><span id="L-327"><a name="L-327"></a> <span class="k">colorscheme</span> ir_black </span><span id="L-328"><a name="L-328"></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-329"><a name="L-329"></a> <span class="k">set</span> <span class="nb">background</span><span class="p">=</span><span class="nb">dark</span> </span><span id="L-330"><a name="L-330"></a> <span class="k">colorscheme</span> native </span><span id="L-331"><a name="L-331"></a> <span class="k">endif</span> </span><span id="L-332"><a name="L-332"></a> <span class="k">endfunction</span> </span><span id="L-333"><a name="L-333"></a> map <span class="p">&lt;</span>F6<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;</span>:echo <span class="k">g</span>:colors_name<span class="p">&lt;</span>CR<span class="p">&gt;</span> </span><span id="L-334"><a name="L-334"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-335"><a name="L-335"></a><span class="c">&quot; Define a cor para o menu contextual dos complementos</span> </span><span id="L-336"><a name="L-336"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-337"><a name="L-337"></a><span class="c">&quot; highlight Pmenu ctermbg=13 guibg=Gray</span> </span><span id="L-338"><a name="L-338"></a><span class="c">&quot; highlight PmenuSel ctermbg=7 guibg=DarkBlue guifg=White</span> </span><span id="L-339"><a name="L-339"></a><span class="c">&quot; highlight PmenuSbar ctermbg=7 guibg=DarkGray</span> </span><span id="L-340"><a name="L-340"></a><span class="c">&quot; highlight PmenuThumb guibg=Black </span> </span><span id="L-341"><a name="L-341"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-342"><a name="L-342"></a><span class="c">&quot; Cor da numeração lateral</span> </span><span id="L-343"><a name="L-343"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-344"><a name="L-344"></a><span class="c">&quot; hi LineNr guifg=pink ctermfg=lightMagenta</span> </span><span id="L-345"><a name="L-345"></a> <span class="k">hi</span> LineNr guifg<span class="p">=</span>green ctermfg<span class="p">=</span>lightGreen </span><span id="L-346"><a name="L-346"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-347"><a name="L-347"></a><span class="c">&quot; Destaca a linha e coluna sobre o cursor e define a cor</span> </span><span id="L-348"><a name="L-348"></a><span class="c">&quot; Não há como especificar a cor e conseguir algo bom para todos os ambientes</span> </span><span id="L-349"><a name="L-349"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-350"><a name="L-350"></a> <span class="k">set</span> <span class="nb">cursorline</span> </span><span id="L-351"><a name="L-351"></a><span class="c">&quot; hi CursorLine ctermbg=blue cterm=none</span> </span><span id="L-352"><a name="L-352"></a><span class="c">&quot; hi CursorLine ctermbg=black cterm=none </span> </span><span id="L-353"><a name="L-353"></a><span class="c">&quot; set cursorcolumn</span> </span><span id="L-354"><a name="L-354"></a><span class="c">&quot; hi CursorColumn ctermbg=4 </span> </span><span id="L-355"><a name="L-355"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-356"><a name="L-356"></a><span class="c">&quot; Configuração de fonte (tamanho e nome) para o GVim</span> </span><span id="L-357"><a name="L-357"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-358"><a name="L-358"></a> <span class="k">if</span> has<span class="p">(</span><span class="s2">&quot;gui_running&quot;</span><span class="p">)</span> </span><span id="L-359"><a name="L-359"></a> <span class="k">if</span> has<span class="p">(</span><span class="s2">&quot;gui_gtk2&quot;</span><span class="p">)</span> </span><span id="L-360"><a name="L-360"></a><span class="c"> &quot; Para GTK2</span> </span><span id="L-361"><a name="L-361"></a><span class="c"> &quot; Ajustando o tamanho da fonte de acordo com o tamanho da resolução</span> </span><span id="L-362"><a name="L-362"></a><span class="c"> &quot; Adicionando no ~/.bashrc as linhas :</span> </span><span id="L-363"><a name="L-363"></a><span class="c"> &quot; #--------------------------------------------------------------------</span> </span><span id="L-364"><a name="L-364"></a><span class="c"> &quot; # Definindo variável de screen para o vim</span> </span><span id="L-365"><a name="L-365"></a><span class="c"> &quot; #--------------------------------------------------------------------</span> </span><span id="L-366"><a name="L-366"></a><span class="c"> &quot; export SCREENSIZE=$(xdpyinfo | grep &#39;dim&#39;\</span> </span><span id="L-367"><a name="L-367"></a><span class="c"> &quot; | sed -e &#39;s/x.*//g&#39; -e &#39;s/^.*[a-z]: *//g&#39;)</span> </span><span id="L-368"><a name="L-368"></a><span class="c"> &quot; #--------------------------------------------------------------------</span> </span><span id="L-369"><a name="L-369"></a><span class="c"> &quot; A beleza dessas linhas é que elas observam o tamanho da resolução do</span> </span><span id="L-370"><a name="L-370"></a><span class="c"> &quot; computador cliente, e não do host. Apenas o tamanho horizontal é </span> </span><span id="L-371"><a name="L-371"></a><span class="c"> &quot; utilizado como referência, ou seja, 1280x1024, apenas 1280 é </span> </span><span id="L-372"><a name="L-372"></a><span class="c"> &quot; verificado para determinar o tamanho da fonte. Isso não funciona bem</span> </span><span id="L-373"><a name="L-373"></a><span class="c"> &quot; em monitores cujo o maior tamanho seja o vertical.</span> </span><span id="L-374"><a name="L-374"></a> <span class="k">if</span> exists<span class="p">(</span><span class="s2">&quot;$SCREENSIZE&quot;</span><span class="p">)</span> </span><span id="L-375"><a name="L-375"></a><span class="c"> &quot; se existe a variável $SCREENSIZE</span> </span><span id="L-376"><a name="L-376"></a> <span class="k">if</span> <span class="p">(</span>$SCREENSIZE <span class="p">&gt;</span> <span class="m">1300</span><span class="p">)</span> </span><span id="L-377"><a name="L-377"></a><span class="c"> &quot; se $SCREENSIZE é maior que 1300</span> </span><span id="L-378"><a name="L-378"></a> <span class="k">set</span> <span class="nb">guifont</span><span class="p">=</span>monospace\ <span class="m">14</span> </span><span id="L-379"><a name="L-379"></a> <span class="k">elseif</span> <span class="p">(</span>$SCREENSIZE <span class="p">&lt;</span> <span class="m">850</span><span class="p">)</span> </span><span id="L-380"><a name="L-380"></a><span class="c"> &quot; se $SCREENSIZE é menor que 850</span> </span><span id="L-381"><a name="L-381"></a> <span class="k">set</span> <span class="nb">guifont</span><span class="p">=</span>monospace\ <span class="m">8</span> </span><span id="L-382"><a name="L-382"></a> <span class="k">else</span> </span><span id="L-383"><a name="L-383"></a><span class="c"> &quot; se $SCREENSIZE é maior que 850 e menor que 1300</span> </span><span id="L-384"><a name="L-384"></a> <span class="k">set</span> <span class="nb">guifont</span><span class="p">=</span>monospace\ <span class="m">10</span> </span><span id="L-385"><a name="L-385"></a> <span class="k">endif</span> <span class="c">&quot; Existe SCREENSIZE, e com base nele define-se guifont </span> </span><span id="L-386"><a name="L-386"></a> <span class="k">else</span> </span><span id="L-387"><a name="L-387"></a><span class="c"> &quot; caso a variável $SCREENSIZE não exista, use...</span> </span><span id="L-388"><a name="L-388"></a> <span class="k">set</span> <span class="nb">guifont</span><span class="p">=</span>monospace\ <span class="m">10</span> </span><span id="L-389"><a name="L-389"></a> <span class="k">endif</span> <span class="c">&quot; Define tamanho se existe ou não $SCREENSIZE </span> </span><span id="L-390"><a name="L-390"></a> <span class="k">elseif</span> has<span class="p">(</span><span class="s2">&quot;x11&quot;</span><span class="p">)</span> </span><span id="L-391"><a name="L-391"></a><span class="c"> &quot; Para GTK1</span> </span><span id="L-392"><a name="L-392"></a> <span class="k">set</span> <span class="nb">guifont</span><span class="p">=</span>*<span class="p">-</span>lucidatypewriter<span class="p">-</span>medium<span class="p">-</span><span class="k">r</span><span class="p">-</span>normal<span class="p">-</span>*<span class="p">-</span>*<span class="m">-180</span><span class="p">-</span>*<span class="p">-</span>*<span class="p">-</span><span class="k">m</span><span class="p">-</span>*<span class="p">-</span>* </span><span id="L-393"><a name="L-393"></a> <span class="k">elseif</span> has<span class="p">(</span><span class="s2">&quot;gui_win32&quot;</span><span class="p">)</span> </span><span id="L-394"><a name="L-394"></a><span class="c"> &quot; Para Windows</span> </span><span id="L-395"><a name="L-395"></a> <span class="k">set</span> <span class="nb">guifont</span><span class="p">=</span>Luxi_Mono:h12:cANSI </span><span id="L-396"><a name="L-396"></a> <span class="k">else</span> </span><span id="L-397"><a name="L-397"></a><span class="c"> &quot; Para todos as outras gui use ...</span> </span><span id="L-398"><a name="L-398"></a> <span class="k">set</span> <span class="nb">guifont</span><span class="p">=</span>monospace\ <span class="m">12</span> </span><span id="L-399"><a name="L-399"></a> <span class="k">endif</span> <span class="c">&quot; Conclui a verificação do tipo de interface gráfica</span> </span><span id="L-400"><a name="L-400"></a> <span class="k">endif</span> <span class="c">&quot; Conclui sobre a existência de uma interface gráfica</span> </span><span id="L-401"><a name="L-401"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-402"><a name="L-402"></a><span class="c">&quot; }}}</span> </span><span id="L-403"><a name="L-403"></a> </span><span id="L-404"><a name="L-404"></a><span class="c">&quot; Configurações de Dobras (folders) {{{</span> </span><span id="L-405"><a name="L-405"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-406"><a name="L-406"></a><span class="c">&quot; Ajuda:</span> </span><span id="L-407"><a name="L-407"></a><span class="c">&quot; zf ................ operador para criar folders</span> </span><span id="L-408"><a name="L-408"></a><span class="c">&quot; zfis .............. cria um folder da sentença atual</span> </span><span id="L-409"><a name="L-409"></a><span class="c">&quot; zd ................ delete folder</span> </span><span id="L-410"><a name="L-410"></a><span class="c">&quot; zo ................ abrir dobra sob o cursor</span> </span><span id="L-411"><a name="L-411"></a><span class="c">&quot; zc ................ fechar dobra sob o cursor</span> </span><span id="L-412"><a name="L-412"></a><span class="c">&quot; zv ................ visualizar linha sob o cursor</span> </span><span id="L-413"><a name="L-413"></a><span class="c">&quot; zR ................ abre todos os folders </span> </span><span id="L-414"><a name="L-414"></a><span class="c">&quot; zM ................ fecha todos os folders</span> </span><span id="L-415"><a name="L-415"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-416"><a name="L-416"></a><span class="c">&quot; Método das dobras</span> </span><span id="L-417"><a name="L-417"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-418"><a name="L-418"></a> <span class="k">set</span> <span class="nb">foldmethod</span><span class="p">=</span>marker </span><span id="L-419"><a name="L-419"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-420"><a name="L-420"></a><span class="c">&quot; Dobra padrão </span> </span><span id="L-421"><a name="L-421"></a><span class="c">&quot; Quando cria-se ou deleta-se uma dobra, são esses caracteres que são </span> </span><span id="L-422"><a name="L-422"></a><span class="c">&quot; adicionados ou removidos do texto.</span> </span><span id="L-423"><a name="L-423"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-424"><a name="L-424"></a> <span class="k">set</span> <span class="nb">fmr</span><span class="p">=</span>{{{<span class="p">,</span>}}} </span><span id="L-425"><a name="L-425"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-426"><a name="L-426"></a><span class="c">&quot; Mapeamento para dobras</span> </span><span id="L-427"><a name="L-427"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-428"><a name="L-428"></a><span class="c">&quot; Abrindo uma dobra</span> </span><span id="L-429"><a name="L-429"></a> map <span class="p">+</span> zo </span><span id="L-430"><a name="L-430"></a><span class="c">&quot; Fechando um certa dobra </span> </span><span id="L-431"><a name="L-431"></a> map <span class="p">-</span> zc </span><span id="L-432"><a name="L-432"></a><span class="c">&quot; Abrindo todo mundo </span> </span><span id="L-433"><a name="L-433"></a> map <span class="p">++</span> zR </span><span id="L-434"><a name="L-434"></a><span class="c">&quot; Fechando todo mundo </span> </span><span id="L-435"><a name="L-435"></a> map <span class="p">--</span> zM </span><span id="L-436"><a name="L-436"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-437"><a name="L-437"></a><span class="c">&quot; folderlevel define quantos níveis de dobras ficam abertos por padrão</span> </span><span id="L-438"><a name="L-438"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-439"><a name="L-439"></a> <span class="k">set</span> <span class="nb">foldlevel</span><span class="p">=</span><span class="m">0</span> </span><span id="L-440"><a name="L-440"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-441"><a name="L-441"></a><span class="c">&quot; Barra de espaço abre e fecha folders</span> </span><span id="L-442"><a name="L-442"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-443"><a name="L-443"></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="s2">&quot;.&quot;</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-444"><a name="L-444"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-445"><a name="L-445"></a><span class="c">&quot; }}}</span> </span><span id="L-446"><a name="L-446"></a> </span><span id="L-447"><a name="L-447"></a><span class="c">&quot; Configurando a busca {{{</span> </span><span id="L-448"><a name="L-448"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-449"><a name="L-449"></a><span class="c">&quot; Ativa o recurso de colorir, dando realce a pesquisa de palavra(s)</span> </span><span id="L-450"><a name="L-450"></a><span class="c">&quot; que estiver em andamento. O hlsearch abreviado chama-se hls</span> </span><span id="L-451"><a name="L-451"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-452"><a name="L-452"></a> <span class="k">set</span> <span class="nb">hlsearch</span> </span><span id="L-453"><a name="L-453"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-454"><a name="L-454"></a><span class="c">&quot; O método de busca pode ser incrementado com a adição do comando</span> </span><span id="L-455"><a name="L-455"></a><span class="c">&quot; incsearch&quot;. A pesquisa torna-se diferenciada e dinâmica em tempo de</span> </span><span id="L-456"><a name="L-456"></a><span class="c">&quot; pesquisa, isto é, antes do usuário entrar com o comando &lt;enter&gt; a fim</span> </span><span id="L-457"><a name="L-457"></a><span class="c">&quot; de buscar os resultados, os mesmos já aparecerão em sua tela.</span> </span><span id="L-458"><a name="L-458"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-459"><a name="L-459"></a> <span class="k">set</span> <span class="nb">incsearch</span> </span><span id="L-460"><a name="L-460"></a><span class="c">&quot; ---------------------------------------------------------------------------- </span> </span><span id="L-461"><a name="L-461"></a><span class="c">&quot; Se começar uma busca em maiúsculo ele habilita o case </span> </span><span id="L-462"><a name="L-462"></a><span class="c">&quot; ---------------------------------------------------------------------------- </span> </span><span id="L-463"><a name="L-463"></a><span class="c">&quot; set smartcase </span> </span><span id="L-464"><a name="L-464"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-465"><a name="L-465"></a><span class="c">&quot; Que tal trocar a cor do texto ?</span> </span><span id="L-466"><a name="L-466"></a><span class="c">&quot; daquela seleção que aparece quando você procura algo com o comando &quot; / ?</span> </span><span id="L-467"><a name="L-467"></a><span class="c">&quot; é fácil, basta definir a cor do componente da sintaxe. Ah sim, a</span> </span><span id="L-468"><a name="L-468"></a><span class="c">&quot; opção hls (veja acima) deve estar ativa.</span> </span><span id="L-469"><a name="L-469"></a><span class="c">&quot; você pode colocar as cores que quiser, em inglês. Note que é</span> </span><span id="L-470"><a name="L-470"></a><span class="c">&quot; ctermBG e FG, de background e foreground (fundo e letra). E veja</span> </span><span id="L-471"><a name="L-471"></a><span class="c">&quot; também que o IncSearch (busca enquanto você digita) é invertido!</span> </span><span id="L-472"><a name="L-472"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-473"><a name="L-473"></a><span class="c">&quot; hi Search ctermbg=yellow ctermfg=red</span> </span><span id="L-474"><a name="L-474"></a><span class="c">&quot; hi IncSearch ctermbg=green ctermfg=cyan</span> </span><span id="L-475"><a name="L-475"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-476"><a name="L-476"></a><span class="c">&quot; No vim temos diversas opções para modificar seu comportamento</span> </span><span id="L-477"><a name="L-477"></a><span class="c">&quot; através do comando set. para ver todas as opções disponíveis, faça</span> </span><span id="L-478"><a name="L-478"></a><span class="c">&quot; :set all. Diversas opções já vêem ligadas por padrão, então</span> </span><span id="L-479"><a name="L-479"></a><span class="c">&quot; vamos mais opções de busca</span> </span><span id="L-480"><a name="L-480"></a><span class="c">&quot; IncrementedSearch, HighLightedSearch, IgnoreCase e SmartCaSe</span> </span><span id="L-481"><a name="L-481"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-482"><a name="L-482"></a> <span class="k">set</span> <span class="nb">ic</span> <span class="k">scs</span> </span><span id="L-483"><a name="L-483"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-484"><a name="L-484"></a><span class="c">&quot; Limpando o registro de buscas</span> </span><span id="L-485"><a name="L-485"></a><span class="c">&quot; ---------------------------------------------------------------------------- </span> </span><span id="L-486"><a name="L-486"></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">let</span> @/<span class="p">=</span><span class="s2">&quot;&quot;</span><span class="p">&lt;</span>CR<span class="p">&gt;</span> </span><span id="L-487"><a name="L-487"></a><span class="c">&quot; ---------------------------------------------------------------------------- </span> </span><span id="L-488"><a name="L-488"></a><span class="c">&quot; }}}</span> </span><span id="L-489"><a name="L-489"></a> </span><span id="L-490"><a name="L-490"></a><span class="c">&quot; Abreviações, correções e jeitinhos para o modo de inserção {{{</span> </span><span id="L-491"><a name="L-491"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-492"><a name="L-492"></a><span class="c">&quot; Mapeando abreviações para o modo de inserção</span> </span><span id="L-493"><a name="L-493"></a><span class="c">&quot; ---------------------------------------------------------------------------- </span> </span><span id="L-494"><a name="L-494"></a> iab linux GNU/Linux </span><span id="L-495"><a name="L-495"></a> iab gnome GNOME </span><span id="L-496"><a name="L-496"></a> iab kde KDE </span><span id="L-497"><a name="L-497"></a> iab latex LaTeX </span><span id="L-498"><a name="L-498"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-499"><a name="L-499"></a><span class="c">&quot; Mapeando correções para o modo de inserção</span> </span><span id="L-500"><a name="L-500"></a><span class="c">&quot; ---------------------------------------------------------------------------- </span> </span><span id="L-501"><a name="L-501"></a> iab tambem também </span><span id="L-502"><a name="L-502"></a> iab vc você </span><span id="L-503"><a name="L-503"></a> iab assenção ascenção </span><span id="L-504"><a name="L-504"></a> iab assougue açougue </span><span id="L-505"><a name="L-505"></a> iab corrijir corrigir </span><span id="L-506"><a name="L-506"></a> iab definitamente definitivamente </span><span id="L-507"><a name="L-507"></a> iab deshonestidade desonestidade </span><span id="L-508"><a name="L-508"></a> iab díficil difícil </span><span id="L-509"><a name="L-509"></a> iab distingeu distingue </span><span id="L-510"><a name="L-510"></a> iab ecessão exceção </span><span id="L-511"><a name="L-511"></a> iab ecessões exceções </span><span id="L-512"><a name="L-512"></a> iab excessão exceção </span><span id="L-513"><a name="L-513"></a> iab Excesões exceções </span><span id="L-514"><a name="L-514"></a> iab excurção excursão </span><span id="L-515"><a name="L-515"></a> iab exijir exigir </span><span id="L-516"><a name="L-516"></a> iab nao não </span><span id="L-517"><a name="L-517"></a> iab noã não </span><span id="L-518"><a name="L-518"></a> iab portugu6es português </span><span id="L-519"><a name="L-519"></a> iab portugês português </span><span id="L-520"><a name="L-520"></a> iab portugues português </span><span id="L-521"><a name="L-521"></a> iab dividos divididos </span><span id="L-522"><a name="L-522"></a> iab lisensa licença </span><span id="L-523"><a name="L-523"></a> iab licenssa licença </span><span id="L-524"><a name="L-524"></a> iab licensa licença </span><span id="L-525"><a name="L-525"></a> iab Licensa Licença </span><span id="L-526"><a name="L-526"></a> iab drives drivers </span><span id="L-527"><a name="L-527"></a> iab drive driver </span><span id="L-528"><a name="L-528"></a> iab Drive Driver </span><span id="L-529"><a name="L-529"></a> iab Drives Drivers </span><span id="L-530"><a name="L-530"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-531"><a name="L-531"></a><span class="c">&quot; caso o teclado esteja desconfigurado use:</span> </span><span id="L-532"><a name="L-532"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-533"><a name="L-533"></a><span class="c">&quot; iab &#39;a á</span> </span><span id="L-534"><a name="L-534"></a><span class="c">&quot; iab &#39;A Á</span> </span><span id="L-535"><a name="L-535"></a><span class="c">&quot; iab &#39;e é</span> </span><span id="L-536"><a name="L-536"></a><span class="c">&quot; iab &#39;E É</span> </span><span id="L-537"><a name="L-537"></a><span class="c">&quot; iab &#39;i í</span> </span><span id="L-538"><a name="L-538"></a><span class="c">&quot; iab &#39;I Í</span> </span><span id="L-539"><a name="L-539"></a><span class="c">&quot; iab &#39;o ó</span> </span><span id="L-540"><a name="L-540"></a><span class="c">&quot; iab &#39;O Ó</span> </span><span id="L-541"><a name="L-541"></a><span class="c">&quot; iab ~a ã</span> </span><span id="L-542"><a name="L-542"></a><span class="c">&quot; iab ~A Ã</span> </span><span id="L-543"><a name="L-543"></a><span class="c">&quot; iab ^a â</span> </span><span id="L-544"><a name="L-544"></a><span class="c">&quot; iab ^A Â</span> </span><span id="L-545"><a name="L-545"></a><span class="c">&quot; iab `a à</span> </span><span id="L-546"><a name="L-546"></a><span class="c">&quot; iab `A À</span> </span><span id="L-547"><a name="L-547"></a><span class="c">&quot; iab ,c ç</span> </span><span id="L-548"><a name="L-548"></a><span class="c">&quot; iab ,C Ç</span> </span><span id="L-549"><a name="L-549"></a><span class="c">&quot; iab ^e ê</span> </span><span id="L-550"><a name="L-550"></a><span class="c">&quot; iab ^E Ê</span> </span><span id="L-551"><a name="L-551"></a><span class="c">&quot; iab ^o ô</span> </span><span id="L-552"><a name="L-552"></a><span class="c">&quot; iab ^O Ô</span> </span><span id="L-553"><a name="L-553"></a><span class="c">&quot; iab ~o õ</span> </span><span id="L-554"><a name="L-554"></a><span class="c">&quot; iab ~O Õ</span> </span><span id="L-555"><a name="L-555"></a><span class="c">&quot; iab &#39;u ú</span> </span><span id="L-556"><a name="L-556"></a><span class="c">&quot; iab &#39;U Ú&quot;</span> </span><span id="L-557"><a name="L-557"></a><span class="c">&quot; }}}</span> </span><span id="L-558"><a name="L-558"></a> </span><span id="L-559"><a name="L-559"></a><span class="c">&quot; Configurando o dicionário e corretor ortográfico {{{</span> </span><span id="L-560"><a name="L-560"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-561"><a name="L-561"></a><span class="c">&quot; Utilizando o dicionário do aspell</span> </span><span id="L-562"><a name="L-562"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-563"><a name="L-563"></a> cmap ckBR <span class="k">w</span><span class="p">!&lt;</span>CR<span class="p">&gt;</span>:<span class="p">!</span>aspell <span class="k">check</span> %<span class="p">&lt;</span>CR<span class="p">&gt;</span>:<span class="k">e</span><span class="p">!</span> %<span class="p">&lt;</span>CR<span class="p">&gt;</span> </span><span id="L-564"><a name="L-564"></a> cmap ckEN <span class="k">w</span><span class="p">!&lt;</span>CR<span class="p">&gt;</span>:<span class="p">!</span>aspell <span class="p">--</span><span class="k">lang</span><span class="p">=</span><span class="k">en</span> <span class="k">check</span> %<span class="p">&lt;</span>CR<span class="p">&gt;</span>:<span class="k">e</span><span class="p">!</span> %<span class="p">&lt;</span>CR<span class="p">&gt;</span> </span><span id="L-565"><a name="L-565"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-566"><a name="L-566"></a><span class="c">&quot; Verificação automática do arquivo (spell check interno ao vim)</span> </span><span id="L-567"><a name="L-567"></a><span class="c">&quot; Para baixar o dicionário: http://www.broffice.org/verortografico/baixar</span> </span><span id="L-568"><a name="L-568"></a><span class="c">&quot; Descompacte e no diretório abra o vim. Nele execute:</span> </span><span id="L-569"><a name="L-569"></a><span class="c">&quot; :mkspell pt pt_BR</span> </span><span id="L-570"><a name="L-570"></a><span class="c">&quot; cp pt*.spl ~/.vim/spell/</span> </span><span id="L-571"><a name="L-571"></a><span class="c">&quot; Adicione no .vimrc as linhas:</span> </span><span id="L-572"><a name="L-572"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-573"><a name="L-573"></a> <span class="k">set</span> <span class="nb">spelllang</span><span class="p">=</span><span class="nb">pt</span> </span><span id="L-574"><a name="L-574"></a> map <span class="p">&lt;</span>S<span class="p">-</span>F8<span class="p">&gt;</span> :<span class="k">set</span> <span class="nb">spelllang</span><span class="p">=</span><span class="k">en</span><span class="p">&lt;</span>CR<span class="p">&gt;</span> </span><span id="L-575"><a name="L-575"></a> map <span class="p">&lt;</span>C<span class="p">-</span>S<span class="p">-</span>F8<span class="p">&gt;</span> :<span class="k">set</span> <span class="nb">spelllang</span><span class="p">=</span><span class="nb">pt</span><span class="p">&lt;</span>CR<span class="p">&gt;</span> </span><span id="L-576"><a name="L-576"></a> <span class="k">set</span> <span class="nb">nospell</span> </span><span id="L-577"><a name="L-577"></a> <span class="nb">nnoremap</span> <span class="p">&lt;</span>C<span class="p">-</span>F8<span class="p">&gt;</span> :<span class="k">set</span> <span class="k">spell</span><span class="p">!</span> <span class="k">spell</span>?<span class="p">&lt;</span>CR<span class="p">&gt;</span> </span><span id="L-578"><a name="L-578"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-579"><a name="L-579"></a><span class="c">&quot; Para habilitar a identificação automática das palavras erradas, por tipo de</span> </span><span id="L-580"><a name="L-580"></a><span class="c">&quot; arquivo, use:</span> </span><span id="L-581"><a name="L-581"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-582"><a name="L-582"></a><span class="c">&quot; autocmd BufNewFile,BufRead *.txt setl spell spl=pt</span> </span><span id="L-583"><a name="L-583"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-584"><a name="L-584"></a><span class="c">&quot; Plugin vimspell. Somente foi implementado devido ao funcionamento pouco </span> </span><span id="L-585"><a name="L-585"></a><span class="c">&quot; correto do plugin interno do vim.</span> </span><span id="L-586"><a name="L-586"></a><span class="c">&quot; URL: http://www.vim.org/scripts/script.php?script_id=465</span> </span><span id="L-587"><a name="L-587"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-588"><a name="L-588"></a><span class="c">&quot; Para desabilitar o vimspell (habilite apenas quando for usar). </span> </span><span id="L-589"><a name="L-589"></a> <span class="k">let</span> loaded_vimspell <span class="p">=</span> <span class="m">1</span> </span><span id="L-590"><a name="L-590"></a><span class="c">&quot; Configurando a coloração de sintaxe</span> </span><span id="L-591"><a name="L-591"></a> <span class="nb">highlight</span> link SpellErrors Error </span><span id="L-592"><a name="L-592"></a><span class="c">&quot; Usando o aspell (opções: aspell e ispell)</span> </span><span id="L-593"><a name="L-593"></a> <span class="k">let</span> spell_executable <span class="p">=</span> <span class="s2">&quot;aspell&quot;</span> </span><span id="L-594"><a name="L-594"></a><span class="c">&quot; Restrigindo os idiomas disponíveis</span> </span><span id="L-595"><a name="L-595"></a><span class="c">&quot; Para o aspell</span> </span><span id="L-596"><a name="L-596"></a> <span class="k">let</span> spell_language_list <span class="p">=</span> <span class="s2">&quot;pt_BR,en&quot;</span> </span><span id="L-597"><a name="L-597"></a><span class="c">&quot; Para o ispell</span> </span><span id="L-598"><a name="L-598"></a><span class="c">&quot; let spell_language_list = &quot;brazilian,english&quot;</span> </span><span id="L-599"><a name="L-599"></a><span class="c">&quot; Não quero auto correção ativa. Aguarde eu chamar o programa</span> </span><span id="L-600"><a name="L-600"></a> <span class="k">let</span> spell_auto_type <span class="p">=</span> <span class="s2">&quot;none&quot;</span> </span><span id="L-601"><a name="L-601"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-602"><a name="L-602"></a><span class="c">&quot; Dicionário para procurar o auto-complemento de palavras</span> </span><span id="L-603"><a name="L-603"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-604"><a name="L-604"></a> <span class="k">set</span> <span class="nb">dictionary</span><span class="p">=~</span><span class="sr">/.vim/</span><span class="nb">dict</span>/words.dic </span><span id="L-605"><a name="L-605"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-606"><a name="L-606"></a><span class="c">&quot; Auto-complemento de palavras</span> </span><span id="L-607"><a name="L-607"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-608"><a name="L-608"></a><span class="c">&quot; Exemplo de como usar o dicionário com mapeamento:</span> </span><span id="L-609"><a name="L-609"></a><span class="c">&quot; (1) dentro do modo de inserção -- INSERT --</span> </span><span id="L-610"><a name="L-610"></a><span class="c">&quot; (2) posicione o cursor sob a palavra a ser completada</span> </span><span id="L-611"><a name="L-611"></a><span class="c">&quot; (3) ligar dicionário ao pressionar a seqüência &quot;&lt;C-D&gt;&quot;</span> </span><span id="L-612"><a name="L-612"></a> imap <span class="p">&lt;</span>C<span class="p">-</span>D<span class="p">&gt;</span> <span class="p">&lt;</span><span class="k">c</span><span class="p">-</span><span class="k">x</span><span class="p">&gt;&lt;</span><span class="k">c</span><span class="p">-</span><span class="k">k</span><span class="p">&gt;</span> </span><span id="L-613"><a name="L-613"></a><span class="c">&quot; (4) busca palavra no arquivo corrente &quot;&lt;F8&gt;&quot;</span> </span><span id="L-614"><a name="L-614"></a> imap <span class="p">&lt;</span>F8<span class="p">&gt;</span> <span class="p">&lt;</span><span class="k">c</span><span class="p">-</span><span class="k">x</span><span class="p">&gt;&lt;</span><span class="k">c</span><span class="p">-</span><span class="k">i</span><span class="p">&gt;</span> </span><span id="L-615"><a name="L-615"></a><span class="c">&quot; (5) o &lt;C-N&gt; trava meu computador, assim, eliminarei ele</span> </span><span id="L-616"><a name="L-616"></a> imap <span class="p">&lt;</span>C<span class="p">-</span>N<span class="p">&gt;</span> <span class="p">&lt;</span>C<span class="p">-</span>P<span class="p">&gt;</span> </span><span id="L-617"><a name="L-617"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-618"><a name="L-618"></a><span class="c">&quot; Quando completar uma palavra seguir a seguinte seqüência de</span> </span><span id="L-619"><a name="L-619"></a><span class="c">&quot; busca, sendo primeiro em 1, segundo em 2, ...</span> </span><span id="L-620"><a name="L-620"></a><span class="c">&quot;</span> </span><span id="L-621"><a name="L-621"></a><span class="c">&quot; 1 - no buffer atual (.)</span> </span><span id="L-622"><a name="L-622"></a><span class="c">&quot; 2 - buffer de outra janela (w)</span> </span><span id="L-623"><a name="L-623"></a><span class="c">&quot; 3 - outros buffers carregados (b)</span> </span><span id="L-624"><a name="L-624"></a><span class="c">&quot; 4 - buffers não carregados (u)</span> </span><span id="L-625"><a name="L-625"></a><span class="c">&quot; 5 - arquivo de tags (t)</span> </span><span id="L-626"><a name="L-626"></a><span class="c">&quot; 6 - arquivo de include (i)</span> </span><span id="L-627"><a name="L-627"></a><span class="c">&quot; 7 - dicionário (K)</span> </span><span id="L-628"><a name="L-628"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-629"><a name="L-629"></a><span class="c">&quot; set complete=.,w,b,u,t,i,k &quot;(*default*)</span> </span><span id="L-630"><a name="L-630"></a> <span class="k">set</span> <span class="nb">complete</span><span class="p">=</span><span class="k">k</span><span class="p">,</span>.<span class="p">,</span><span class="k">w</span><span class="p">,</span><span class="k">t</span><span class="p">,</span><span class="k">i</span><span class="p">,</span><span class="k">b</span><span class="p">,</span><span class="k">u</span> </span><span id="L-631"><a name="L-631"></a><span class="c">&quot; set complete=.,w,k,t,i</span> </span><span id="L-632"><a name="L-632"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-633"><a name="L-633"></a><span class="c">&quot; Completa a palavra ignorando se é maiúscula ou minúscula</span> </span><span id="L-634"><a name="L-634"></a><span class="c">&quot; Não é uma idéia muito boa, se o propósito envolver completar códigos.</span> </span><span id="L-635"><a name="L-635"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-636"><a name="L-636"></a><span class="c">&quot; set infercase</span> </span><span id="L-637"><a name="L-637"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-638"><a name="L-638"></a><span class="c">&quot; Marca como erro duas palavras idênticas separadas por espaço</span> </span><span id="L-639"><a name="L-639"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-640"><a name="L-640"></a> <span class="nb">syntax</span> <span class="k">match</span> DoubleWordErr <span class="s2">&quot;\c\&lt;\(\a\+\)\_s\+\1\&gt;&quot;</span> </span><span id="L-641"><a name="L-641"></a> <span class="k">hi</span> <span class="nb">def</span> link DoubleWordErr Error </span><span id="L-642"><a name="L-642"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-643"><a name="L-643"></a><span class="c">&quot; }}}</span> </span><span id="L-644"><a name="L-644"></a> </span><span id="L-645"><a name="L-645"></a><span class="c">&quot; Configurações do taglist {{{</span> </span><span id="L-646"><a name="L-646"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-647"><a name="L-647"></a><span class="c">&quot; URL: http://www.vim.org/scripts/script.php?script_id=273</span> </span><span id="L-648"><a name="L-648"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-649"><a name="L-649"></a><span class="c">&quot; Inclua:</span> </span><span id="L-650"><a name="L-650"></a><span class="c">&quot; --langdef=tex</span> </span><span id="L-651"><a name="L-651"></a><span class="c">&quot; --langmap=tex:.tex</span> </span><span id="L-652"><a name="L-652"></a><span class="c">&quot; --regex-tex=/\\subsubsection[ \t]*\*?\{[ \t]*([^}]*)\}/- \1/s,subsubsection/</span> </span><span id="L-653"><a name="L-653"></a><span class="c">&quot; --regex-tex=/\\subsection[ \t]*\*?\{[ \t]*([^}]*)\}/+\1/s,subsection/</span> </span><span id="L-654"><a name="L-654"></a><span class="c">&quot; --regex-tex=/\\section[ \t]*\*?\{[ \t]*([^}]*)\}/\1/s,section/</span> </span><span id="L-655"><a name="L-655"></a><span class="c">&quot; --regex-tex=/\\chapter[ \t]*\*?\{[ \t]*([^}]*)\}/\1/c,chapter/</span> </span><span id="L-656"><a name="L-656"></a><span class="c">&quot; --regex-tex=/\\label[ \t]*\*?\{[ \t]*([^}]*)\}/\1/l,label/</span> </span><span id="L-657"><a name="L-657"></a><span class="c">&quot; --regex-tex=/\\ref[ \t]*\*?\{[ \t]*([^}]*)\}/\1/r,ref/</span> </span><span id="L-658"><a name="L-658"></a><span class="c">&quot;</span> </span><span id="L-659"><a name="L-659"></a><span class="c">&quot; no arquivo ~/.ctags para permitir ajustar o ctags para o LaTeX.</span> </span><span id="L-660"><a name="L-660"></a><span class="c">&quot; URL: http://vim.wikia.com/wiki/Use_Taglist_with_LaTeX_files</span> </span><span id="L-661"><a name="L-661"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-662"><a name="L-662"></a><span class="c">&quot; Auto Update da lista de tags </span> </span><span id="L-663"><a name="L-663"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-664"><a name="L-664"></a> <span class="k">let</span> Tlist_Auto_Update <span class="p">=</span> <span class="m">1</span> </span><span id="L-665"><a name="L-665"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-666"><a name="L-666"></a><span class="c">&quot; Habilitando o menu tags no gvim </span> </span><span id="L-667"><a name="L-667"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-668"><a name="L-668"></a> <span class="k">let</span> Tlist_Show_Menu <span class="p">=</span> <span class="m">1</span> </span><span id="L-669"><a name="L-669"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-670"><a name="L-670"></a><span class="c">&quot; Ajustando o tamanho da janela do taglist </span> </span><span id="L-671"><a name="L-671"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-672"><a name="L-672"></a> <span class="k">let</span> Tlist_WinWidth <span class="p">=</span> <span class="m">30</span> </span><span id="L-673"><a name="L-673"></a> <span class="k">let</span> Tlist_WinHeight <span class="p">=</span> <span class="m">30</span> </span><span id="L-674"><a name="L-674"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-675"><a name="L-675"></a><span class="c">&quot; Fechamento automático das dobras que estão inativas</span> </span><span id="L-676"><a name="L-676"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-677"><a name="L-677"></a> <span class="k">let</span> Tlist_File_Fold_Auto_Close <span class="p">=</span> <span class="m">1</span> </span><span id="L-678"><a name="L-678"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-679"><a name="L-679"></a><span class="c">&quot; Se ao fechar, apenas o taglist estiver aberto, fechar o vim</span> </span><span id="L-680"><a name="L-680"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-681"><a name="L-681"></a> <span class="k">let</span> Tlist_Exit_OnlyWindow <span class="p">=</span> <span class="m">1</span> </span><span id="L-682"><a name="L-682"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-683"><a name="L-683"></a><span class="c">&quot; Abreviações para linha de comando </span> </span><span id="L-684"><a name="L-684"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-685"><a name="L-685"></a> cab ctg TlistToggle </span><span id="L-686"><a name="L-686"></a> cab ctgo TlistOpen </span><span id="L-687"><a name="L-687"></a> cab ctgs Tlist </span><span id="L-688"><a name="L-688"></a> cab ctgadd TlistAddFiles </span><span id="L-689"><a name="L-689"></a> cab ctgaddall TlistAddFilesRecursive </span><span id="L-690"><a name="L-690"></a> cab ctgup TlistUpdate </span><span id="L-691"><a name="L-691"></a> cab ctglock TlistLock </span><span id="L-692"><a name="L-692"></a> cab ctgsync TlistSync </span><span id="L-693"><a name="L-693"></a> cab ctgsave TlistSessionSave </span><span id="L-694"><a name="L-694"></a> cab ctgopen TlistSessionLoad </span><span id="L-695"><a name="L-695"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-696"><a name="L-696"></a><span class="c">&quot; }}}</span> </span><span id="L-697"><a name="L-697"></a> </span><span id="L-698"><a name="L-698"></a><span class="c">&quot; Configurações do PotWiki {{{</span> </span><span id="L-699"><a name="L-699"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-700"><a name="L-700"></a><span class="c">&quot; URL: http://www.vim.org/scripts/script.php?script_id=1018 </span> </span><span id="L-701"><a name="L-701"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-702"><a name="L-702"></a><span class="c">&quot; Definindo o caminho padrão para o wiki</span> </span><span id="L-703"><a name="L-703"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-704"><a name="L-704"></a> <span class="k">let</span> potwiki_home <span class="p">=</span> <span class="s2">&quot;$HOME/.vim/.wiki/HomePage&quot;</span> </span><span id="L-705"><a name="L-705"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-706"><a name="L-706"></a><span class="c">&quot; Habilitando o autosalvamento para o wiki</span> </span><span id="L-707"><a name="L-707"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-708"><a name="L-708"></a> <span class="k">let</span> potwiki_autowrite <span class="p">=</span> <span class="m">1</span> </span><span id="L-709"><a name="L-709"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-710"><a name="L-710"></a><span class="c">&quot; Personalizando as cores do wiki</span> </span><span id="L-711"><a name="L-711"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-712"><a name="L-712"></a> <span class="nb">highlight</span> PotwikiWord guifg<span class="p">=</span>darkcyan </span><span id="L-713"><a name="L-713"></a> <span class="nb">highlight</span> PotwikiWordNotFound guibg<span class="p">=</span>Red guifg<span class="p">=</span>Yellow </span><span id="L-714"><a name="L-714"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-715"><a name="L-715"></a><span class="c">&quot; }}}</span> </span><span id="L-716"><a name="L-716"></a> </span><span id="L-717"><a name="L-717"></a><span class="c">&quot; Configurações do NERDTree {{{</span> </span><span id="L-718"><a name="L-718"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-719"><a name="L-719"></a><span class="c">&quot; URL: http://www.vim.org/scripts/script.php?script_id=1658 </span> </span><span id="L-720"><a name="L-720"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-721"><a name="L-721"></a><span class="c">&quot; Veja ~/.vim/doc/NERDTree.txt para mais informações</span> </span><span id="L-722"><a name="L-722"></a><span class="c">&quot; ---------------------------------------------------------------------------- </span> </span><span id="L-723"><a name="L-723"></a><span class="c">&quot; Abreviando a inicialização dele</span> </span><span id="L-724"><a name="L-724"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-725"><a name="L-725"></a> cab ntree NERDTree </span><span id="L-726"><a name="L-726"></a> map <span class="p">&lt;</span>F5<span class="p">&gt;</span> :NERDTree<span class="p">&lt;</span>CR<span class="p">&gt;</span> </span><span id="L-727"><a name="L-727"></a> imap <span class="p">&lt;</span>F5<span class="p">&gt;</span> <span class="p">&lt;</span>ESC<span class="p">&gt;</span>:NERDTree<span class="p">&lt;</span>CR<span class="p">&gt;</span> </span><span id="L-728"><a name="L-728"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-729"><a name="L-729"></a><span class="c">&quot; Configurando o arquivo que registrará os bookmarks</span> </span><span id="L-730"><a name="L-730"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-731"><a name="L-731"></a> <span class="k">let</span> NERDTreeBookmarksFilee<span class="p">=</span><span class="s2">&quot;~/.vim/.NERDTreeBookmarks&quot;</span> </span><span id="L-732"><a name="L-732"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-733"><a name="L-733"></a><span class="c">&quot; Ativando os Bookmarks ao iniciar</span> </span><span id="L-734"><a name="L-734"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-735"><a name="L-735"></a> <span class="k">let</span> NERDTreeShowBookmarks<span class="p">=</span><span class="m">1</span> </span><span id="L-736"><a name="L-736"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-737"><a name="L-737"></a><span class="c">&quot; Ajustando o tamanho da janela para melhor aproveitamento do espaço</span> </span><span id="L-738"><a name="L-738"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-739"><a name="L-739"></a> <span class="k">let</span> NERDTreeWinSize<span class="p">=</span><span class="m">45</span> </span><span id="L-740"><a name="L-740"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-741"><a name="L-741"></a><span class="c">&quot; }}}</span> </span><span id="L-742"><a name="L-742"></a> </span><span id="L-743"><a name="L-743"></a><span class="c">&quot; Configurações para o snipMate {{{</span> </span><span id="L-744"><a name="L-744"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-745"><a name="L-745"></a><span class="c">&quot; URL: http://www.vim.org/scripts/script.php?script_id=2540</span> </span><span id="L-746"><a name="L-746"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-747"><a name="L-747"></a><span class="c">&quot; Os snippets utilizados por esse .vimrc e que são diferentes da versão de</span> </span><span id="L-748"><a name="L-748"></a><span class="c">&quot; instalação, podem ser encontrados em:</span> </span><span id="L-749"><a name="L-749"></a><span class="c">&quot; URL: http://snipt.net/jfmitre/tag/snippet</span> </span><span id="L-750"><a name="L-750"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-751"><a name="L-751"></a><span class="c">&quot; O snipMate deve usar tabulação para funcionar</span> </span><span id="L-752"><a name="L-752"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-753"><a name="L-753"></a> <span class="k">au</span> <span class="nb">BufNewFile</span><span class="p">,</span><span class="nb">BufRead</span> *.snippets <span class="k">set</span> <span class="nb">noexpandtab</span> </span><span id="L-754"><a name="L-754"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-755"><a name="L-755"></a><span class="c">&quot; Não quero usar folder nos arquivos do snipMate</span> </span><span id="L-756"><a name="L-756"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-757"><a name="L-757"></a> <span class="k">au</span> <span class="nb">BufNewFile</span><span class="p">,</span><span class="nb">BufRead</span> *.snippets <span class="k">set</span> <span class="nb">foldlevel</span><span class="p">=</span><span class="m">2</span> </span><span id="L-758"><a name="L-758"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-759"><a name="L-759"></a><span class="c">&quot; }}}</span> </span><span id="L-760"><a name="L-760"></a> </span><span id="L-761"><a name="L-761"></a><span class="c">&quot; Configuração para GNU GPG {{{</span> </span><span id="L-762"><a name="L-762"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-763"><a name="L-763"></a><span class="c">&quot; URL: http://www.vim.org/scripts/script.php?script_id=661</span> </span><span id="L-764"><a name="L-764"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-765"><a name="L-765"></a><span class="c">&quot; Definindo a variável GPG_TTY no .vimrc </span> </span><span id="L-766"><a name="L-766"></a><span class="c">&quot; O correto é acrescentar ao .bashrc:</span> </span><span id="L-767"><a name="L-767"></a><span class="c">&quot; export GPG_TTY=&quot;tty&quot; </span> </span><span id="L-768"><a name="L-768"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-769"><a name="L-769"></a> <span class="k">let</span> $GPG_TTY <span class="p">=</span> <span class="s2">&quot;tty&quot;</span> </span><span id="L-770"><a name="L-770"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-771"><a name="L-771"></a><span class="c">&quot; Não crie arquivo de backup de arquivos encriptados</span> </span><span id="L-772"><a name="L-772"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-773"><a name="L-773"></a> <span class="k">au</span> <span class="nb">BufNewFile</span><span class="p">,</span><span class="nb">BufRead</span> *.gpg<span class="p">,</span>*.<span class="k">asc</span><span class="p">,</span>*.pgp <span class="k">setlocal</span> <span class="nb">nobk</span> </span><span id="L-774"><a name="L-774"></a> \ <span class="p">|</span> <span class="k">setlocal</span> <span class="nb">noswf</span> </span><span id="L-775"><a name="L-775"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-776"><a name="L-776"></a><span class="c">&quot; Utilizando o mesmo esquema de cores que foi criado para arquivos .txt</span> </span><span id="L-777"><a name="L-777"></a><span class="c">&quot; Vide &#39;Funções, mapeamentos e abreviações para edição de texto em geral&#39;</span> </span><span id="L-778"><a name="L-778"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-779"><a name="L-779"></a> <span class="k">au</span> <span class="nb">BufNewFile</span><span class="p">,</span><span class="nb">BufRead</span> *.gpg<span class="p">,</span>*.<span class="k">asc</span><span class="p">,</span>*.pgp source <span class="p">~</span><span class="sr">/.vim/</span>data/txt.<span class="k">vim</span> </span><span id="L-780"><a name="L-780"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-781"><a name="L-781"></a><span class="c">&quot; Facilitando o acesso ao meu arquivo de senhas, abre o mesmo em uma nova tab</span> </span><span id="L-782"><a name="L-782"></a><span class="c">&quot; Para navegar entre tabs:</span> </span><span id="L-783"><a name="L-783"></a><span class="c">&quot; :tabnext, :tabprev, :tabfirst, :tablast ou :tab n</span> </span><span id="L-784"><a name="L-784"></a><span class="c">&quot; O mapeamento abaixo refere-se a &lt;C-7&gt;</span> </span><span id="L-785"><a name="L-785"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-786"><a name="L-786"></a> map  <span class="p">&lt;</span>ESC<span class="p">&gt;</span>:<span class="k">tabnew</span> <span class="p">~</span>/.passwords.gpg<span class="p">&lt;</span>CR<span class="p">&gt;</span> </span><span id="L-787"><a name="L-787"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-788"><a name="L-788"></a><span class="c">&quot; }}}</span> </span><span id="L-789"><a name="L-789"></a> </span><span id="L-790"><a name="L-790"></a><span class="c">&quot; Para melhor uso do vim e seus plugins {{{</span> </span><span id="L-791"><a name="L-791"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-792"><a name="L-792"></a><span class="c">&quot; Utilizando abreviações em linha de comando</span> </span><span id="L-793"><a name="L-793"></a><span class="c">&quot; Para tanto vamos utilizar o comando Cab</span> </span><span id="L-794"><a name="L-794"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-795"><a name="L-795"></a> cab W <span class="k">w</span> </span><span id="L-796"><a name="L-796"></a> cab Wq <span class="k">wq</span> </span><span id="L-797"><a name="L-797"></a> cab wQ <span class="k">wq</span> </span><span id="L-798"><a name="L-798"></a> cab WQ <span class="k">wq</span> </span><span id="L-799"><a name="L-799"></a> cab Q <span class="k">q</span> </span><span id="L-800"><a name="L-800"></a><span class="c">&quot; ---------------------------------------------------------------------------- </span> </span><span id="L-801"><a name="L-801"></a><span class="c">&quot; Melhorando o trabalho com várias janelas</span> </span><span id="L-802"><a name="L-802"></a><span class="c">&quot; ---------------------------------------------------------------------------- </span> </span><span id="L-803"><a name="L-803"></a> imap <span class="p">&lt;</span>C<span class="p">-</span>W<span class="p">&gt;</span> <span class="p">&lt;</span>ESC<span class="p">&gt;&lt;</span>C<span class="p">-</span>W<span class="p">&gt;</span> </span><span id="L-804"><a name="L-804"></a><span class="c">&quot; Teclas de copiar, colar e recortar tipo: &lt;C-C&gt;, &lt;C-V&gt; e &lt;C-X&gt;</span> </span><span id="L-805"><a name="L-805"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-806"><a name="L-806"></a><span class="c">&quot; copy - copiar</span> </span><span id="L-807"><a name="L-807"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-808"><a name="L-808"></a> vmap <span class="p">&lt;</span>C<span class="p">-</span>C<span class="p">&gt;</span> <span class="k">y</span> </span><span id="L-809"><a name="L-809"></a><span class="c">&quot; ---------------------------------------------------------------------------- </span> </span><span id="L-810"><a name="L-810"></a><span class="c">&quot; paste - colar</span> </span><span id="L-811"><a name="L-811"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-812"><a name="L-812"></a> nmap <span class="p">&lt;</span>C<span class="p">-</span>V<span class="p">&gt;</span> <span class="k">p</span> </span><span id="L-813"><a name="L-813"></a> imap <span class="p">&lt;</span>C<span class="p">-</span>V<span class="p">&gt;</span> <span class="p">&lt;</span>C<span class="p">-</span>O<span class="p">&gt;</span><span class="k">p</span> </span><span id="L-814"><a name="L-814"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-815"><a name="L-815"></a><span class="c">&quot; cut - cortar</span> </span><span id="L-816"><a name="L-816"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-817"><a name="L-817"></a> vmap <span class="p">&lt;</span>C<span class="p">-</span>X<span class="p">&gt;</span> <span class="k">x</span> </span><span id="L-818"><a name="L-818"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-819"><a name="L-819"></a><span class="c">&quot; undo - desfazer</span> </span><span id="L-820"><a name="L-820"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-821"><a name="L-821"></a> <span class="nb">noremap</span> <span class="p">&lt;</span>C<span class="p">-</span>Z<span class="p">&gt;</span> <span class="k">u</span> </span><span id="L-822"><a name="L-822"></a> <span class="nb">inoremap</span> <span class="p">&lt;</span>C<span class="p">-</span>Z<span class="p">&gt;</span> <span class="p">&lt;</span>C<span class="p">-</span>O<span class="p">&gt;</span><span class="k">u</span> </span><span id="L-823"><a name="L-823"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-824"><a name="L-824"></a><span class="c">&quot; select all - selecionar tudo</span> </span><span id="L-825"><a name="L-825"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-826"><a name="L-826"></a> map <span class="p">&lt;</span>C<span class="p">-</span><span class="k">a</span><span class="p">&gt;</span> <span class="p">&lt;</span>esc<span class="p">&gt;</span>ggvG </span><span id="L-827"><a name="L-827"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-828"><a name="L-828"></a><span class="c">&quot; Faz o shift-insert comportar-se semelhante ao Xterm</span> </span><span id="L-829"><a name="L-829"></a><span class="c">&quot; Sendo assim você seleciona um bloco de texto com o mouse</span> </span><span id="L-830"><a name="L-830"></a><span class="c">&quot; e cola com o botão do meio do mouse</span> </span><span id="L-831"><a name="L-831"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-832"><a name="L-832"></a> map <span class="p">&lt;</span>S<span class="p">-</span>Insert<span class="p">&gt;</span> <span class="p">&lt;</span>MiddleMouse<span class="p">&gt;</span> </span><span id="L-833"><a name="L-833"></a> map<span class="p">!</span> <span class="p">&lt;</span>S<span class="p">-</span>Insert<span class="p">&gt;</span> <span class="p">&lt;</span>MiddleMouse<span class="p">&gt;</span> </span><span id="L-834"><a name="L-834"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-835"><a name="L-835"></a><span class="c">&quot; Atalhos para o plugin Calendar</span> </span><span id="L-836"><a name="L-836"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-837"><a name="L-837"></a><span class="c">&quot; URL: http://www.vim.org/scripts/script.php?script_id=52</span> </span><span id="L-838"><a name="L-838"></a><span class="c">&quot; ---------------------------------------------------------------------------- </span> </span><span id="L-839"><a name="L-839"></a> cab C Calendar </span><span id="L-840"><a name="L-840"></a> cab CH CalendarH </span><span id="L-841"><a name="L-841"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-842"><a name="L-842"></a><span class="c">&quot; Embaralha a tela para evitar bisbilhoteiros</span> </span><span id="L-843"><a name="L-843"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-844"><a name="L-844"></a> map <span class="p">&lt;</span>F4<span class="p">&gt;</span> ggVGg? </span><span id="L-845"><a name="L-845"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-846"><a name="L-846"></a><span class="c">&quot; Alterna o modo de quebra de linha</span> </span><span id="L-847"><a name="L-847"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-848"><a name="L-848"></a> map <span class="p">&lt;</span>leader<span class="p">&gt;</span><span class="k">b</span> :<span class="k">set</span> <span class="nb">wrap</span><span class="p">!</span> <span class="p">&lt;</span>bar<span class="p">&gt;</span> <span class="k">ec</span> &amp;<span class="nb">wrap</span> ? <span class="s1">&#39;wrap&#39;</span> : <span class="s1">&#39;nowrap&#39;</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 class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-850"><a name="L-850"></a><span class="c">&quot; }}}</span> </span><span id="L-851"><a name="L-851"></a> </span><span id="L-852"><a name="L-852"></a><span class="c">&quot; Funções, mapeamentos e abreviações para edição de texto em geral {{{</span> </span><span id="L-853"><a name="L-853"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-854"><a name="L-854"></a><span class="c">&quot; Definindo tamanho da linha, isto é, coluna onde a linha deve ser &quot;quebrada&quot;</span> </span><span id="L-855"><a name="L-855"></a><span class="c">&quot; com a inserção de fim de linha (&lt;EOL&gt;, abreviação de end-of-line).</span> </span><span id="L-856"><a name="L-856"></a><span class="c">&quot; Existe a recomendação majoritária de ter textos com quebra inferior ou igual</span> </span><span id="L-857"><a name="L-857"></a><span class="c">&quot; a 80. Contudo, 90 é uma boa escolha para uma formatação genérica.</span> </span><span id="L-858"><a name="L-858"></a><span class="c">&quot; Especifique outros valores de acordo com interesse</span> </span><span id="L-859"><a name="L-859"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-860"><a name="L-860"></a> <span class="k">set</span> <span class="nb">textwidth</span><span class="p">=</span><span class="m">90</span> </span><span id="L-861"><a name="L-861"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-862"><a name="L-862"></a><span class="c">&quot; Se uma linha ultrapassar o valor estipulado em textwidth ela será</span> </span><span id="L-863"><a name="L-863"></a><span class="c">&quot; mostrada em destaque colocá-la em uma função de liga desliga junto</span> </span><span id="L-864"><a name="L-864"></a><span class="c">&quot; com uma que mostre as linhas e colunas de um arquivo em destaque</span> </span><span id="L-865"><a name="L-865"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-866"><a name="L-866"></a> <span class="k">au</span> <span class="nb">BufNewFile</span><span class="p">,</span><span class="nb">BufRead</span> * exec <span class="s1">&#39;match Error /\%&gt;&#39;</span> . &amp;<span class="nb">textwidth</span> . <span class="s1">&#39;v.\+/&#39;</span> </span><span id="L-867"><a name="L-867"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-868"><a name="L-868"></a><span class="c">&quot; Fazer a primeiria letra depois de uma pontuação tornar-se maiúscula</span> </span><span id="L-869"><a name="L-869"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-870"><a name="L-870"></a><span class="c">&quot; :%s/[.!?]\_s\+\a/\U&amp;\E/g </span> </span><span id="L-871"><a name="L-871"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-872"><a name="L-872"></a><span class="c">&quot; Para remover linhas em branco duplicadas</span> </span><span id="L-873"><a name="L-873"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-874"><a name="L-874"></a><span class="c">&quot; map ,d my:%s/\(^\n\{2,}\)/\r/g`y</span> </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 class="c">&quot; Adição de um cabeçalho genérico</span> </span><span id="L-877"><a name="L-877"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-878"><a name="L-878"></a> <span class="k">fun</span><span class="p">!</span> InsertUpdateData<span class="p">()</span> </span><span id="L-879"><a name="L-879"></a> normal<span class="p">(</span><span class="m">1</span>G<span class="p">)</span> </span><span id="L-880"><a name="L-880"></a> <span class="k">call</span> append<span class="p">(</span><span class="m">0</span><span class="p">,</span> <span class="s2">&quot; File: &quot;</span><span class="p">)</span> </span><span id="L-881"><a name="L-881"></a> <span class="k">call</span> append<span class="p">(</span><span class="m">1</span><span class="p">,</span> <span class="s2">&quot; Author: J. F. Mitre &lt;http://jfmitre.com&gt;&quot;</span><span class="p">)</span> </span><span id="L-882"><a name="L-882"></a><span class="c">&quot; Escreve a data na forma: DD/MM/AA hs HH:MM</span> </span><span id="L-883"><a name="L-883"></a><span class="c">&quot; call append(2, &quot; Created: &quot; . strftime(&quot;%a %d/%b/%Y hs %H:%M&quot;)) </span> </span><span id="L-884"><a name="L-884"></a><span class="c">&quot; Escreve a data na forma: Semana DD MES AAAA HH:MM:SS TIMEZONE</span> </span><span id="L-885"><a name="L-885"></a> <span class="k">call</span> append<span class="p">(</span><span class="m">2</span><span class="p">,</span> <span class="s2">&quot; Created: &quot;</span> . strftime<span class="p">(</span><span class="s2">&quot;%c&quot;</span><span class="p">))</span> </span><span id="L-886"><a name="L-886"></a><span class="c">&quot; Escreve a data na forma: DD/MM/AA hs HH:MM</span> </span><span id="L-887"><a name="L-887"></a><span class="c">&quot; call append(3, &quot; Last Update: &quot; . strftime(&quot;%a %d/%b/%Y hs %H:%M&quot;)) </span> </span><span id="L-888"><a name="L-888"></a><span class="c">&quot; Escreve a data na forma: Semana DD MES AAAA HH:MM:SS TIMEZONE</span> </span><span id="L-889"><a name="L-889"></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 Update: &quot;</span> . strftime<span class="p">(</span><span class="s2">&quot;%c&quot;</span><span class="p">))</span> </span><span id="L-890"><a name="L-890"></a> <span class="k">call</span> append<span class="p">(</span><span class="m">4</span><span class="p">,</span> <span class="s2">&quot; Notes: &quot;</span><span class="p">)</span> </span><span id="L-891"><a name="L-891"></a> normal<span class="p">(</span>$<span class="p">)</span> </span><span id="L-892"><a name="L-892"></a> <span class="k">endfun</span> </span><span id="L-893"><a name="L-893"></a> cmap <span class="p">,</span><span class="k">cl</span> <span class="k">call</span> InsertUpdateData<span class="p">()&lt;</span>CR<span class="p">&gt;</span>A </span><span id="L-894"><a name="L-894"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-895"><a name="L-895"></a><span class="c">&quot; Dando destaque para notas</span> </span><span id="L-896"><a name="L-896"></a><span class="c">&quot; http://vivaotux.blogspot.com/2009/01/</span> </span><span id="L-897"><a name="L-897"></a><span class="c">&quot; \ uniformizao-de-espaamento-nos-cdigos.html</span> </span><span id="L-898"><a name="L-898"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-899"><a name="L-899"></a> <span class="nb">highlight</span> MinhasNotas ctermbg<span class="p">=</span>blue ctermfg<span class="p">=</span>yellow guibg<span class="p">=</span>blue guifg<span class="p">=</span>yellow </span><span id="L-900"><a name="L-900"></a> <span class="k">match</span> MinhasNotas <span class="sr">/[Nn]otas\? \?:/</span> </span><span id="L-901"><a name="L-901"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-902"><a name="L-902"></a><span class="c">&quot; a função (strftime) é predefinida pelo sistema</span> </span><span id="L-903"><a name="L-903"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-904"><a name="L-904"></a> iab YDATE <span class="p">&lt;</span>C<span class="p">-</span>R<span class="p">&gt;=</span>strftime<span class="p">(</span><span class="s2">&quot;%a %d/%b/%Y hs %H:%M&quot;</span><span class="p">)&lt;</span>CR<span class="p">&gt;</span> </span><span id="L-905"><a name="L-905"></a> iab HDATE <span class="p">&lt;</span>C<span class="p">-</span>R<span class="p">&gt;=</span>strftime<span class="p">(</span><span class="s2">&quot;%a %d/%b/%Y hs %H:%M&quot;</span><span class="p">)&lt;</span>CR<span class="p">&gt;</span> </span><span id="L-906"><a name="L-906"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-907"><a name="L-907"></a><span class="c">&quot; Adicionando o suporte a calculadora no vim</span> </span><span id="L-908"><a name="L-908"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-909"><a name="L-909"></a> 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-910"><a name="L-910"></a> <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-911"><a name="L-911"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-912"><a name="L-912"></a><span class="c">&quot; Fechamento automático para parênteses</span> </span><span id="L-913"><a name="L-913"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-914"><a name="L-914"></a> <span class="nb">inoremap</span> <span class="p">(</span> <span class="p">()&lt;</span>esc<span class="p">&gt;</span><span class="k">i</span> </span><span id="L-915"><a name="L-915"></a> <span class="nb">inoremap</span> { {}<span class="p">&lt;</span>esc<span class="p">&gt;</span><span class="k">i</span> </span><span id="L-916"><a name="L-916"></a> <span class="nb">inoremap</span> [ []<span class="p">&lt;</span>esc<span class="p">&gt;</span><span class="k">i</span> </span><span id="L-917"><a name="L-917"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-918"><a name="L-918"></a><span class="c">&quot; Função para atualizar a data da última modificação</span> </span><span id="L-919"><a name="L-919"></a><span class="c">&quot; Verifica se existe uma data nas 5 primeiras linhas do documento</span> </span><span id="L-920"><a name="L-920"></a><span class="c">&quot; Se não existe, escreve na primeira linha</span> </span><span id="L-921"><a name="L-921"></a><span class="c">&quot; Se existe, atualiza a informação</span> </span><span id="L-922"><a name="L-922"></a><span class="c">&quot; Essa função gera uma mensagem de erro em documento com menos de 5 linhas</span> </span><span id="L-923"><a name="L-923"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-924"><a name="L-924"></a> <span class="k">fun</span><span class="p">!</span> LastUpdate<span class="p">()</span> </span><span id="L-925"><a name="L-925"></a> mark z </span><span id="L-926"><a name="L-926"></a> <span class="k">if</span> getline<span class="p">(</span><span class="m">0</span><span class="p">)</span> <span class="p">=~</span> <span class="s2">&quot;.*Last Update:&quot;</span> <span class="p">||</span> </span><span id="L-927"><a name="L-927"></a> \ getline<span class="p">(</span><span class="m">1</span><span class="p">)</span> <span class="p">=~</span> <span class="s2">&quot;.*Last Update:&quot;</span> <span class="p">||</span> </span><span id="L-928"><a name="L-928"></a> \ getline<span class="p">(</span><span class="m">2</span><span class="p">)</span> <span class="p">=~</span> <span class="s2">&quot;.*Last Update:&quot;</span> <span class="p">||</span> </span><span id="L-929"><a name="L-929"></a> \ getline<span class="p">(</span><span class="m">3</span><span class="p">)</span> <span class="p">=~</span> <span class="s2">&quot;.*Last Update:&quot;</span> <span class="p">||</span> </span><span id="L-930"><a name="L-930"></a> \ getline<span class="p">(</span><span class="m">4</span><span class="p">)</span> <span class="p">=~</span> <span class="s2">&quot;.*Last Update:&quot;</span> <span class="p">||</span> </span><span id="L-931"><a name="L-931"></a> \ getline<span class="p">(</span><span class="m">5</span><span class="p">)</span> <span class="p">=~</span> <span class="s2">&quot;.*Last Update:&quot;</span> </span><span id="L-932"><a name="L-932"></a><span class="c">&quot; Atualiza apenas o que estiver nas 5 primeiras linhas</span> </span><span id="L-933"><a name="L-933"></a> exec <span class="s2">&quot;1,5s/\s*Last Update: .*$/Last Update: &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-934"><a name="L-934"></a><span class="c">&quot; Atualiza apenas a linha que contém o cursor</span> </span><span id="L-935"><a name="L-935"></a><span class="c">&quot; exec &quot;s/\s*Last Update: .*$/Last Update: &quot; . strftime(&quot;%c&quot;) . &quot;/&quot;</span> </span><span id="L-936"><a name="L-936"></a> <span class="k">else</span> </span><span id="L-937"><a name="L-937"></a><span class="c">&quot; call append(0, &quot; Last Update: &quot; . strftime(&quot;%a %d/%b/%Y hs %H:%M&quot;))</span> </span><span id="L-938"><a name="L-938"></a> <span class="k">call</span> append<span class="p">(</span><span class="m">0</span><span class="p">,</span> <span class="s2">&quot; Last Update: &quot;</span> . strftime<span class="p">(</span><span class="s2">&quot;%c&quot;</span><span class="p">))</span> </span><span id="L-939"><a name="L-939"></a> <span class="k">endif</span> </span><span id="L-940"><a name="L-940"></a> exec <span class="s2">&quot;&#39;z&quot;</span> </span><span id="L-941"><a name="L-941"></a> <span class="k">endfun</span> </span><span id="L-942"><a name="L-942"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-943"><a name="L-943"></a><span class="c">&quot; Abreviação para a função acima</span> </span><span id="L-944"><a name="L-944"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-945"><a name="L-945"></a> cmap data <span class="k">call</span> LastUpdate<span class="p">()&lt;</span>CR<span class="p">&gt;</span> </span><span id="L-946"><a name="L-946"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-947"><a name="L-947"></a><span class="c">&quot; Man: Páginas de manual são na verdade textos em NROFF </span> </span><span id="L-948"><a name="L-948"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-949"><a name="L-949"></a> <span class="k">au</span> <span class="nb">BufNewFile</span><span class="p">,</span><span class="nb">BufRead</span> *.man <span class="k">set</span> <span class="nb">ft</span><span class="p">=</span>nroff </span><span id="L-950"><a name="L-950"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-951"><a name="L-951"></a><span class="c">&quot; MostraTab: mostra TAB no inicio e espaços no fim das linhas</span> </span><span id="L-952"><a name="L-952"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-953"><a name="L-953"></a> map <span class="p">,</span>mt /^\<span class="k">t</span>\<span class="p">+</span>\\<span class="p">|</span>\s\<span class="p">+</span>$<span class="p">&lt;</span><span class="k">cr</span><span class="p">&gt;</span> </span><span id="L-954"><a name="L-954"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-955"><a name="L-955"></a><span class="c">&quot; PalavrasRepetidas: procura palavras repetidas no texto</span> </span><span id="L-956"><a name="L-956"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-957"><a name="L-957"></a> map <span class="p">,</span><span class="k">pr</span> /\<span class="p">&lt;</span>\<span class="p">(</span>\<span class="k">w</span>*\<span class="p">)</span> \<span class="m">1</span>\<span class="p">&gt;&lt;</span><span class="k">cr</span><span class="p">&gt;</span> </span><span id="L-958"><a name="L-958"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-959"><a name="L-959"></a><span class="c">&quot; Numerar linhas dentro do arquivo</span> </span><span id="L-960"><a name="L-960"></a><span class="c">&quot; :let i=1 | g/^/s//\=i.&quot;\t&quot;/ | let i=i+1</span> </span><span id="L-961"><a name="L-961"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-962"><a name="L-962"></a> map <span class="p">,</span><span class="k">n</span> :<span class="k">let</span> <span class="k">i</span><span class="p">=</span><span class="m">1</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="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><span id="L-963"><a name="L-963"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-964"><a name="L-964"></a><span class="c">&quot; Destaca uma linha no texto com o código de erro</span> </span><span id="L-965"><a name="L-965"></a><span class="c">&quot; ---------------------------------------------------------------------------- </span> </span><span id="L-966"><a name="L-966"></a> <span class="nb">nnoremap</span> <span class="p">&lt;</span>Leader<span class="p">&gt;</span><span class="k">k</span> <span class="k">mk</span>:exe <span class="s1">&#39;match Search /&lt;Bslash&gt;%&#39;</span>.line<span class="p">(</span><span class="s2">&quot;.&quot;</span><span class="p">)</span>.<span class="s1">&#39;l/&#39;</span><span class="p">&lt;</span>CR<span class="p">&gt;</span> </span><span id="L-967"><a name="L-967"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-968"><a name="L-968"></a><span class="c">&quot; Justifica: justifica os textos com o justificador em sed</span> </span><span id="L-969"><a name="L-969"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-970"><a name="L-970"></a> vmap <span class="p">,</span>je :<span class="p">!</span>sed.alinha<span class="p">-</span>justify<span class="p">&lt;</span><span class="k">cr</span><span class="p">&gt;</span> </span><span id="L-971"><a name="L-971"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-972"><a name="L-972"></a><span class="c">&quot; Digitar &quot;;l&quot; retira espaços em branco de final de arquivo</span> </span><span id="L-973"><a name="L-973"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-974"><a name="L-974"></a> map ;<span class="k">l</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> </span><span id="L-975"><a name="L-975"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-976"><a name="L-976"></a><span class="c">&quot; Mail: Configurações especiais para arquivos de e-mail</span> </span><span id="L-977"><a name="L-977"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-978"><a name="L-978"></a> <span class="k">au</span> <span class="nb">FileType</span> Mail <span class="k">set</span> <span class="k">fo</span><span class="p">=</span>ctq <span class="nb">tw</span><span class="p">=</span><span class="m">65</span> <span class="nb">et</span> </span><span id="L-979"><a name="L-979"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-980"><a name="L-980"></a><span class="c">&quot; Identação de textos e códigos com o TAB no modo visual</span> </span><span id="L-981"><a name="L-981"></a><span class="c">&quot; URL: http://gustavodutra.com/post/72/</span> </span><span id="L-982"><a name="L-982"></a><span class="c">&quot; \ dicas-de-movimentacao-e-identacao-no-gvim/</span> </span><span id="L-983"><a name="L-983"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-984"><a name="L-984"></a> <span class="nb">vnoremap</span> <span class="p">&lt;</span> <span class="p">&lt;</span>gv </span><span id="L-985"><a name="L-985"></a> <span class="nb">vnoremap</span> <span class="p">&gt;</span> <span class="p">&gt;</span>gv </span><span id="L-986"><a name="L-986"></a> vmap <span class="p">&lt;</span>TAB<span class="p">&gt;</span> <span class="p">&gt;</span> </span><span id="L-987"><a name="L-987"></a> vmap <span class="p">&lt;</span>S<span class="p">-</span>TAB<span class="p">&gt;</span> <span class="p">&lt;</span> </span><span id="L-988"><a name="L-988"></a> imap <span class="p">&lt;</span>S<span class="p">-</span>TAB<span class="p">&gt;</span> <span class="p">&lt;</span>ESC<span class="p">&gt;&lt;&lt;</span><span class="k">i</span> </span><span id="L-989"><a name="L-989"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-990"><a name="L-990"></a><span class="c">&quot; Permite abrir um arquivo mencionado com o caminho dentro de outro arquivo</span> </span><span id="L-991"><a name="L-991"></a><span class="c">&quot; Funciona em cabeçalhos de programação</span> </span><span id="L-992"><a name="L-992"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-993"><a name="L-993"></a> nmap gf :<span class="k">new</span> %:<span class="k">p</span>:<span class="k">h</span>/<span class="p">&lt;</span><span class="k">cfile</span><span class="p">&gt;&lt;</span>CR<span class="p">&gt;</span> </span><span id="L-994"><a name="L-994"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-995"><a name="L-995"></a><span class="c">&quot; }}}</span> </span><span id="L-996"><a name="L-996"></a> </span><span id="L-997"><a name="L-997"></a><span class="c">&quot; Funções, mapeamentos e abreviações para aquivos .txt {{{</span> </span><span id="L-998"><a name="L-998"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-999"><a name="L-999"></a><span class="c">&quot; Quebra os arquivos de texto na coluna 79</span> </span><span id="L-1000"><a name="L-1000"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-1001"><a name="L-1001"></a> <span class="k">au</span> <span class="nb">BufNewFile</span><span class="p">,</span><span class="nb">BufRead</span> *.txt <span class="k">setl</span> <span class="nb">tw</span><span class="p">=</span><span class="m">79</span> </span><span id="L-1002"><a name="L-1002"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-1003"><a name="L-1003"></a><span class="c">&quot; Usa uma source para edição de arquivo .txt</span> </span><span id="L-1004"><a name="L-1004"></a><span class="c">&quot; Source txt.vim do Aurelio Marinho Jarga</span> </span><span id="L-1005"><a name="L-1005"></a><span class="c">&quot; URL: http://aurelio.net/vim/txt.vim</span> </span><span id="L-1006"><a name="L-1006"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-1007"><a name="L-1007"></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>data/txt.<span class="k">vim</span> </span><span id="L-1008"><a name="L-1008"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-1009"><a name="L-1009"></a><span class="c">&quot; Os arquivo README, NEWS e ToDo também são arquivos de texto </span> </span><span id="L-1010"><a name="L-1010"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-1011"><a name="L-1011"></a> <span class="k">au</span> <span class="nb">BufNewFile</span><span class="p">,</span><span class="nb">BufRead</span> *{R<span class="p">,</span><span class="k">r</span>}{E<span class="p">,</span><span class="k">e</span>}{A<span class="p">,</span><span class="k">a</span>}{D<span class="p">,</span><span class="k">d</span>}{M<span class="p">,</span><span class="k">m</span>}{E<span class="p">,</span><span class="k">e</span>} <span class="k">setl</span> <span class="nb">ft</span><span class="p">=</span>txt <span class="nb">tw</span><span class="p">=</span><span class="m">79</span> </span><span id="L-1012"><a name="L-1012"></a> <span class="k">au</span> <span class="nb">BufNewFile</span><span class="p">,</span><span class="nb">BufRead</span> *{R<span class="p">,</span><span class="k">r</span>}{E<span class="p">,</span><span class="k">e</span>}{A<span class="p">,</span><span class="k">a</span>}{D<span class="p">,</span><span class="k">d</span>}{M<span class="p">,</span><span class="k">m</span>}{E<span class="p">,</span><span class="k">e</span>} </span><span id="L-1013"><a name="L-1013"></a> \ source <span class="p">~</span><span class="sr">/.vim/</span>data/txt.<span class="k">vim</span> </span><span id="L-1014"><a name="L-1014"></a> <span class="k">au</span> <span class="nb">BufNewFile</span><span class="p">,</span><span class="nb">BufRead</span> *{N<span class="p">,</span><span class="k">n</span>}{E<span class="p">,</span><span class="k">e</span>}{W<span class="p">,</span><span class="k">w</span>}{S<span class="p">,</span>s} <span class="k">setl</span> <span class="nb">ft</span><span class="p">=</span>txt <span class="nb">tw</span><span class="p">=</span><span class="m">79</span> </span><span id="L-1015"><a name="L-1015"></a> <span class="k">au</span> <span class="nb">BufNewFile</span><span class="p">,</span><span class="nb">BufRead</span> *{N<span class="p">,</span><span class="k">n</span>}{E<span class="p">,</span><span class="k">e</span>}{W<span class="p">,</span><span class="k">w</span>}{S<span class="p">,</span>s} source <span class="p">~</span><span class="sr">/.vim/</span>data/txt.<span class="k">vim</span> </span><span id="L-1016"><a name="L-1016"></a> <span class="k">au</span> <span class="nb">BufNewFile</span><span class="p">,</span><span class="nb">BufRead</span> *{T<span class="p">,</span><span class="k">t</span>}{O<span class="p">,</span><span class="k">o</span>}{D<span class="p">,</span><span class="k">d</span>}{O<span class="p">,</span><span class="k">o</span>} <span class="k">setl</span> <span class="nb">ft</span><span class="p">=</span>txt <span class="nb">tw</span><span class="p">=</span><span class="m">79</span> </span><span id="L-1017"><a name="L-1017"></a> <span class="k">au</span> <span class="nb">BufNewFile</span><span class="p">,</span><span class="nb">BufRead</span> *{T<span class="p">,</span><span class="k">t</span>}{O<span class="p">,</span><span class="k">o</span>}{D<span class="p">,</span><span class="k">d</span>}{O<span class="p">,</span><span class="k">o</span>} source <span class="p">~</span><span class="sr">/.vim/</span>data/txt.<span class="k">vim</span> </span><span id="L-1018"><a name="L-1018"></a><span class="c">&quot; }}}</span> </span><span id="L-1019"><a name="L-1019"></a> </span><span id="L-1020"><a name="L-1020"></a><span class="c">&quot; Funções, mapeamentos e abreviações para programação e edição de dotfiles {{{</span> </span><span id="L-1021"><a name="L-1021"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-1022"><a name="L-1022"></a><span class="c">&quot; Função que mapeia &lt;F9&gt; para mostrar/ocultar comentários</span> </span><span id="L-1023"><a name="L-1023"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-1024"><a name="L-1024"></a> <span class="k">fu</span><span class="p">!</span> CommOnOff<span class="p">()</span> </span><span id="L-1025"><a name="L-1025"></a> <span class="k">if</span> <span class="p">!</span>exists<span class="p">(</span><span class="s1">&#39;g:hiddcomm&#39;</span><span class="p">)</span> </span><span id="L-1026"><a name="L-1026"></a> <span class="k">let</span> <span class="k">g</span>:hiddcomm<span class="p">=</span><span class="m">1</span> <span class="p">|</span> <span class="k">hi</span> Comment ctermfg<span class="p">=</span>black guifg<span class="p">=</span>black </span><span id="L-1027"><a name="L-1027"></a> <span class="k">else</span> </span><span id="L-1028"><a name="L-1028"></a> unlet <span class="k">g</span>:hiddcomm <span class="p">|</span> <span class="k">hi</span> Comment ctermfg<span class="p">=</span>cyan guifg<span class="p">=</span>cyan <span class="nb">term</span><span class="p">=</span><span class="nb">bold</span> </span><span id="L-1029"><a name="L-1029"></a> <span class="k">endif</span> </span><span id="L-1030"><a name="L-1030"></a> endfu </span><span id="L-1031"><a name="L-1031"></a> map <span class="p">&lt;</span>F9<span class="p">&gt;</span> :<span class="k">call</span> CommOnOff<span class="p">()&lt;</span><span class="k">cr</span><span class="p">&gt;</span> </span><span id="L-1032"><a name="L-1032"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-1033"><a name="L-1033"></a><span class="c">&quot; Função para comentar vários arquivos de acordo com o tipo</span> </span><span id="L-1034"><a name="L-1034"></a><span class="c">&quot; URL: http://vim.wikia.com/wiki/Comment_Lines_according_to_a_given_filetype</span> </span><span id="L-1035"><a name="L-1035"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-1036"><a name="L-1036"></a> <span class="k">fu</span><span class="p">!</span> CommentLines<span class="p">()</span> </span><span id="L-1037"><a name="L-1037"></a><span class="c"> &quot;let Comment=&quot;#&quot; &quot; shell, tcl, php, perl</span> </span><span id="L-1038"><a name="L-1038"></a> exe <span class="s2">&quot;:[email protected]^@&quot;</span>.<span class="k">g</span>:Comment.<span class="s2">&quot;@g&quot;</span> </span><span id="L-1039"><a name="L-1039"></a> exe <span class="s2">&quot;:[email protected][email protected]&quot;</span>.<span class="k">g</span>:EndComment.<span class="s2">&quot;@g&quot;</span> </span><span id="L-1040"><a name="L-1040"></a> endfu </span><span id="L-1041"><a name="L-1041"></a><span class="c">&quot; mapeando a função no modo visual com a combinação &#39;co&#39;</span> </span><span id="L-1042"><a name="L-1042"></a> vmap <span class="k">co</span> :<span class="k">call</span> CommentLines<span class="p">()&lt;</span>CR<span class="p">&gt;</span><span class="k">a</span> </span><span id="L-1043"><a name="L-1043"></a><span class="c">&quot; definindo os comentários por tipo de arquivo (a primeira linha é um padrão)</span> </span><span id="L-1044"><a name="L-1044"></a> <span class="k">au</span> <span class="nb">BufRead</span><span class="p">,</span><span class="nb">BufNewFile</span> * <span class="k">let</span> Comment<span class="p">=</span><span class="s2">&quot;# &quot;</span> <span class="p">|</span> <span class="k">let</span> EndComment<span class="p">=</span><span class="s2">&quot;&quot;</span> </span><span id="L-1045"><a name="L-1045"></a> <span class="k">au</span> <span class="nb">BufRead</span><span class="p">,</span><span class="nb">BufNewFile</span> *.<span class="nb">inc</span><span class="p">,</span>*.ihtml<span class="p">,</span>*.html<span class="p">,</span>*.tpl<span class="p">,</span>*.class </span><span id="L-1046"><a name="L-1046"></a> \ <span class="k">let</span> Comment<span class="p">=</span><span class="s2">&quot;&lt;!-- &quot;</span> <span class="p">|</span> <span class="k">let</span> EndComment<span class="p">=</span><span class="s2">&quot; --&gt;&quot;</span> </span><span id="L-1047"><a name="L-1047"></a> <span class="k">au</span> <span class="nb">BufRead</span><span class="p">,</span><span class="nb">BufNewFile</span> *.<span class="k">sh</span><span class="p">,</span>*.pl<span class="p">,</span>*.<span class="k">tcl</span> <span class="k">let</span> Comment<span class="p">=</span><span class="s2">&quot;# &quot;</span> <span class="p">|</span> <span class="k">let</span> EndComment<span class="p">=</span><span class="s2">&quot;&quot;</span> </span><span id="L-1048"><a name="L-1048"></a> <span class="k">au</span> <span class="nb">BufRead</span><span class="p">,</span><span class="nb">BufNewFile</span> *.<span class="nb">js</span> <span class="k">set</span> <span class="p">|</span> <span class="k">let</span> Comment<span class="p">=</span><span class="s2">&quot;// &quot;</span> <span class="p">|</span> <span class="k">let</span> EndComment<span class="p">=</span><span class="s2">&quot;&quot;</span> </span><span id="L-1049"><a name="L-1049"></a> <span class="k">au</span> <span class="nb">BufRead</span><span class="p">,</span><span class="nb">BufNewFile</span> *.<span class="k">cc</span><span class="p">,</span>*.php<span class="p">,</span>*.cxx<span class="p">,</span>*.cpp </span><span id="L-1050"><a name="L-1050"></a> \ <span class="k">let</span> Comment<span class="p">=</span><span class="s2">&quot;// &quot;</span> <span class="p">|</span> <span class="k">let</span> EndComment<span class="p">=</span><span class="s2">&quot;&quot;</span> </span><span id="L-1051"><a name="L-1051"></a> <span class="k">au</span> <span class="nb">BufRead</span><span class="p">,</span><span class="nb">BufNewFile</span> *.<span class="k">c</span><span class="p">,</span>*.<span class="k">h</span> <span class="k">let</span> Comment<span class="p">=</span><span class="s2">&quot;/* &quot;</span> <span class="p">|</span> <span class="k">let</span> EndComment<span class="p">=</span><span class="s2">&quot; */&quot;</span> </span><span id="L-1052"><a name="L-1052"></a> <span class="k">au</span> <span class="nb">BufRead</span><span class="p">,</span><span class="nb">BufNewFile</span> *.f90<span class="p">,</span>*.f95 <span class="k">let</span> Comment<span class="p">=</span><span class="s2">&quot;! &quot;</span> <span class="p">|</span> <span class="k">let</span> EndComment<span class="p">=</span><span class="s2">&quot;&quot;</span> </span><span id="L-1053"><a name="L-1053"></a> <span class="k">au</span> <span class="nb">BufRead</span><span class="p">,</span><span class="nb">BufNewFile</span> *.<span class="k">f</span> <span class="k">let</span> Comment<span class="p">=</span><span class="s2">&quot;C &quot;</span> <span class="p">|</span> <span class="k">let</span> EndComment<span class="p">=</span><span class="s2">&quot;&quot;</span> </span><span id="L-1054"><a name="L-1054"></a> <span class="k">au</span> <span class="nb">BufRead</span><span class="p">,</span><span class="nb">BufNewFile</span> *.tex<span class="p">,</span>*.bib <span class="k">let</span> Comment<span class="p">=</span><span class="s2">&quot;% &quot;</span> <span class="p">|</span> <span class="k">let</span> EndComment<span class="p">=</span><span class="s2">&quot;&quot;</span> </span><span id="L-1055"><a name="L-1055"></a> <span class="k">au</span> <span class="nb">BufRead</span><span class="p">,</span><span class="nb">BufNewFile</span> *.<span class="k">vim</span><span class="p">,</span>.vimrc <span class="k">let</span> Comment<span class="p">=</span><span class="s2">&quot;\&quot; &quot;</span> <span class="p">|</span> <span class="k">let</span> EndComment<span class="p">=</span><span class="s2">&quot;&quot;</span> </span><span id="L-1056"><a name="L-1056"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-1057"><a name="L-1057"></a><span class="c">&quot; }}}</span> </span><span id="L-1058"><a name="L-1058"></a> </span><span id="L-1059"><a name="L-1059"></a><span class="c">&quot; Para editar o vimrc {{{</span> </span><span id="L-1060"><a name="L-1060"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-1061"><a name="L-1061"></a><span class="c">&quot; Permite recarregar e editar o ~/.vimrc</span> </span><span id="L-1062"><a name="L-1062"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-1063"><a name="L-1063"></a><span class="c">&quot; Para recarregar o .vimrc manualmente</span> </span><span id="L-1064"><a name="L-1064"></a> imap <span class="p">,</span><span class="k">u</span> <span class="p">&lt;</span>ESC<span class="p">&gt;</span>:source <span class="p">~</span>/.vimrc<span class="p">&lt;</span>CR<span class="p">&gt;</span> </span><span id="L-1065"><a name="L-1065"></a><span class="c">&quot; Para permitir que ele seja automaticamente carregado ao ser salvo</span> </span><span id="L-1066"><a name="L-1066"></a><span class="c">&quot; autocmd! bufwritepost .vimrc source %</span> </span><span id="L-1067"><a name="L-1067"></a><span class="c">&quot; Para editar o .vimrc</span> </span><span id="L-1068"><a name="L-1068"></a> imap <span class="p">,</span><span class="k">v</span> <span class="p">&lt;</span>ESC<span class="p">&gt;</span>:<span class="k">e</span> <span class="p">~</span>/.vimrc<span class="p">&lt;</span>CR<span class="p">&gt;</span> </span><span id="L-1069"><a name="L-1069"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-1070"><a name="L-1070"></a><span class="c">&quot; }}}</span> </span><span id="L-1071"><a name="L-1071"></a> </span><span id="L-1072"><a name="L-1072"></a><span class="c">&quot; Funções, mapeamentos e abreviações para Makefiles {{{</span> </span><span id="L-1073"><a name="L-1073"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-1074"><a name="L-1074"></a><span class="c">&quot; O Makefile deve usar Tabs</span> </span><span id="L-1075"><a name="L-1075"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-1076"><a name="L-1076"></a> <span class="k">au</span> <span class="nb">BufNewFile</span><span class="p">,</span><span class="nb">BufRead</span> *[mM]akefile <span class="k">setlocal</span> <span class="nb">noexpandtab</span> </span><span id="L-1077"><a name="L-1077"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-1078"><a name="L-1078"></a><span class="c">&quot; Esses arquivos também são tipo scripts</span> </span><span id="L-1079"><a name="L-1079"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-1080"><a name="L-1080"></a> <span class="k">au</span> <span class="nb">BufNewFile</span><span class="p">,</span><span class="nb">BufRead</span> *[mM]akefile* <span class="k">setlocal</span> <span class="nb">ft</span><span class="p">=</span><span class="k">make</span> </span><span id="L-1081"><a name="L-1081"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-1082"><a name="L-1082"></a><span class="c">&quot; }}}</span> </span><span id="L-1083"><a name="L-1083"></a> </span><span id="L-1084"><a name="L-1084"></a><span class="c">&quot; Funções, mapeamentos e abreviações para LaTeX {{{</span> </span><span id="L-1085"><a name="L-1085"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-1086"><a name="L-1086"></a><span class="c">&quot; Identificando o .tex como código LaTeX</span> </span><span id="L-1087"><a name="L-1087"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-1088"><a name="L-1088"></a> <span class="k">let</span> <span class="k">g</span>:tex_flavor<span class="p">=</span><span class="s1">&#39;latex&#39;</span> </span><span id="L-1089"><a name="L-1089"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-1090"><a name="L-1090"></a><span class="c">&quot; Registrando tamanho de coluna em arquivo LaTeX</span> </span><span id="L-1091"><a name="L-1091"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-1092"><a name="L-1092"></a> <span class="k">au</span> <span class="nb">BufNewFile</span><span class="p">,</span><span class="nb">BufRead</span> *.tex <span class="k">setlocal</span> <span class="nb">tw</span><span class="p">=</span><span class="m">79</span> </span><span id="L-1093"><a name="L-1093"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-1094"><a name="L-1094"></a><span class="c">&quot; Dicionário que é a lista dos nomes dos snippets utilizados pelo snipMate </span> </span><span id="L-1095"><a name="L-1095"></a><span class="c">&quot; quando o LaTeX é utilizado</span> </span><span id="L-1096"><a name="L-1096"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-1097"><a name="L-1097"></a> <span class="k">au</span> <span class="nb">BufNewFile</span><span class="p">,</span><span class="nb">BufRead</span> *.tex <span class="k">setlocal</span> <span class="nb">dictionary</span><span class="p">=~</span><span class="sr">/.vim/</span><span class="nb">dict</span>/latex.dic </span><span id="L-1098"><a name="L-1098"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-1099"><a name="L-1099"></a><span class="c">&quot; Dicionário relativo as tags do arquivo de bibliografia.</span> </span><span id="L-1100"><a name="L-1100"></a><span class="c">&quot; Digite &lt;F7&gt; (ou sua tecla personalizada) para criar o arquivo ./bib.dic</span> </span><span id="L-1101"><a name="L-1101"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-1102"><a name="L-1102"></a> <span class="k">au</span> <span class="nb">BufNewFile</span><span class="p">,</span><span class="nb">BufRead</span> *.tex <span class="k">setlocal</span> <span class="nb">dictionary</span><span class="p">+=</span>./bib.dic </span><span id="L-1103"><a name="L-1103"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-1104"><a name="L-1104"></a><span class="c">&quot; Dicionário completo de comandos. Adaptado do dicionário do Kile.</span> </span><span id="L-1105"><a name="L-1105"></a><span class="c">&quot; URL: http://sites.google.com/site/bemylifeeasy/Home/tex.zip</span> </span><span id="L-1106"><a name="L-1106"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-1107"><a name="L-1107"></a> <span class="k">au</span> <span class="nb">BufNewFile</span><span class="p">,</span><span class="nb">BufRead</span> *.tex <span class="k">setlocal</span> <span class="nb">dictionary</span><span class="p">+=~</span><span class="sr">/.vim/</span><span class="nb">dict</span><span class="sr">/tex/</span>*.cwl </span><span id="L-1108"><a name="L-1108"></a> \ <span class="nb">iskeyword</span><span class="p">+=</span>\\<span class="p">,</span>.<span class="p">,</span>{<span class="p">,</span>}<span class="p">,</span>[<span class="p">,</span>]<span class="p">,</span>*<span class="p">,=,</span>/<span class="p">,(,),&gt;,&lt;</span> </span><span id="L-1109"><a name="L-1109"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-1110"><a name="L-1110"></a><span class="c">&quot; Alguns comandos para LaTeX (para o modo de inserção)</span> </span><span id="L-1111"><a name="L-1111"></a><span class="c">&quot; Ative a complementação de chaves para melhor aproveitamento</span> </span><span id="L-1112"><a name="L-1112"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-1113"><a name="L-1113"></a> <span class="k">au</span> <span class="nb">BufNewFile</span><span class="p">,</span><span class="nb">BufRead</span> *.tex imap <span class="p">,</span><span class="k">bf</span> \textbf{ </span><span id="L-1114"><a name="L-1114"></a> \ <span class="p">|</span> imap <span class="p">,</span>it \textit{ </span><span id="L-1115"><a name="L-1115"></a> \ <span class="p">|</span> imap <span class="p">,</span>tt \texttt{ </span><span id="L-1116"><a name="L-1116"></a> \ <span class="p">|</span> imap <span class="p">,</span>fn \footnote{ </span><span id="L-1117"><a name="L-1117"></a> \ <span class="p">|</span> imap <span class="p">,</span><span class="k">se</span> \section{ </span><span id="L-1118"><a name="L-1118"></a> \ <span class="p">|</span> imap <span class="p">,</span><span class="nb">ch</span> \chapter{ </span><span id="L-1119"><a name="L-1119"></a> \ <span class="p">|</span> imap <span class="p">,</span><span class="k">un</span> \<span class="nb">underline</span>{ </span><span id="L-1120"><a name="L-1120"></a> \ <span class="p">|</span> iab latex \LaTeX </span><span id="L-1121"><a name="L-1121"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-1122"><a name="L-1122"></a><span class="c">&quot; Gerando um dicionário de bibliografia</span> </span><span id="L-1123"><a name="L-1123"></a><span class="c">&quot; O script (em bash) catbib varre todos os .bib do diretório corrente e </span> </span><span id="L-1124"><a name="L-1124"></a><span class="c">&quot; cria o arquivo ./bib.dic que é parte da lista de dicionários acima</span> </span><span id="L-1125"><a name="L-1125"></a><span class="c">&quot; </span> </span><span id="L-1126"><a name="L-1126"></a><span class="c">&quot; Código do script: catbib</span> </span><span id="L-1127"><a name="L-1127"></a><span class="c">&quot; #!/bin/bash</span> </span><span id="L-1128"><a name="L-1128"></a><span class="c">&quot; # File: catbib</span> </span><span id="L-1129"><a name="L-1129"></a><span class="c">&quot; # Author: J. F. Mitre &lt;http://jfmitre.com&gt;</span> </span><span id="L-1130"><a name="L-1130"></a><span class="c">&quot; # Created: Qui 28/Mai/2009 hs 23:15</span> </span><span id="L-1131"><a name="L-1131"></a><span class="c">&quot; # Last Update: Dom 31 Mai 2009 13:17:25 BRT</span> </span><span id="L-1132"><a name="L-1132"></a><span class="c">&quot; # Notes: write an bib.dic with labels for \cite{}</span> </span><span id="L-1133"><a name="L-1133"></a><span class="c">&quot;</span> </span><span id="L-1134"><a name="L-1134"></a><span class="c">&quot; TEMP=`ls *.bib 2&gt;/dev/null`</span> </span><span id="L-1135"><a name="L-1135"></a><span class="c">&quot; if [ ! -z $TEMP ]; then</span> </span><span id="L-1136"><a name="L-1136"></a><span class="c">&quot; #if there is/are *.bib, then</span> </span><span id="L-1137"><a name="L-1137"></a><span class="c">&quot; grep @ *.bib |sed -e &#39;/STRING/d&#39; \</span> </span><span id="L-1138"><a name="L-1138"></a><span class="c">&quot; -e &#39;/ /d&#39; \</span> </span><span id="L-1139"><a name="L-1139"></a><span class="c">&quot; -e &#39;s/^.*{//g&#39; &gt;bib.dic 2&gt;/dev/null</span> </span><span id="L-1140"><a name="L-1140"></a><span class="c">&quot; fi</span> </span><span id="L-1141"><a name="L-1141"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-1142"><a name="L-1142"></a> <span class="k">au</span> <span class="nb">BufNewFile</span><span class="p">,</span><span class="nb">BufRead</span> *.tex<span class="p">,</span>*.bib </span><span id="L-1143"><a name="L-1143"></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="p">!~</span><span class="sr">/.vim/</span>scripts/catbib<span class="p">&lt;</span>CR<span class="p">&gt;</span> </span><span id="L-1144"><a name="L-1144"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-1145"><a name="L-1145"></a><span class="c">&quot; Correlacionando as aspas estilo LaTeX</span> </span><span id="L-1146"><a name="L-1146"></a><span class="c">&quot; e mapeando a função &quot;&quot; para ser ``&#39;&#39; se digitar &#39;&quot;&lt;space&gt;&quot;&#39;, ou seja,</span> </span><span id="L-1147"><a name="L-1147"></a><span class="c">&quot; aspas, espaço, aspas, será incluído as aspas comuns.</span> </span><span id="L-1148"><a name="L-1148"></a><span class="c">&quot; ---------------------------------------------------------------------------- </span> </span><span id="L-1149"><a name="L-1149"></a> <span class="k">au</span> <span class="nb">BufNewFile</span><span class="p">,</span><span class="nb">BufRead</span> *.tex <span class="k">setlocal</span> <span class="nb">matchpairs</span><span class="p">+=</span>`:&#39; </span><span id="L-1150"><a name="L-1150"></a> \ <span class="p">|</span> <span class="nb">inoremap</span> <span class="s2">&quot;&quot;</span> ``<span class="s1">&#39;&#39;</span><span class="p">&lt;</span>esc<span class="p">&gt;&lt;</span><span class="k">left</span><span class="p">&gt;&lt;</span><span class="k">left</span><span class="p">&gt;</span><span class="k">a</span> </span><span id="L-1151"><a name="L-1151"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-1152"><a name="L-1152"></a><span class="c">&quot; Gerenciando folders em LaTeX (apenas seções são folders)</span> </span><span id="L-1153"><a name="L-1153"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-1154"><a name="L-1154"></a> <span class="k">au</span> <span class="nb">BufNewFile</span><span class="p">,</span><span class="nb">BufRead</span> *.tex <span class="k">setlocal</span> <span class="nb">foldmarker</span><span class="p">=</span>%\ bsec<span class="p">,</span>%\ endsec </span><span id="L-1155"><a name="L-1155"></a> \ <span class="p">|</span> <span class="k">setlocal</span> <span class="nb">foldlevel</span><span class="p">=</span><span class="m">0</span> </span><span id="L-1156"><a name="L-1156"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-1157"><a name="L-1157"></a><span class="c">&quot; Construindo e gerenciando um &#39;projeto&#39; com o taglist</span> </span><span id="L-1158"><a name="L-1158"></a><span class="c">&quot; Não deixa de ser abreviações criadas anteriormente, mas aqui possui um </span> </span><span id="L-1159"><a name="L-1159"></a><span class="c">&quot; propósito mais definido, com um nome mais claro.</span> </span><span id="L-1160"><a name="L-1160"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-1161"><a name="L-1161"></a> cab texctg TlistAddFilesRecursive ./ *.tex </span><span id="L-1162"><a name="L-1162"></a> cab texp Tlist </span><span id="L-1163"><a name="L-1163"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-1164"><a name="L-1164"></a><span class="c">&quot; Filtrando e abrindo log para melhor avaliação do resultado da compilação</span> </span><span id="L-1165"><a name="L-1165"></a><span class="c">&quot; modifique vsplit para split caso prefira dividir a tela horizontalmente.</span> </span><span id="L-1166"><a name="L-1166"></a> </span><span id="L-1167"><a name="L-1167"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-1168"><a name="L-1168"></a> <span class="k">au</span> <span class="nb">BufNewFile</span><span class="p">,</span><span class="nb">BufRead</span> *.tex<span class="p">,</span>*.bib </span><span id="L-1169"><a name="L-1169"></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="p">!~</span><span class="sr">/.vim/</span>scripts<span class="sr">/latexfilter &amp;&gt;./</span>filter.log<span class="p">&lt;</span>CR<span class="p">&gt;</span> </span><span id="L-1170"><a name="L-1170"></a> \<span class="p">&lt;</span>ESC<span class="p">&gt;</span>:<span class="k">vsplit</span> ./filter.log<span class="p">&lt;</span>CR<span class="p">&gt;</span> </span><span id="L-1171"><a name="L-1171"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-1172"><a name="L-1172"></a><span class="c">&quot; Carregando sintaxe para destacar erros no código LaTeX</span> </span><span id="L-1173"><a name="L-1173"></a><span class="c">&quot; Ela será aplicada apenas ao arquivo filter.log criado no item anterior</span> </span><span id="L-1174"><a name="L-1174"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-1175"><a name="L-1175"></a> <span class="k">au</span> <span class="nb">BufNewFile</span><span class="p">,</span><span class="nb">BufRead</span> filter.log <span class="k">syn</span> clear <span class="p">|</span> <span class="k">syn</span> case ignore </span><span id="L-1176"><a name="L-1176"></a> \ <span class="p">|</span> <span class="k">syn</span> <span class="k">match</span> logError <span class="s1">&#39;.*Error.*&#39;</span> </span><span id="L-1177"><a name="L-1177"></a> \ <span class="p">|</span> <span class="k">syn</span> <span class="k">match</span> logWarning <span class="s1">&#39;.*Warning.*&#39;</span> </span><span id="L-1178"><a name="L-1178"></a> \ <span class="p">|</span> <span class="k">syn</span> <span class="k">match</span> logOverUnderFull <span class="s1">&#39;.*[Over|Under].*[v|h]box.*&#39;</span> </span><span id="L-1179"><a name="L-1179"></a> \ <span class="p">|</span> <span class="k">syn</span> <span class="k">match</span> logFile <span class="s1">&#39;.*\.\/.*\....$&#39;</span> </span><span id="L-1180"><a name="L-1180"></a> \ <span class="p">|</span> <span class="k">syn</span> <span class="k">match</span> logNoFile1 <span class="s1">&#39;.*No\ file.*&#39;</span> </span><span id="L-1181"><a name="L-1181"></a> \ <span class="p">|</span> <span class="k">syn</span> <span class="k">match</span> logNoFile2 <span class="s1">&#39;.*File.*does.not.*&#39;</span> </span><span id="L-1182"><a name="L-1182"></a> \ <span class="p">|</span> <span class="k">hi</span> logOverUnderFull ctermfg<span class="p">=</span>LightGrey cterm<span class="p">=</span><span class="nb">bold</span> </span><span id="L-1183"><a name="L-1183"></a> \ <span class="p">|</span> <span class="k">hi</span> logWarning ctermfg<span class="p">=</span>Red cterm<span class="p">=</span><span class="nb">bold</span> </span><span id="L-1184"><a name="L-1184"></a> \ <span class="p">|</span> <span class="k">hi</span> logFile ctermfg<span class="p">=</span>Green cterm<span class="p">=</span><span class="nb">bold</span> </span><span id="L-1185"><a name="L-1185"></a> \ <span class="p">|</span> <span class="k">hi</span> logError ctermfg<span class="p">=</span>yellow ctermbg<span class="p">=</span>Red </span><span id="L-1186"><a name="L-1186"></a> \ <span class="p">|</span> <span class="k">hi</span> logNoFile1 ctermfg<span class="p">=</span>Blue </span><span id="L-1187"><a name="L-1187"></a> \ <span class="p">|</span> <span class="k">hi</span> logNoFile2 ctermfg<span class="p">=</span>Blue </span><span id="L-1188"><a name="L-1188"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-1189"><a name="L-1189"></a><span class="c">&quot; Templates em LaTeX</span> </span><span id="L-1190"><a name="L-1190"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-1191"><a name="L-1191"></a><span class="c">&quot; Documento para escrever relatórios e textos em geral.</span> </span><span id="L-1192"><a name="L-1192"></a> <span class="k">au</span> <span class="nb">BufNewFile</span><span class="p">,</span><span class="nb">BufRead</span> *.tex cmap TEXD <span class="k">r</span> <span class="p">~</span><span class="sr">/.vim/</span>headers/documento.tex<span class="p">&lt;</span>CR<span class="p">&gt;</span> </span><span id="L-1193"><a name="L-1193"></a><span class="c">&quot; Escrever pequenos resumos de uma página</span> </span><span id="L-1194"><a name="L-1194"></a> <span class="k">au</span> <span class="nb">BufNewFile</span><span class="p">,</span><span class="nb">BufRead</span> *.tex cmap TEXD <span class="k">r</span> <span class="p">~</span><span class="sr">/.vim/</span>headers/resumo.tex<span class="p">&lt;</span>CR<span class="p">&gt;</span> </span><span id="L-1195"><a name="L-1195"></a><span class="c">&quot; Escrever cartas</span> </span><span id="L-1196"><a name="L-1196"></a> <span class="k">au</span> <span class="nb">BufNewFile</span><span class="p">,</span><span class="nb">BufRead</span> *.tex cmap TEXL <span class="k">r</span> <span class="p">~</span><span class="sr">/.vim/</span>headers/carta.tex<span class="p">&lt;</span>CR<span class="p">&gt;</span> </span><span id="L-1197"><a name="L-1197"></a><span class="c">&quot; Apresentação com o Prosper</span> </span><span id="L-1198"><a name="L-1198"></a> <span class="k">au</span> <span class="nb">BufNewFile</span><span class="p">,</span><span class="nb">BufRead</span> *.tex cmap TEXP <span class="k">r</span> <span class="p">~</span><span class="sr">/.vim/</span>headers/prosper.tex<span class="p">&lt;</span>CR<span class="p">&gt;</span> </span><span id="L-1199"><a name="L-1199"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-1200"><a name="L-1200"></a><span class="c">&quot; }}}</span> </span><span id="L-1201"><a name="L-1201"></a> </span><span id="L-1202"><a name="L-1202"></a><span class="c">&quot; Funções, mapeamentos e abreviações para programação em shell script {{{</span> </span><span id="L-1203"><a name="L-1203"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-1204"><a name="L-1204"></a><span class="c">&quot; BashTemp: linha de criação do arquivo temporário com o mktemp</span> </span><span id="L-1205"><a name="L-1205"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-1206"><a name="L-1206"></a><span class="c">&quot; map ,bt IA_TMP=`mktemp /tmp/$(basename $0).XXXXXX`</span> </span><span id="L-1207"><a name="L-1207"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-1208"><a name="L-1208"></a><span class="c">&quot; O arquivo .sh é na verdade um arquivo bash</span> </span><span id="L-1209"><a name="L-1209"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-1210"><a name="L-1210"></a> <span class="k">au</span> <span class="nb">FileType</span> <span class="k">sh</span> <span class="k">let</span> <span class="k">b</span>:is_bash<span class="p">=</span><span class="m">1</span> </span><span id="L-1211"><a name="L-1211"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-1212"><a name="L-1212"></a><span class="c">&quot; Esss arquivos também são tipo scritps</span> </span><span id="L-1213"><a name="L-1213"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-1214"><a name="L-1214"></a> <span class="k">au</span> <span class="nb">BufNewFile</span><span class="p">,</span><span class="nb">BufRead</span> .alias*<span class="p">,</span>.funcoes* <span class="k">set</span> <span class="nb">ft</span><span class="p">=</span><span class="k">sh</span> </span><span id="L-1215"><a name="L-1215"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-1216"><a name="L-1216"></a><span class="c">&quot; Cria um cabeçalho para scripts bash</span> </span><span id="L-1217"><a name="L-1217"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-1218"><a name="L-1218"></a> <span class="k">fun</span><span class="p">!</span> InsertHeadBash<span class="p">()</span> </span><span id="L-1219"><a name="L-1219"></a> normal<span class="p">(</span><span class="m">1</span>G<span class="p">)</span> </span><span id="L-1220"><a name="L-1220"></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-1221"><a name="L-1221"></a> <span class="k">call</span> append<span class="p">(</span><span class="m">1</span><span class="p">,</span> <span class="s2">&quot;# File: &lt;name&gt;&quot;</span><span class="p">)</span> </span><span id="L-1222"><a name="L-1222"></a> <span class="k">call</span> append<span class="p">(</span><span class="m">2</span><span class="p">,</span> <span class="s2">&quot;# Author: J. F. Mitre &lt;http://jfmitre.com&gt;&quot;</span><span class="p">)</span> </span><span id="L-1223"><a name="L-1223"></a> <span class="k">call</span> append<span class="p">(</span><span class="m">3</span><span class="p">,</span> <span class="s2">&quot;# Created: &quot;</span> . strftime<span class="p">(</span><span class="s2">&quot;%c&quot;</span><span class="p">))</span> </span><span id="L-1224"><a name="L-1224"></a> <span class="k">call</span> append<span class="p">(</span><span class="m">4</span><span class="p">,</span> <span class="s2">&quot;# Last Update: &quot;</span> . strftime<span class="p">(</span><span class="s2">&quot;%c&quot;</span><span class="p">))</span> </span><span id="L-1225"><a name="L-1225"></a> <span class="k">call</span> append<span class="p">(</span><span class="m">5</span><span class="p">,</span> <span class="s2">&quot;# Notes:&quot;</span><span class="p">)</span> </span><span id="L-1226"><a name="L-1226"></a> normal<span class="p">(</span>$<span class="p">)</span> </span><span id="L-1227"><a name="L-1227"></a> <span class="k">endfun</span> </span><span id="L-1228"><a name="L-1228"></a> cmap <span class="p">,</span><span class="k">sh</span> <span class="k">call</span> InsertHeadBash<span class="p">()&lt;</span>CR<span class="p">&gt;</span>A </span><span id="L-1229"><a name="L-1229"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-1230"><a name="L-1230"></a><span class="c">&quot; Se for um arquivo .sh e ele estiver vazio, insira o cabeçalho</span> </span><span id="L-1231"><a name="L-1231"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-1232"><a name="L-1232"></a><span class="c">&quot; au BufNewFile,BufRead *.sh if getline(1) == &quot;&quot; | normal ,sh</span> </span><span id="L-1233"><a name="L-1233"></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> <span class="k">call</span> InsertHeadBash<span class="p">()</span> </span><span id="L-1234"><a name="L-1234"></a><span class="c">&quot; }}} </span> </span><span id="L-1235"><a name="L-1235"></a> </span><span id="L-1236"><a name="L-1236"></a><span class="c">&quot; Funções, mapeamentos e abreviações para programação em Python {{{</span> </span><span id="L-1237"><a name="L-1237"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-1238"><a name="L-1238"></a><span class="c">&quot; Cria uma cabeçalho para programas em Python</span> </span><span id="L-1239"><a name="L-1239"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-1240"><a name="L-1240"></a> <span class="k">fun</span><span class="p">!</span> BufNewFile_PY<span class="p">()</span> </span><span id="L-1241"><a name="L-1241"></a> normal<span class="p">(</span><span class="m">1</span>G<span class="p">)</span> </span><span id="L-1242"><a name="L-1242"></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-1243"><a name="L-1243"></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-1244"><a name="L-1244"></a> <span class="k">call</span> append<span class="p">(</span><span class="m">2</span><span class="p">,</span> <span class="s2">&quot;# Author: J. F. Mitre &lt;http://jfmitre.com&gt;&quot;</span><span class="p">)</span> </span><span id="L-1245"><a name="L-1245"></a> <span class="k">call</span> append<span class="p">(</span><span class="m">3</span><span class="p">,</span> <span class="s2">&quot;# Created: &quot;</span> . strftime<span class="p">(</span><span class="s2">&quot;%c&quot;</span><span class="p">))</span> </span><span id="L-1246"><a name="L-1246"></a> <span class="k">call</span> append<span class="p">(</span><span class="m">4</span><span class="p">,</span> <span class="s2">&quot;# Last Update: &quot;</span> . strftime<span class="p">(</span><span class="s2">&quot;%c&quot;</span><span class="p">))</span> </span><span id="L-1247"><a name="L-1247"></a> <span class="k">call</span> append<span class="p">(</span><span class="m">5</span><span class="p">,</span> <span class="s2">&quot;# File: &lt;name&gt;&quot;</span><span class="p">)</span> </span><span id="L-1248"><a name="L-1248"></a> <span class="k">call</span> append<span class="p">(</span><span class="m">6</span><span class="p">,</span> <span class="s2">&quot;# Notes: &quot;</span><span class="p">)</span> </span><span id="L-1249"><a name="L-1249"></a> normal gg </span><span id="L-1250"><a name="L-1250"></a> <span class="k">endfun</span> </span><span id="L-1251"><a name="L-1251"></a> cmap <span class="p">,</span><span class="k">py</span> <span class="k">call</span> BufNewFile_PY<span class="p">()&lt;</span>CR<span class="p">&gt;</span>A </span><span id="L-1252"><a name="L-1252"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-1253"><a name="L-1253"></a><span class="c">&quot; Arquivos Python devem ter tabulação</span> </span><span id="L-1254"><a name="L-1254"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-1255"><a name="L-1255"></a> <span class="k">au</span> <span class="nb">FileType</span> python <span class="k">set</span> <span class="nb">noexpandtab</span> </span><span id="L-1256"><a name="L-1256"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-1257"><a name="L-1257"></a><span class="c">&quot; Se for um arquivo .py e ele estiver vazio, insira o cabeçalho</span> </span><span id="L-1258"><a name="L-1258"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-1259"><a name="L-1259"></a> <span class="k">au</span> <span class="nb">BufNewFile</span><span class="p">,</span><span class="nb">BufRead</span> *.<span class="k">py</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> <span class="k">call</span> BufNewFile_PY<span class="p">()</span> </span><span id="L-1260"><a name="L-1260"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-1261"><a name="L-1261"></a><span class="c">&quot; Indentação inteligente para python</span> </span><span id="L-1262"><a name="L-1262"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-1263"><a name="L-1263"></a> <span class="k">au</span><span class="p">!</span> <span class="nb">FileType</span> python <span class="k">set</span> <span class="nb">smartindent</span> </span><span id="L-1264"><a name="L-1264"></a> \ <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-1265"><a name="L-1265"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-1266"><a name="L-1266"></a><span class="c">&quot; Pydoc, plugin que integra o Pydoc com o vim </span> </span><span id="L-1267"><a name="L-1267"></a><span class="c">&quot; URL: http://www.vim.org/scripts/script.php?script_id=910</span> </span><span id="L-1268"><a name="L-1268"></a><span class="c">&quot; Uso: no modo normal, digite \pw com o cursor sobre o verbete</span> </span><span id="L-1269"><a name="L-1269"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-1270"><a name="L-1270"></a><span class="c">&quot; Para desabilitar o highlight na busca por ajuda</span> </span><span id="L-1271"><a name="L-1271"></a><span class="c">&quot; let g:pydoc_highlight = 0</span> </span><span id="L-1272"><a name="L-1272"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-1273"><a name="L-1273"></a><span class="c">&quot; }}}</span> </span><span id="L-1274"><a name="L-1274"></a> </span><span id="L-1275"><a name="L-1275"></a><span class="c">&quot; Funções, mapeamentos e abreviações para programação para web {{{</span> </span><span id="L-1276"><a name="L-1276"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-1277"><a name="L-1277"></a><span class="c">&quot; Relaciona o caractere &lt; com o caractere &gt; em arquivo HTML</span> </span><span id="L-1278"><a name="L-1278"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-1279"><a name="L-1279"></a> <span class="k">au</span> <span class="nb">FileType</span> html <span class="k">set</span> <span class="nb">matchpairs</span><span class="p">+=&lt;</span>:<span class="p">&gt;</span> </span><span id="L-1280"><a name="L-1280"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-1281"><a name="L-1281"></a><span class="c">&quot; Auto complete &lt; com &gt; em arquivo HTML</span> </span><span id="L-1282"><a name="L-1282"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-1283"><a name="L-1283"></a> <span class="k">au</span> <span class="nb">FileType</span> html <span class="nb">inoremap</span> <span class="p">&lt;</span> <span class="p">&lt;&gt;&lt;</span>esc<span class="p">&gt;</span><span class="k">i</span> </span><span id="L-1284"><a name="L-1284"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-1285"><a name="L-1285"></a><span class="c">&quot; Dicionário para snippets de arquivo HTML</span> </span><span id="L-1286"><a name="L-1286"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-1287"><a name="L-1287"></a> <span class="k">au</span> <span class="nb">FileType</span> html <span class="k">set</span> <span class="nb">dictionary</span><span class="p">=~</span><span class="sr">/.vim/</span><span class="nb">dict</span>/html.dic </span><span id="L-1288"><a name="L-1288"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-1289"><a name="L-1289"></a><span class="c">&quot; Convertendo arquivo do vim para página em HTML (sintaxe colorida)</span> </span><span id="L-1290"><a name="L-1290"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-1291"><a name="L-1291"></a> map <span class="p">&lt;</span>leader<span class="p">&gt;</span><span class="m">2</span>html <span class="p">&lt;</span>ESC<span class="p">&gt;</span>:<span class="k">so</span> $VIMRUNTIME<span class="sr">/syntax/</span><span class="m">2</span>html.<span class="k">vim</span><span class="p">&lt;</span>CR<span class="p">&gt;</span> </span><span id="L-1292"><a name="L-1292"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-1293"><a name="L-1293"></a><span class="c">&quot; }}}</span> </span><span id="L-1294"><a name="L-1294"></a> </span><span id="L-1295"><a name="L-1295"></a><span class="c">&quot; Funções, mapeamentos e abreviações programação em FORTRAN {{{</span> </span><span id="L-1296"><a name="L-1296"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-1297"><a name="L-1297"></a><span class="c">&quot; Leia a parte relativa a FORTRAN em: http://www.vim.org/htmldoc/syntax.html</span> </span><span id="L-1298"><a name="L-1298"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-1299"><a name="L-1299"></a><span class="c">&quot; Define qual é a extensão do arquivo</span> </span><span id="L-1300"><a name="L-1300"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-1301"><a name="L-1301"></a> <span class="k">let</span> s:extfname <span class="p">=</span> expand<span class="p">(</span><span class="s2">&quot;%:e&quot;</span><span class="p">)</span> </span><span id="L-1302"><a name="L-1302"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-1303"><a name="L-1303"></a><span class="c">&quot; Dependendo da extensão, é FORTRAN 77 ou FORTRAN 90/95</span> </span><span id="L-1304"><a name="L-1304"></a><span class="c">&quot; Para cada caso é definido formato fixo ou formato livre do código</span> </span><span id="L-1305"><a name="L-1305"></a><span class="c">&quot; Considerar ou não considerar a tabulação</span> </span><span id="L-1306"><a name="L-1306"></a><span class="c">&quot; E para o caso de formato fixo, definir o exato tamanho permitido</span> </span><span id="L-1307"><a name="L-1307"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-1308"><a name="L-1308"></a> <span class="k">if</span> s:extfname <span class="p">==</span>? <span class="s2">&quot;f90&quot;</span> </span><span id="L-1309"><a name="L-1309"></a> <span class="k">let</span> fortran_free_source<span class="p">=</span><span class="m">1</span> </span><span id="L-1310"><a name="L-1310"></a> unlet<span class="p">!</span> fortran_fixed_source </span><span id="L-1311"><a name="L-1311"></a> <span class="k">let</span> fortran_have_tabs<span class="p">=</span><span class="m">1</span> </span><span id="L-1312"><a name="L-1312"></a> <span class="k">elseif</span> s:extfname <span class="p">==</span>? <span class="s2">&quot;f95&quot;</span> </span><span id="L-1313"><a name="L-1313"></a> <span class="k">let</span> fortran_free_source<span class="p">=</span><span class="m">1</span> </span><span id="L-1314"><a name="L-1314"></a> unlet<span class="p">!</span> fortran_fixed_source </span><span id="L-1315"><a name="L-1315"></a> <span class="k">let</span> fortran_have_tabs<span class="p">=</span><span class="m">1</span> </span><span id="L-1316"><a name="L-1316"></a> <span class="k">elseif</span> s:extfname <span class="p">==</span>? <span class="s2">&quot;f&quot;</span> </span><span id="L-1317"><a name="L-1317"></a> <span class="k">let</span> fortran_fixed_source<span class="p">=</span><span class="m">1</span> </span><span id="L-1318"><a name="L-1318"></a> unlet<span class="p">!</span> fortran_free_source </span><span id="L-1319"><a name="L-1319"></a> <span class="k">set</span> <span class="nb">tw</span><span class="p">=</span><span class="m">72</span> </span><span id="L-1320"><a name="L-1320"></a> <span class="k">endif</span> </span><span id="L-1321"><a name="L-1321"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-1322"><a name="L-1322"></a><span class="c">&quot; Mais precisão na definição de sintaxe do código</span> </span><span id="L-1323"><a name="L-1323"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-1324"><a name="L-1324"></a> <span class="k">let</span> fortran_more_precise<span class="p">=</span><span class="m">1</span> </span><span id="L-1325"><a name="L-1325"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-1326"><a name="L-1326"></a><span class="c">&quot; Usar ou não usar folders no código</span> </span><span id="L-1327"><a name="L-1327"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-1328"><a name="L-1328"></a><span class="c">&quot; let fortran_fold=1</span> </span><span id="L-1329"><a name="L-1329"></a><span class="c">&quot; let fortran_fold_conditionals=1</span> </span><span id="L-1330"><a name="L-1330"></a><span class="c">&quot; let fortran_fold_multilinecomments=1</span> </span><span id="L-1331"><a name="L-1331"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-1332"><a name="L-1332"></a><span class="c">&quot; }}}</span> </span><span id="L-1333"><a name="L-1333"></a> </span><span id="L-1334"><a name="L-1334"></a><span class="c">&quot; Referências {{{</span> </span><span id="L-1335"><a name="L-1335"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-1336"><a name="L-1336"></a><span class="c">&quot;</span> </span><span id="L-1337"><a name="L-1337"></a><span class="c">&quot; * vimbook - tirei muitas dicas dali, mais do que isso, aprendi coisas</span> </span><span id="L-1338"><a name="L-1338"></a><span class="c">&quot; para adaptar e escrever outras. Aliás, essa foi a força</span> </span><span id="L-1339"><a name="L-1339"></a><span class="c">&quot; motriz para a iniciativa dessa configuração.</span> </span><span id="L-1340"><a name="L-1340"></a><span class="c">&quot; URL: http://vivaotux.blogspot.com/2009/01/nosso-livro-sobre-o-vim.html</span> </span><span id="L-1341"><a name="L-1341"></a><span class="c">&quot;</span> </span><span id="L-1342"><a name="L-1342"></a><span class="c">&quot; * aurelio.net - referência clássica, mesmo que eu não tivesse visitado a</span> </span><span id="L-1343"><a name="L-1343"></a><span class="c">&quot; página do camarada (e eu visitei), eu teria absorvido</span> </span><span id="L-1344"><a name="L-1344"></a><span class="c">&quot; através de terceiros.</span> </span><span id="L-1345"><a name="L-1345"></a><span class="c">&quot; URL: http://aurelio.net/</span> </span><span id="L-1346"><a name="L-1346"></a><span class="c">&quot;</span> </span><span id="L-1347"><a name="L-1347"></a><span class="c">&quot; * vivaotux - muitas dicas sobre vim (plugins e outras coisas).</span> </span><span id="L-1348"><a name="L-1348"></a><span class="c">&quot; URL: http://vivaotux.blogspot.com/</span> </span><span id="L-1349"><a name="L-1349"></a><span class="c">&quot;</span> </span><span id="L-1350"><a name="L-1350"></a><span class="c">&quot; * Vim (Página oficial) - a documentação existente nesse site é fantástica.</span> </span><span id="L-1351"><a name="L-1351"></a><span class="c">&quot; URL: http://www.vim.org/</span> </span><span id="L-1352"><a name="L-1352"></a><span class="c">&quot;</span> </span><span id="L-1353"><a name="L-1353"></a><span class="c">&quot; * Alguns arquivos vimrc:</span> </span><span id="L-1354"><a name="L-1354"></a><span class="c">&quot;</span> </span><span id="L-1355"><a name="L-1355"></a><span class="c">&quot; * http://aurelio.net/vim/vimrc-ivan.txt</span> </span><span id="L-1356"><a name="L-1356"></a><span class="c">&quot; * http://aurelio.net/doc/vim/vimrc-voyeg3r.txt</span> </span><span id="L-1357"><a name="L-1357"></a><span class="c">&quot; * http://dotfiles.org/~voyeg3r/.vimrc</span> </span><span id="L-1358"><a name="L-1358"></a><span class="c">&quot; * http://aurelio.net/doc/dotfiles/vimrc.txt</span> </span><span id="L-1359"><a name="L-1359"></a><span class="c">&quot; * http://www.stripey.com/vim/vimrc.html</span> </span><span id="L-1360"><a name="L-1360"></a><span class="c">&quot; * http://www.8t8.us/configs/vimrc.txt</span> </span><span id="L-1361"><a name="L-1361"></a><span class="c">&quot; * http://snipt.net/voyeg3r/my-vimrc</span> </span><span id="L-1362"><a name="L-1362"></a><span class="c">&quot; ----------------------------------------------------------------------------</span> </span><span id="L-1363"><a name="L-1363"></a><span class="c">&quot; }}}</span> </span></pre></div> </td></tr></table>
vim, vimrc