Now the change should be applied
This commit is contained in:
591
vimrc
591
vimrc
@@ -1,370 +1,221 @@
|
|||||||
0000000: 7365 7420 6869 7374 6f72 793d 3730 300a set history=700.
|
set history=700
|
||||||
0000010: 6669 6c65 7479 7065 2070 6c75 6769 6e20 filetype plugin
|
filetype plugin on
|
||||||
0000020: 6f6e 0a66 696c 6574 7970 6520 696e 6465 on.filetype inde
|
filetype indent on
|
||||||
0000030: 6e74 206f 6e0a 7365 7420 6175 746f 7265 nt on.set autore
|
set autoread
|
||||||
0000040: 6164 0a6c 6574 206d 6170 6c65 6164 6572 ad.let mapleader
|
let mapleader = ","
|
||||||
0000050: 203d 2022 2c22 0a6c 6574 2067 3a6d 6170 = ",".let g:map
|
let g:mapleader = ","
|
||||||
0000060: 6c65 6164 6572 203d 2022 2c22 0a6e 6d61 leader = ",".nma
|
nmap <leader>w :w!<cr>
|
||||||
0000070: 7020 3c6c 6561 6465 723e 7720 3a77 213c p <leader>w :w!<
|
set so=7
|
||||||
0000080: 6372 3e0a 7365 7420 736f 3d37 0a73 6574 cr>.set so=7.set
|
set wildmenu
|
||||||
0000090: 2077 696c 646d 656e 750a 7365 7420 7769 wildmenu.set wi
|
set wildignore=*.o,*~,*.pyc
|
||||||
00000a0: 6c64 6967 6e6f 7265 3d2a 2e6f 2c2a 7e2c ldignore=*.o,*~,
|
set ruler
|
||||||
00000b0: 2a2e 7079 630a 7365 7420 7275 6c65 720a *.pyc.set ruler.
|
set cmdheight=2
|
||||||
00000c0: 7365 7420 636d 6468 6569 6768 743d 320a set cmdheight=2.
|
set hid
|
||||||
00000d0: 7365 7420 6869 640a 7365 7420 6261 636b set hid.set back
|
set backspace=eol,start,indent
|
||||||
00000e0: 7370 6163 653d 656f 6c2c 7374 6172 742c space=eol,start,
|
set whichwrap+=<,>,h,l
|
||||||
00000f0: 696e 6465 6e74 0a73 6574 2077 6869 6368 indent.set which
|
set ignorecase
|
||||||
0000100: 7772 6170 2b3d 3c2c 3e2c 682c 6c0a 7365 wrap+=<,>,h,l.se
|
set smartcase
|
||||||
0000110: 7420 6967 6e6f 7265 6361 7365 0a73 6574 t ignorecase.set
|
set hlsearch
|
||||||
0000120: 2073 6d61 7274 6361 7365 0a73 6574 2068 smartcase.set h
|
set incsearch
|
||||||
0000130: 6c73 6561 7263 680a 7365 7420 696e 6373 lsearch.set incs
|
set lazyredraw
|
||||||
0000140: 6561 7263 680a 7365 7420 6c61 7a79 7265 earch.set lazyre
|
set magic
|
||||||
0000150: 6472 6177 0a73 6574 206d 6167 6963 0a73 draw.set magic.s
|
set showmatch
|
||||||
0000160: 6574 2073 686f 776d 6174 6368 0a73 6574 et showmatch.set
|
set mat=2
|
||||||
0000170: 206d 6174 3d32 0a73 6574 206e 6f65 7272 mat=2.set noerr
|
set noerrorbells
|
||||||
0000180: 6f72 6265 6c6c 730a 7365 7420 6e6f 7669 orbells.set novi
|
set novisualbell
|
||||||
0000190: 7375 616c 6265 6c6c 0a73 6574 2074 5f76 sualbell.set t_v
|
set t_vb=
|
||||||
00001a0: 623d 0a73 6574 2074 6d3d 3530 300a 7379 b=.set tm=500.sy
|
set tm=500
|
||||||
00001b0: 6e74 6178 2065 6e61 626c 650a 636f 6c6f ntax enable.colo
|
syntax enable
|
||||||
00001c0: 7273 6368 656d 6520 6465 7365 7274 0a73 rscheme desert.s
|
colorscheme desert
|
||||||
00001d0: 6574 2062 6163 6b67 726f 756e 643d 6461 et background=da
|
set background=dark
|
||||||
00001e0: 726b 0a69 6620 6861 7328 2267 7569 5f72 rk.if has("gui_r
|
if has("gui_running")
|
||||||
00001f0: 756e 6e69 6e67 2229 0a20 2020 2073 6574 unning"). set
|
set guioptions-=T
|
||||||
0000200: 2067 7569 6f70 7469 6f6e 732d 3d54 0a20 guioptions-=T.
|
set guioptions+=e
|
||||||
0000210: 2020 2073 6574 2067 7569 6f70 7469 6f6e set guioption
|
set t_Co=256
|
||||||
0000220: 732b 3d65 0a20 2020 2073 6574 2074 5f43 s+=e. set t_C
|
set guitablabel=%M\ %t
|
||||||
0000230: 6f3d 3235 360a 2020 2020 7365 7420 6775 o=256. set gu
|
endif
|
||||||
0000240: 6974 6162 6c61 6265 6c3d 254d 5c20 2574 itablabel=%M\ %t
|
set encoding=utf8
|
||||||
0000250: 0a65 6e64 6966 0a73 6574 2065 6e63 6f64 .endif.set encod
|
set ffs=unix,dos,mac
|
||||||
0000260: 696e 673d 7574 6638 0a73 6574 2066 6673 ing=utf8.set ffs
|
set nobackup
|
||||||
0000270: 3d75 6e69 782c 646f 732c 6d61 630a 7365 =unix,dos,mac.se
|
set nowb
|
||||||
0000280: 7420 6e6f 6261 636b 7570 0a73 6574 206e t nobackup.set n
|
set noswapfile
|
||||||
0000290: 6f77 620a 7365 7420 6e6f 7377 6170 6669 owb.set noswapfi
|
set expandtab
|
||||||
00002a0: 6c65 0a73 6574 2065 7870 616e 6474 6162 le.set expandtab
|
set smarttab
|
||||||
00002b0: 0a73 6574 2073 6d61 7274 7461 620a 7365 .set smarttab.se
|
set shiftwidth=4
|
||||||
00002c0: 7420 7368 6966 7477 6964 7468 3d34 0a73 t shiftwidth=4.s
|
set tabstop=4
|
||||||
00002d0: 6574 2074 6162 7374 6f70 3d34 0a73 6574 et tabstop=4.set
|
set lbr
|
||||||
00002e0: 206c 6272 0a73 6574 2074 773d 3530 300a lbr.set tw=500.
|
set tw=500
|
||||||
00002f0: 7365 7420 6169 2022 4175 746f 2069 6e64 set ai "Auto ind
|
set ai "Auto indent
|
||||||
0000300: 656e 740a 7365 7420 7369 2022 536d 6172 ent.set si "Smar
|
set si "Smart indent
|
||||||
0000310: 7420 696e 6465 6e74 0a73 6574 2077 7261 t indent.set wra
|
set wrap "Wrap lines
|
||||||
0000320: 7020 2257 7261 7020 6c69 6e65 730a 766e p "Wrap lines.vn
|
cnoreabbrev hex %!xxd
|
||||||
0000330: 6f72 656d 6170 203c 7369 6c65 6e74 3e20 oremap <silent>
|
vnoremap <silent> * :call VisualSelection('f')<CR>
|
||||||
0000340: 2a20 3a63 616c 6c20 5669 7375 616c 5365 * :call VisualSe
|
vnoremap <silent> # :call VisualSelection('b')<CR>
|
||||||
0000350: 6c65 6374 696f 6e28 2766 2729 3c43 523e lection('f')<CR>
|
map j gj
|
||||||
0000360: 0a76 6e6f 7265 6d61 7020 3c73 696c 656e .vnoremap <silen
|
map k gk
|
||||||
0000370: 743e 2023 203a 6361 6c6c 2056 6973 7561 t> # :call Visua
|
map <space> /
|
||||||
0000380: 6c53 656c 6563 7469 6f6e 2827 6227 293c lSelection('b')<
|
map <c-space> ?
|
||||||
0000390: 4352 3e0a 6d61 7020 6a20 676a 0a6d 6170 CR>.map j gj.map
|
map <silent> <leader><cr> :noh<cr>
|
||||||
00003a0: 206b 2067 6b0a 6d61 7020 3c73 7061 6365 k gk.map <space
|
map <C-j> <C-W>j
|
||||||
00003b0: 3e20 2f0a 6d61 7020 3c63 2d73 7061 6365 > /.map <c-space
|
map <C-k> <C-W>k
|
||||||
00003c0: 3e20 3f0a 6d61 7020 3c73 696c 656e 743e > ?.map <silent>
|
map <C-h> <C-W>h
|
||||||
00003d0: 203c 6c65 6164 6572 3e3c 6372 3e20 3a6e <leader><cr> :n
|
map <C-l> <C-W>l
|
||||||
00003e0: 6f68 3c63 723e 0a6d 6170 203c 432d 6a3e oh<cr>.map <C-j>
|
map <leader>bd :Bclose<cr>
|
||||||
00003f0: 203c 432d 573e 6a0a 6d61 7020 3c43 2d6b <C-W>j.map <C-k
|
map <leader>ba :1,1000 bd!<cr>
|
||||||
0000400: 3e20 3c43 2d57 3e6b 0a6d 6170 203c 432d > <C-W>k.map <C-
|
map <leader>tn :tabnew<cr>
|
||||||
0000410: 683e 203c 432d 573e 680a 6d61 7020 3c43 h> <C-W>h.map <C
|
map <leader>to :tabonly<cr>
|
||||||
0000420: 2d6c 3e20 3c43 2d57 3e6c 0a6d 6170 203c -l> <C-W>l.map <
|
map <leader>tc :tabclose<cr>
|
||||||
0000430: 6c65 6164 6572 3e62 6420 3a42 636c 6f73 leader>bd :Bclos
|
map <leader>tm :tabmove
|
||||||
0000440: 653c 6372 3e0a 6d61 7020 3c6c 6561 6465 e<cr>.map <leade
|
map <leader>te :tabedit <c-r>=expand("%:p:h")<cr>/
|
||||||
0000450: 723e 6261 203a 312c 3130 3030 2062 6421 r>ba :1,1000 bd!
|
map <leader>cd :cd %:p:h<cr>:pwd<cr>
|
||||||
0000460: 3c63 723e 0a6d 6170 203c 6c65 6164 6572 <cr>.map <leader
|
try
|
||||||
0000470: 3e74 6e20 3a74 6162 6e65 773c 6372 3e0a >tn :tabnew<cr>.
|
set switchbuf=useopen,usetab,newtab
|
||||||
0000480: 6d61 7020 3c6c 6561 6465 723e 746f 203a map <leader>to :
|
set stal=2
|
||||||
0000490: 7461 626f 6e6c 793c 6372 3e0a 6d61 7020 tabonly<cr>.map
|
catch
|
||||||
00004a0: 3c6c 6561 6465 723e 7463 203a 7461 6263 <leader>tc :tabc
|
endtry
|
||||||
00004b0: 6c6f 7365 3c63 723e 0a6d 6170 203c 6c65 lose<cr>.map <le
|
autocmd BufReadPost *
|
||||||
00004c0: 6164 6572 3e74 6d20 3a74 6162 6d6f 7665 ader>tm :tabmove
|
\ if line("'\"") > 0 && line("'\"") <= line("$") |
|
||||||
00004d0: 0a6d 6170 203c 6c65 6164 6572 3e74 6520 .map <leader>te
|
\ exe "normal! g`\"" |
|
||||||
00004e0: 3a74 6162 6564 6974 203c 632d 723e 3d65 :tabedit <c-r>=e
|
\ endif
|
||||||
00004f0: 7870 616e 6428 2225 3a70 3a68 2229 3c63 xpand("%:p:h")<c
|
set viminfo^=%
|
||||||
0000500: 723e 2f0a 6d61 7020 3c6c 6561 6465 723e r>/.map <leader>
|
set laststatus=2
|
||||||
0000510: 6364 203a 6364 2025 3a70 3a68 3c63 723e cd :cd %:p:h<cr>
|
set statusline=\ %{HasPaste()}%F%m%r%h\ %w\ \ CWD:\ %r%{getcwd()}%h\ \ \ Line:\ %l/%L\ \ Column:\ %c
|
||||||
0000520: 3a70 7764 3c63 723e 0a74 7279 0a20 2073 :pwd<cr>.try. s
|
map 0 ^
|
||||||
0000530: 6574 2073 7769 7463 6862 7566 3d75 7365 et switchbuf=use
|
nmap <M-j> mz:m+<cr>`z
|
||||||
0000540: 6f70 656e 2c75 7365 7461 622c 6e65 7774 open,usetab,newt
|
nmap <M-k> mz:m-2<cr>`z
|
||||||
0000550: 6162 0a20 2073 6574 2073 7461 6c3d 320a ab. set stal=2.
|
vmap <M-j> :m'>+<cr>`<my`>mzgv`yo`z
|
||||||
0000560: 6361 7463 680a 656e 6474 7279 0a61 7574 catch.endtry.aut
|
vmap <M-k> :m'<-2<cr>`>my`<mzgv`yo`z
|
||||||
0000570: 6f63 6d64 2042 7566 5265 6164 506f 7374 ocmd BufReadPost
|
if has("mac") || has("macunix")
|
||||||
0000580: 202a 0a20 2020 2020 5c20 6966 206c 696e *. \ if lin
|
nmap <D-j> <M-j>
|
||||||
0000590: 6528 2227 5c22 2229 203e 2030 2026 2620 e("'\"") > 0 &&
|
nmap <D-k> <M-k>
|
||||||
00005a0: 6c69 6e65 2822 275c 2222 2920 3c3d 206c line("'\"") <= l
|
vmap <D-j> <M-j>
|
||||||
00005b0: 696e 6528 2224 2229 207c 0a20 2020 2020 ine("$") |.
|
vmap <D-k> <M-k>
|
||||||
00005c0: 5c20 2020 6578 6520 226e 6f72 6d61 6c21 \ exe "normal!
|
endif
|
||||||
00005d0: 2067 605c 2222 207c 0a20 2020 2020 5c20 g`\"" |. \
|
func! DeleteTrailingWS()
|
||||||
00005e0: 656e 6469 660a 7365 7420 7669 6d69 6e66 endif.set viminf
|
exe "normal mz"
|
||||||
00005f0: 6f5e 3d25 0a73 6574 206c 6173 7473 7461 o^=%.set laststa
|
%s/\s\+$//ge
|
||||||
0000600: 7475 733d 320a 7365 7420 7374 6174 7573 tus=2.set status
|
exe "normal `z"
|
||||||
0000610: 6c69 6e65 3d5c 2025 7b48 6173 5061 7374 line=\ %{HasPast
|
endfunc
|
||||||
0000620: 6528 297d 2546 256d 2572 2568 5c20 2577 e()}%F%m%r%h\ %w
|
autocmd BufWrite *.py :call DeleteTrailingWS()
|
||||||
0000630: 5c20 5c20 4357 443a 5c20 2572 257b 6765 \ \ CWD:\ %r%{ge
|
autocmd BufWrite *.coffee :call DeleteTrailingWS()
|
||||||
0000640: 7463 7764 2829 7d25 685c 205c 205c 204c tcwd()}%h\ \ \ L
|
vnoremap <silent> gv :call VisualSelection('gv')<CR>
|
||||||
0000650: 696e 653a 5c20 256c 2f25 4c5c 205c 2043 ine:\ %l/%L\ \ C
|
map <leader>g :vimgrep // **/*.<left><left><left><left><left><left><left>
|
||||||
0000660: 6f6c 756d 6e3a 5c20 2563 0a6d 6170 2030 olumn:\ %c.map 0
|
map <leader><space> :vimgrep // <C-R>%<C-A><right><right><right><right><right><right><right><right><right>
|
||||||
0000670: 205e 0a6e 6d61 7020 3c4d 2d6a 3e20 6d7a ^.nmap <M-j> mz
|
vnoremap <silent> <leader>r :call VisualSelection('replace')<CR>
|
||||||
0000680: 3a6d 2b3c 6372 3e60 7a0a 6e6d 6170 203c :m+<cr>`z.nmap <
|
map <leader>cc :botright cope<cr>
|
||||||
0000690: 4d2d 6b3e 206d 7a3a 6d2d 323c 6372 3e60 M-k> mz:m-2<cr>`
|
map <leader>co ggVGy:tabnew<cr>:set syntax=qf<cr>pgg
|
||||||
00006a0: 7a0a 766d 6170 203c 4d2d 6a3e 203a 6d27 z.vmap <M-j> :m'
|
map <leader>n :cn<cr>
|
||||||
00006b0: 3e2b 3c63 723e 603c 6d79 603e 6d7a 6776 >+<cr>`<my`>mzgv
|
map <leader>p :cp<cr>
|
||||||
00006c0: 6079 6f60 7a0a 766d 6170 203c 4d2d 6b3e `yo`z.vmap <M-k>
|
map <leader>ss :setlocal spell!<cr>
|
||||||
00006d0: 203a 6d27 3c2d 323c 6372 3e60 3e6d 7960 :m'<-2<cr>`>my`
|
map <leader>sn ]s
|
||||||
00006e0: 3c6d 7a67 7660 796f 607a 0a69 6620 6861 <mzgv`yo`z.if ha
|
map <leader>sp [s
|
||||||
00006f0: 7328 226d 6163 2229 207c 7c20 6861 7328 s("mac") || has(
|
map <leader>sa zg
|
||||||
0000700: 226d 6163 756e 6978 2229 0a20 206e 6d61 "macunix"). nma
|
map <leader>s? z=
|
||||||
0000710: 7020 3c44 2d6a 3e20 3c4d 2d6a 3e0a 2020 p <D-j> <M-j>.
|
noremap <Leader>m mmHmt:%s/<C-V><cr>//ge<cr>'tzt'm
|
||||||
0000720: 6e6d 6170 203c 442d 6b3e 203c 4d2d 6b3e nmap <D-k> <M-k>
|
map <leader>q :e ~/buffer<cr>
|
||||||
0000730: 0a20 2076 6d61 7020 3c44 2d6a 3e20 3c4d . vmap <D-j> <M
|
map <leader>pp :setlocal paste!<cr>
|
||||||
0000740: 2d6a 3e0a 2020 766d 6170 203c 442d 6b3e -j>. vmap <D-k>
|
function! CmdLine(str)
|
||||||
0000750: 203c 4d2d 6b3e 0a65 6e64 6966 0a66 756e <M-k>.endif.fun
|
exe "menu Foo.Bar :" . a:str
|
||||||
0000760: 6321 2044 656c 6574 6554 7261 696c 696e c! DeleteTrailin
|
emenu Foo.Bar
|
||||||
0000770: 6757 5328 290a 2020 6578 6520 226e 6f72 gWS(). exe "nor
|
unmenu Foo
|
||||||
0000780: 6d61 6c20 6d7a 220a 2020 2573 2f5c 735c mal mz". %s/\s\
|
endfunction
|
||||||
0000790: 2b24 2f2f 6765 0a20 2065 7865 2022 6e6f +$//ge. exe "no
|
function! VisualSelection(direction) range
|
||||||
00007a0: 726d 616c 2060 7a22 0a65 6e64 6675 6e63 rmal `z".endfunc
|
let l:saved_reg = @"
|
||||||
00007b0: 0a61 7574 6f63 6d64 2042 7566 5772 6974 .autocmd BufWrit
|
execute "normal! vgvy"
|
||||||
00007c0: 6520 2a2e 7079 203a 6361 6c6c 2044 656c e *.py :call Del
|
|
||||||
00007d0: 6574 6554 7261 696c 696e 6757 5328 290a eteTrailingWS().
|
let l:pattern = escape(@", '\\/.*$^~[]')
|
||||||
00007e0: 6175 746f 636d 6420 4275 6657 7269 7465 autocmd BufWrite
|
let l:pattern = substitute(l:pattern, "\n$", "", "")
|
||||||
00007f0: 202a 2e63 6f66 6665 6520 3a63 616c 6c20 *.coffee :call
|
|
||||||
0000800: 4465 6c65 7465 5472 6169 6c69 6e67 5753 DeleteTrailingWS
|
if a:direction == 'b'
|
||||||
0000810: 2829 0a76 6e6f 7265 6d61 7020 3c73 696c ().vnoremap <sil
|
execute "normal ?" . l:pattern . "^M"
|
||||||
0000820: 656e 743e 2067 7620 3a63 616c 6c20 5669 ent> gv :call Vi
|
elseif a:direction == 'gv'
|
||||||
0000830: 7375 616c 5365 6c65 6374 696f 6e28 2767 sualSelection('g
|
call CmdLine("vimgrep " . '/'. l:pattern . '/' . ' **/*.')
|
||||||
0000840: 7627 293c 4352 3e0a 636e 6f72 6561 6262 v')<CR>.cnoreabb
|
elseif a:direction == 'replace'
|
||||||
0000850: 7265 7620 6865 7820 2521 7878 640a 6d61 rev hex %!xxd.ma
|
call CmdLine("%s" . '/'. l:pattern . '/')
|
||||||
0000860: 7020 3c6c 6561 6465 723e 6720 3a76 696d p <leader>g :vim
|
elseif a:direction == 'f'
|
||||||
0000870: 6772 6570 202f 2f20 2a2a 2f2a 2e3c 6c65 grep // **/*.<le
|
execute "normal /" . l:pattern . "^M"
|
||||||
0000880: 6674 3e3c 6c65 6674 3e3c 6c65 6674 3e3c ft><left><left><
|
endif
|
||||||
0000890: 6c65 6674 3e3c 6c65 6674 3e3c 6c65 6674 left><left><left
|
|
||||||
00008a0: 3e3c 6c65 6674 3e0a 6d61 7020 3c6c 6561 ><left>.map <lea
|
let @/ = l:pattern
|
||||||
00008b0: 6465 723e 3c73 7061 6365 3e20 3a76 696d der><space> :vim
|
let @" = l:saved_reg
|
||||||
00008c0: 6772 6570 202f 2f20 3c43 2d52 3e25 3c43 grep // <C-R>%<C
|
endfunction
|
||||||
00008d0: 2d41 3e3c 7269 6768 743e 3c72 6967 6874 -A><right><right
|
function! HasPaste()
|
||||||
00008e0: 3e3c 7269 6768 743e 3c72 6967 6874 3e3c ><right><right><
|
if &paste
|
||||||
00008f0: 7269 6768 743e 3c72 6967 6874 3e3c 7269 right><right><ri
|
return 'PASTE MODE '
|
||||||
0000900: 6768 743e 3c72 6967 6874 3e3c 7269 6768 ght><right><righ
|
en
|
||||||
0000910: 743e 0a76 6e6f 7265 6d61 7020 3c73 696c t>.vnoremap <sil
|
return ''
|
||||||
0000920: 656e 743e 203c 6c65 6164 6572 3e72 203a ent> <leader>r :
|
endfunction
|
||||||
0000930: 6361 6c6c 2056 6973 7561 6c53 656c 6563 call VisualSelec
|
command! Bclose call <SID>BufcloseCloseIt()
|
||||||
0000940: 7469 6f6e 2827 7265 706c 6163 6527 293c tion('replace')<
|
function! <SID>BufcloseCloseIt()
|
||||||
0000950: 4352 3e0a 6d61 7020 3c6c 6561 6465 723e CR>.map <leader>
|
let l:currentBufNum = bufnr("%")
|
||||||
0000960: 6363 203a 626f 7472 6967 6874 2063 6f70 cc :botright cop
|
let l:alternateBufNum = bufnr("#")
|
||||||
0000970: 653c 6372 3e0a 6d61 7020 3c6c 6561 6465 e<cr>.map <leade
|
|
||||||
0000980: 723e 636f 2067 6756 4779 3a74 6162 6e65 r>co ggVGy:tabne
|
if buflisted(l:alternateBufNum)
|
||||||
0000990: 773c 6372 3e3a 7365 7420 7379 6e74 6178 w<cr>:set syntax
|
buffer #
|
||||||
00009a0: 3d71 663c 6372 3e70 6767 0a6d 6170 203c =qf<cr>pgg.map <
|
else
|
||||||
00009b0: 6c65 6164 6572 3e6e 203a 636e 3c63 723e leader>n :cn<cr>
|
bnext
|
||||||
00009c0: 0a6d 6170 203c 6c65 6164 6572 3e70 203a .map <leader>p :
|
endif
|
||||||
00009d0: 6370 3c63 723e 0a6d 6170 203c 6c65 6164 cp<cr>.map <lead
|
|
||||||
00009e0: 6572 3e73 7320 3a73 6574 6c6f 6361 6c20 er>ss :setlocal
|
if bufnr("%") == l:currentBufNum
|
||||||
00009f0: 7370 656c 6c21 3c63 723e 0a6d 6170 203c spell!<cr>.map <
|
new
|
||||||
0000a00: 6c65 6164 6572 3e73 6e20 5d73 0a6d 6170 leader>sn ]s.map
|
endif
|
||||||
0000a10: 203c 6c65 6164 6572 3e73 7020 5b73 0a6d <leader>sp [s.m
|
|
||||||
0000a20: 6170 203c 6c65 6164 6572 3e73 6120 7a67 ap <leader>sa zg
|
if buflisted(l:currentBufNum)
|
||||||
0000a30: 0a6d 6170 203c 6c65 6164 6572 3e73 3f20 .map <leader>s?
|
execute("bdelete! ".l:currentBufNum)
|
||||||
0000a40: 7a3d 0a6e 6f72 656d 6170 203c 4c65 6164 z=.noremap <Lead
|
endif
|
||||||
0000a50: 6572 3e6d 206d 6d48 6d74 3a25 732f 3c43 er>m mmHmt:%s/<C
|
endfunction
|
||||||
0000a60: 2d56 3e3c 6372 3e2f 2f67 653c 6372 3e27 -V><cr>//ge<cr>'
|
" Commenting blocks of code.
|
||||||
0000a70: 747a 7427 6d0a 6d61 7020 3c6c 6561 6465 tzt'm.map <leade
|
autocmd FileType c,cpp,java,scala,javascript let b:comment_leader = '// '
|
||||||
0000a80: 723e 7120 3a65 207e 2f62 7566 6665 723c r>q :e ~/buffer<
|
autocmd FileType sh,ruby,python let b:comment_leader = '# '
|
||||||
0000a90: 6372 3e0a 6d61 7020 3c6c 6561 6465 723e cr>.map <leader>
|
autocmd FileType conf,fstab let b:comment_leader = '# '
|
||||||
0000aa0: 7070 203a 7365 746c 6f63 616c 2070 6173 pp :setlocal pas
|
autocmd FileType tex let b:comment_leader = '% '
|
||||||
0000ab0: 7465 213c 6372 3e0a 6675 6e63 7469 6f6e te!<cr>.function
|
autocmd FileType vim let b:comment_leader = '" '
|
||||||
0000ac0: 2120 436d 644c 696e 6528 7374 7229 0a20 ! CmdLine(str).
|
noremap <leader>cc :<C-B><C-E>s/^/<C-R>=escape(b:comment_leader,'\/')<CR>/<CR>:nohlsearch<CR>
|
||||||
0000ad0: 2020 2065 7865 2022 6d65 6e75 2046 6f6f exe "menu Foo
|
noremap <leader>cu :<C-B><C-E>s/^\V<C-R>=escape(b:comment_leader,'\/')<CR>//e<CR>:nohlsearch<CR>
|
||||||
0000ae0: 2e42 6172 203a 2220 2e20 613a 7374 720a .Bar :" . a:str.
|
vnoremap <leader>cc :<C-B><C-E>s/^/<C-R>=escape(b:comment_leader,'\/')<CR>/<CR>:nohlsearch<CR>
|
||||||
0000af0: 2020 2020 656d 656e 7520 466f 6f2e 4261 emenu Foo.Ba
|
vnoremap <leader>cu :<C-B><C-E>s/^\V<C-R>=escape(b:comment_leader,'\/')<CR>//e<CR>:nohlsearch<CR>
|
||||||
0000b00: 720a 2020 2020 756e 6d65 6e75 2046 6f6f r. unmenu Foo
|
|
||||||
0000b10: 0a65 6e64 6675 6e63 7469 6f6e 0a66 756e .endfunction.fun
|
highlight ColorColumn ctermbg=magenta
|
||||||
0000b20: 6374 696f 6e21 2056 6973 7561 6c53 656c ction! VisualSel
|
call matchadd('ColorColumn', '\%80v', 100)
|
||||||
0000b30: 6563 7469 6f6e 2864 6972 6563 7469 6f6e ection(direction
|
|
||||||
0000b40: 2920 7261 6e67 650a 2020 2020 6c65 7420 ) range. let
|
nnoremap <silent> n n:call HLNext(0.4)<cr>
|
||||||
0000b50: 6c3a 7361 7665 645f 7265 6720 3d20 4022 l:saved_reg = @"
|
nnoremap <silent> N N:call HLNext(0.4)<cr>
|
||||||
0000b60: 0a20 2020 2065 7865 6375 7465 2022 6e6f . execute "no
|
|
||||||
0000b70: 726d 616c 2120 7667 7679 220a 0a20 2020 rmal! vgvy"..
|
highlight WhiteOnRed ctermbg=red ctermfg=white
|
||||||
0000b80: 206c 6574 206c 3a70 6174 7465 726e 203d let l:pattern =
|
|
||||||
0000b90: 2065 7363 6170 6528 4022 2c20 275c 5c2f escape(@", '\\/
|
function! HLNext(blinktime)
|
||||||
0000ba0: 2e2a 245e 7e5b 5d27 290a 2020 2020 6c65 .*$^~[]'). le
|
let [bufnum, lnum, col, off] = getpos('.')
|
||||||
0000bb0: 7420 6c3a 7061 7474 6572 6e20 3d20 7375 t l:pattern = su
|
let machlen = strlen(matchstr(strpart(getline('.'), col-1),@/))
|
||||||
0000bc0: 6273 7469 7475 7465 286c 3a70 6174 7465 bstitute(l:patte
|
let target_pat = '\c\%#'.@/
|
||||||
0000bd0: 726e 2c20 225c 6e24 222c 2022 222c 2022 rn, "\n$", "", "
|
let blinks = 3
|
||||||
0000be0: 2229 0a0a 2020 2020 6966 2061 3a64 6972 ").. if a:dir
|
for n in range(1, blinks)
|
||||||
0000bf0: 6563 7469 6f6e 203d 3d20 2762 270a 2020 ection == 'b'.
|
let red = matchadd('WhiteOnRed', target_pat, 101)
|
||||||
0000c00: 2020 2020 2020 6578 6563 7574 6520 226e execute "n
|
redraw
|
||||||
0000c10: 6f72 6d61 6c20 3f22 202e 206c 3a70 6174 ormal ?" . l:pat
|
exec 'sleep ' . float2nr(a:blinktime / (2*blinks) * 1000) . 'm'
|
||||||
0000c20: 7465 726e 202e 2022 5e4d 220a 2020 2020 tern . "^M".
|
call matchdelete(red)
|
||||||
0000c30: 656c 7365 6966 2061 3a64 6972 6563 7469 elseif a:directi
|
redraw
|
||||||
0000c40: 6f6e 203d 3d20 2767 7627 0a20 2020 2020 on == 'gv'.
|
exec 'sleep ' . float2nr(a:blinktime / (2*blinks) * 1000) . 'm'
|
||||||
0000c50: 2020 2063 616c 6c20 436d 644c 696e 6528 call CmdLine(
|
endfor
|
||||||
0000c60: 2276 696d 6772 6570 2022 202e 2027 2f27 "vimgrep " . '/'
|
endfunction
|
||||||
0000c70: 2e20 6c3a 7061 7474 6572 6e20 2e20 272f . l:pattern . '/
|
|
||||||
0000c80: 2720 2e20 2720 2a2a 2f2a 2e27 290a 2020 ' . ' **/*.').
|
" VimScript Highlighting is so fucking distracting
|
||||||
0000c90: 2020 656c 7365 6966 2061 3a64 6972 6563 elseif a:direc
|
augroup VimNoHighlight
|
||||||
0000ca0: 7469 6f6e 203d 3d20 2772 6570 6c61 6365 tion == 'replace
|
autocmd!
|
||||||
0000cb0: 270a 2020 2020 2020 2020 6361 6c6c 2043 '. call C
|
autocmd BufEnter .vimrc syntax off
|
||||||
0000cc0: 6d64 4c69 6e65 2822 2573 2220 2e20 272f mdLine("%s" . '/
|
augroup END
|
||||||
0000cd0: 272e 206c 3a70 6174 7465 726e 202e 2027 '. l:pattern . '
|
|
||||||
0000ce0: 2f27 290a 2020 2020 656c 7365 6966 2061 /'). elseif a
|
augroup NoEdits
|
||||||
0000cf0: 3a64 6972 6563 7469 6f6e 203d 3d20 2766 :direction == 'f
|
autocmd!
|
||||||
0000d00: 270a 2020 2020 2020 2020 6578 6563 7574 '. execut
|
autocmd SwapExists * let v:swapchoice = 'o'
|
||||||
0000d10: 6520 226e 6f72 6d61 6c20 2f22 202e 206c e "normal /" . l
|
autocmd SwapExists * echomsg ErrorMsg
|
||||||
0000d20: 3a70 6174 7465 726e 202e 2022 5e4d 220a :pattern . "^M".
|
autocmd SwapExists * echo 'Duplicate edit session (you are now editing readonly)'
|
||||||
0000d30: 2020 2020 656e 6469 660a 0a20 2020 206c endif.. l
|
autocmd SwapExists * echohl None
|
||||||
0000d40: 6574 2040 2f20 3d20 6c3a 7061 7474 6572 et @/ = l:patter
|
augroup END
|
||||||
0000d50: 6e0a 2020 2020 6c65 7420 4022 203d 206c n. let @" = l
|
|
||||||
0000d60: 3a73 6176 6564 5f72 6567 0a65 6e64 6675 :saved_reg.endfu
|
inoremap <expr> <C-K> ShowDigraphs
|
||||||
0000d70: 6e63 7469 6f6e 0a66 756e 6374 696f 6e21 nction.function!
|
|
||||||
0000d80: 2048 6173 5061 7374 6528 290a 2020 2020 HasPaste().
|
function! ShowDigraphs()
|
||||||
0000d90: 6966 2026 7061 7374 650a 2020 2020 2020 if &paste.
|
digraphs
|
||||||
0000da0: 2020 7265 7475 726e 2027 5041 5354 4520 return 'PASTE
|
call getchar()
|
||||||
0000db0: 4d4f 4445 2020 270a 2020 2020 656e 0a20 MODE '. en.
|
return "\<C-K>"
|
||||||
0000dc0: 2020 2072 6574 7572 6e20 2727 0a65 6e64 return ''.end
|
endfunction
|
||||||
0000dd0: 6675 6e63 7469 6f6e 0a63 6f6d 6d61 6e64 function.command
|
|
||||||
0000de0: 2120 4263 6c6f 7365 2063 616c 6c20 3c53 ! Bclose call <S
|
|
||||||
0000df0: 4944 3e42 7566 636c 6f73 6543 6c6f 7365 ID>BufcloseClose
|
|
||||||
0000e00: 4974 2829 0a66 756e 6374 696f 6e21 203c It().function! <
|
|
||||||
0000e10: 5349 443e 4275 6663 6c6f 7365 436c 6f73 SID>BufcloseClos
|
|
||||||
0000e20: 6549 7428 290a 2020 206c 6574 206c 3a63 eIt(). let l:c
|
|
||||||
0000e30: 7572 7265 6e74 4275 664e 756d 203d 2062 urrentBufNum = b
|
|
||||||
0000e40: 7566 6e72 2822 2522 290a 2020 206c 6574 ufnr("%"). let
|
|
||||||
0000e50: 206c 3a61 6c74 6572 6e61 7465 4275 664e l:alternateBufN
|
|
||||||
0000e60: 756d 203d 2062 7566 6e72 2822 2322 290a um = bufnr("#").
|
|
||||||
0000e70: 0a20 2020 6966 2062 7566 6c69 7374 6564 . if buflisted
|
|
||||||
0000e80: 286c 3a61 6c74 6572 6e61 7465 4275 664e (l:alternateBufN
|
|
||||||
0000e90: 756d 290a 2020 2020 2062 7566 6665 7220 um). buffer
|
|
||||||
0000ea0: 230a 2020 2065 6c73 650a 2020 2020 2062 #. else. b
|
|
||||||
0000eb0: 6e65 7874 0a20 2020 656e 6469 660a 0a20 next. endif..
|
|
||||||
0000ec0: 2020 6966 2062 7566 6e72 2822 2522 2920 if bufnr("%")
|
|
||||||
0000ed0: 3d3d 206c 3a63 7572 7265 6e74 4275 664e == l:currentBufN
|
|
||||||
0000ee0: 756d 0a20 2020 2020 6e65 770a 2020 2065 um. new. e
|
|
||||||
0000ef0: 6e64 6966 0a0a 2020 2069 6620 6275 666c ndif.. if bufl
|
|
||||||
0000f00: 6973 7465 6428 6c3a 6375 7272 656e 7442 isted(l:currentB
|
|
||||||
0000f10: 7566 4e75 6d29 0a20 2020 2020 6578 6563 ufNum). exec
|
|
||||||
0000f20: 7574 6528 2262 6465 6c65 7465 2120 222e ute("bdelete! ".
|
|
||||||
0000f30: 6c3a 6375 7272 656e 7442 7566 4e75 6d29 l:currentBufNum)
|
|
||||||
0000f40: 0a20 2020 656e 6469 660a 656e 6466 756e . endif.endfun
|
|
||||||
0000f50: 6374 696f 6e0a 2220 436f 6d6d 656e 7469 ction." Commenti
|
|
||||||
0000f60: 6e67 2062 6c6f 636b 7320 6f66 2063 6f64 ng blocks of cod
|
|
||||||
0000f70: 652e 0a61 7574 6f63 6d64 2046 696c 6554 e..autocmd FileT
|
|
||||||
0000f80: 7970 6520 632c 6370 702c 6a61 7661 2c73 ype c,cpp,java,s
|
|
||||||
0000f90: 6361 6c61 2c6a 6176 6173 6372 6970 7420 cala,javascript
|
|
||||||
0000fa0: 6c65 7420 623a 636f 6d6d 656e 745f 6c65 let b:comment_le
|
|
||||||
0000fb0: 6164 6572 203d 2027 2f2f 2027 0a61 7574 ader = '// '.aut
|
|
||||||
0000fc0: 6f63 6d64 2046 696c 6554 7970 6520 7368 ocmd FileType sh
|
|
||||||
0000fd0: 2c72 7562 792c 7079 7468 6f6e 2020 206c ,ruby,python l
|
|
||||||
0000fe0: 6574 2062 3a63 6f6d 6d65 6e74 5f6c 6561 et b:comment_lea
|
|
||||||
0000ff0: 6465 7220 3d20 2723 2027 0a61 7574 6f63 der = '# '.autoc
|
|
||||||
0001000: 6d64 2046 696c 6554 7970 6520 636f 6e66 md FileType conf
|
|
||||||
0001010: 2c66 7374 6162 2020 2020 2020 206c 6574 ,fstab let
|
|
||||||
0001020: 2062 3a63 6f6d 6d65 6e74 5f6c 6561 6465 b:comment_leade
|
|
||||||
0001030: 7220 3d20 2723 2027 0a61 7574 6f63 6d64 r = '# '.autocmd
|
|
||||||
0001040: 2046 696c 6554 7970 6520 7465 7820 2020 FileType tex
|
|
||||||
0001050: 2020 2020 2020 2020 2020 206c 6574 2062 let b
|
|
||||||
0001060: 3a63 6f6d 6d65 6e74 5f6c 6561 6465 7220 :comment_leader
|
|
||||||
0001070: 3d20 2725 2027 0a61 7574 6f63 6d64 2046 = '% '.autocmd F
|
|
||||||
0001080: 696c 6554 7970 6520 7669 6d20 2020 2020 ileType vim
|
|
||||||
0001090: 2020 2020 2020 2020 206c 6574 2062 3a63 let b:c
|
|
||||||
00010a0: 6f6d 6d65 6e74 5f6c 6561 6465 7220 3d20 omment_leader =
|
|
||||||
00010b0: 2722 2027 0a6e 6f72 656d 6170 203c 6c65 '" '.noremap <le
|
|
||||||
00010c0: 6164 6572 3e63 6320 3a3c 432d 423e 3c43 ader>cc :<C-B><C
|
|
||||||
00010d0: 2d45 3e73 2f5e 2f3c 432d 523e 3d65 7363 -E>s/^/<C-R>=esc
|
|
||||||
00010e0: 6170 6528 623a 636f 6d6d 656e 745f 6c65 ape(b:comment_le
|
|
||||||
00010f0: 6164 6572 2c27 5c2f 2729 3c43 523e 2f3c ader,'\/')<CR>/<
|
|
||||||
0001100: 4352 3e3a 6e6f 686c 7365 6172 6368 3c43 CR>:nohlsearch<C
|
|
||||||
0001110: 523e 0a6e 6f72 656d 6170 203c 6c65 6164 R>.noremap <lead
|
|
||||||
0001120: 6572 3e63 7520 3a3c 432d 423e 3c43 2d45 er>cu :<C-B><C-E
|
|
||||||
0001130: 3e73 2f5e 5c56 3c43 2d52 3e3d 6573 6361 >s/^\V<C-R>=esca
|
|
||||||
0001140: 7065 2862 3a63 6f6d 6d65 6e74 5f6c 6561 pe(b:comment_lea
|
|
||||||
0001150: 6465 722c 275c 2f27 293c 4352 3e2f 2f65 der,'\/')<CR>//e
|
|
||||||
0001160: 3c43 523e 3a6e 6f68 6c73 6561 7263 683c <CR>:nohlsearch<
|
|
||||||
0001170: 4352 3e0a 766e 6f72 656d 6170 203c 6c65 CR>.vnoremap <le
|
|
||||||
0001180: 6164 6572 3e63 6320 3a3c 432d 423e 3c43 ader>cc :<C-B><C
|
|
||||||
0001190: 2d45 3e73 2f5e 2f3c 432d 523e 3d65 7363 -E>s/^/<C-R>=esc
|
|
||||||
00011a0: 6170 6528 623a 636f 6d6d 656e 745f 6c65 ape(b:comment_le
|
|
||||||
00011b0: 6164 6572 2c27 5c2f 2729 3c43 523e 2f3c ader,'\/')<CR>/<
|
|
||||||
00011c0: 4352 3e3a 6e6f 686c 7365 6172 6368 3c43 CR>:nohlsearch<C
|
|
||||||
00011d0: 523e 0a76 6e6f 7265 6d61 7020 3c6c 6561 R>.vnoremap <lea
|
|
||||||
00011e0: 6465 723e 6375 203a 3c43 2d42 3e3c 432d der>cu :<C-B><C-
|
|
||||||
00011f0: 453e 732f 5e5c 563c 432d 523e 3d65 7363 E>s/^\V<C-R>=esc
|
|
||||||
0001200: 6170 6528 623a 636f 6d6d 656e 745f 6c65 ape(b:comment_le
|
|
||||||
0001210: 6164 6572 2c27 5c2f 2729 3c43 523e 2f2f ader,'\/')<CR>//
|
|
||||||
0001220: 653c 4352 3e3a 6e6f 686c 7365 6172 6368 e<CR>:nohlsearch
|
|
||||||
0001230: 3c43 523e 0a0a 6869 6768 6c69 6768 7420 <CR>..highlight
|
|
||||||
0001240: 436f 6c6f 7243 6f6c 756d 6e20 6374 6572 ColorColumn cter
|
|
||||||
0001250: 6d62 673d 6d61 6765 6e74 610a 6361 6c6c mbg=magenta.call
|
|
||||||
0001260: 206d 6174 6368 6164 6428 2743 6f6c 6f72 matchadd('Color
|
|
||||||
0001270: 436f 6c75 6d6e 272c 2027 5c25 3830 7627 Column', '\%80v'
|
|
||||||
0001280: 2c20 3130 3029 0a0a 6e6e 6f72 656d 6170 , 100)..nnoremap
|
|
||||||
0001290: 203c 7369 6c65 6e74 3e20 6e20 6e3a 6361 <silent> n n:ca
|
|
||||||
00012a0: 6c6c 2048 4c4e 6578 7428 302e 3429 3c63 ll HLNext(0.4)<c
|
|
||||||
00012b0: 723e 0a6e 6e6f 7265 6d61 7020 3c73 696c r>.nnoremap <sil
|
|
||||||
00012c0: 656e 743e 204e 204e 3a63 616c 6c20 484c ent> N N:call HL
|
|
||||||
00012d0: 4e65 7874 2830 2e34 293c 6372 3e0a 0a68 Next(0.4)<cr>..h
|
|
||||||
00012e0: 6967 686c 6967 6874 2057 6869 7465 4f6e ighlight WhiteOn
|
|
||||||
00012f0: 5265 6420 6374 6572 6d62 673d 7265 6420 Red ctermbg=red
|
|
||||||
0001300: 6374 6572 6d66 673d 7768 6974 650a 0a66 ctermfg=white..f
|
|
||||||
0001310: 756e 6374 696f 6e21 2048 4c4e 6578 7428 unction! HLNext(
|
|
||||||
0001320: 626c 696e 6b74 696d 6529 0a20 2020 206c blinktime). l
|
|
||||||
0001330: 6574 205b 6275 666e 756d 2c20 6c6e 756d et [bufnum, lnum
|
|
||||||
0001340: 2c20 636f 6c2c 206f 6666 5d20 3d20 6765 , col, off] = ge
|
|
||||||
0001350: 7470 6f73 2827 2e27 290a 2020 2020 6c65 tpos('.'). le
|
|
||||||
0001360: 7420 6d61 6368 6c65 6e20 3d20 7374 726c t machlen = strl
|
|
||||||
0001370: 656e 286d 6174 6368 7374 7228 7374 7270 en(matchstr(strp
|
|
||||||
0001380: 6172 7428 6765 746c 696e 6528 272e 2729 art(getline('.')
|
|
||||||
0001390: 2c20 636f 6c2d 3129 2c40 2f29 290a 2020 , col-1),@/)).
|
|
||||||
00013a0: 2020 6c65 7420 7461 7267 6574 5f70 6174 let target_pat
|
|
||||||
00013b0: 203d 2027 5c63 5c25 2327 2e40 2f0a 2020 = '\c\%#'.@/.
|
|
||||||
00013c0: 2020 6c65 7420 626c 696e 6b73 203d 2033 let blinks = 3
|
|
||||||
00013d0: 0a20 2020 2066 6f72 206e 2069 6e20 7261 . for n in ra
|
|
||||||
00013e0: 6e67 6528 312c 2062 6c69 6e6b 7329 0a20 nge(1, blinks).
|
|
||||||
00013f0: 2020 2020 2020 206c 6574 2072 6564 203d let red =
|
|
||||||
0001400: 206d 6174 6368 6164 6428 2757 6869 7465 matchadd('White
|
|
||||||
0001410: 4f6e 5265 6427 2c20 7461 7267 6574 5f70 OnRed', target_p
|
|
||||||
0001420: 6174 2c20 3130 3129 0a20 2020 2020 2020 at, 101).
|
|
||||||
0001430: 2072 6564 7261 770a 2020 2020 2020 2020 redraw.
|
|
||||||
0001440: 6578 6563 2027 736c 6565 7020 2720 2e20 exec 'sleep ' .
|
|
||||||
0001450: 666c 6f61 7432 6e72 2861 3a62 6c69 6e6b float2nr(a:blink
|
|
||||||
0001460: 7469 6d65 202f 2028 322a 626c 696e 6b73 time / (2*blinks
|
|
||||||
0001470: 2920 2a20 3130 3030 2920 2e20 276d 270a ) * 1000) . 'm'.
|
|
||||||
0001480: 2020 2020 2020 2020 6361 6c6c 206d 6174 call mat
|
|
||||||
0001490: 6368 6465 6c65 7465 2872 6564 290a 2020 chdelete(red).
|
|
||||||
00014a0: 2020 2020 2020 7265 6472 6177 0a20 2020 redraw.
|
|
||||||
00014b0: 2020 2020 2065 7865 6320 2773 6c65 6570 exec 'sleep
|
|
||||||
00014c0: 2027 202e 2066 6c6f 6174 326e 7228 613a ' . float2nr(a:
|
|
||||||
00014d0: 626c 696e 6b74 696d 6520 2f20 2832 2a62 blinktime / (2*b
|
|
||||||
00014e0: 6c69 6e6b 7329 202a 2031 3030 3029 202e links) * 1000) .
|
|
||||||
00014f0: 2027 6d27 0a20 2020 2065 6e64 666f 720a 'm'. endfor.
|
|
||||||
0001500: 656e 6466 756e 6374 696f 6e0a 0a22 2056 endfunction.." V
|
|
||||||
0001510: 696d 5363 7269 7074 2048 6967 686c 6967 imScript Highlig
|
|
||||||
0001520: 6874 696e 6720 6973 2073 6f20 6675 636b hting is so fuck
|
|
||||||
0001530: 696e 6720 6469 7374 7261 6374 696e 670a ing distracting.
|
|
||||||
0001540: 6175 6772 6f75 7020 5669 6d4e 6f48 6967 augroup VimNoHig
|
|
||||||
0001550: 686c 6967 6874 0a20 2020 2061 7574 6f63 hlight. autoc
|
|
||||||
0001560: 6d64 210a 2020 2020 6175 746f 636d 6420 md!. autocmd
|
|
||||||
0001570: 4275 6645 6e74 6572 202e 7669 6d72 6320 BufEnter .vimrc
|
|
||||||
0001580: 7379 6e74 6178 206f 6666 0a61 7567 726f syntax off.augro
|
|
||||||
0001590: 7570 2045 4e44 0a0a 6175 6772 6f75 7020 up END..augroup
|
|
||||||
00015a0: 4e6f 4564 6974 730a 2020 2020 6175 746f NoEdits. auto
|
|
||||||
00015b0: 636d 6421 0a20 2020 2061 7574 6f63 6d64 cmd!. autocmd
|
|
||||||
00015c0: 2053 7761 7045 7869 7374 7320 2a20 6c65 SwapExists * le
|
|
||||||
00015d0: 7420 763a 7377 6170 6368 6f69 6365 203d t v:swapchoice =
|
|
||||||
00015e0: 2027 6f27 0a20 2020 2061 7574 6f63 6d64 'o'. autocmd
|
|
||||||
00015f0: 2053 7761 7045 7869 7374 7320 2a20 6563 SwapExists * ec
|
|
||||||
0001600: 686f 6d73 6720 4572 726f 724d 7367 0a20 homsg ErrorMsg.
|
|
||||||
0001610: 2020 2061 7574 6f63 6d64 2053 7761 7045 autocmd SwapE
|
|
||||||
0001620: 7869 7374 7320 2a20 6563 686f 2027 4475 xists * echo 'Du
|
|
||||||
0001630: 706c 6963 6174 6520 6564 6974 2073 6573 plicate edit ses
|
|
||||||
0001640: 7369 6f6e 2028 796f 7520 6172 6520 6e6f sion (you are no
|
|
||||||
0001650: 7720 6564 6974 696e 6720 7265 6164 6f6e w editing readon
|
|
||||||
0001660: 6c79 2927 0a20 2020 2061 7574 6f63 6d64 ly)'. autocmd
|
|
||||||
0001670: 2053 7761 7045 7869 7374 7320 2a20 6563 SwapExists * ec
|
|
||||||
0001680: 686f 686c 204e 6f6e 650a 6175 6772 6f75 hohl None.augrou
|
|
||||||
0001690: 7020 454e 440a 0a69 6e6f 7265 6d61 7020 p END..inoremap
|
|
||||||
00016a0: 3c65 7870 723e 203c 432d 4b3e 2053 686f <expr> <C-K> Sho
|
|
||||||
00016b0: 7744 6967 7261 7068 730a 0a66 756e 6374 wDigraphs..funct
|
|
||||||
00016c0: 696f 6e21 2053 686f 7744 6967 7261 7068 ion! ShowDigraph
|
|
||||||
00016d0: 7328 290a 2020 2020 6469 6772 6170 6873 s(). digraphs
|
|
||||||
00016e0: 0a20 2020 2063 616c 6c20 6765 7463 6861 . call getcha
|
|
||||||
00016f0: 7228 290a 2020 2020 7265 7475 726e 2022 r(). return "
|
|
||||||
0001700: 5c3c 432d 4b3e 220a 656e 6466 756e 6374 \<C-K>".endfunct
|
|
||||||
0001710: 696f 6e0a ion.
|
|
||||||
|
Reference in New Issue
Block a user