Revisão | e38320b0e1d45c8d29fcecc30992252330400a81 (tree) |
---|---|
Hora | 2023-01-13 07:13:40 |
Autor | badcoff33 <none@none> |
Commiter | badcoff33 |
merged
@@ -9,6 +9,11 @@ setlocal nocindent | ||
9 | 9 | nnoremap <buffer> K :help <C-r><C-w><CR> |
10 | 10 | nnoremap <buffer> <LocalLeader>o :set <C-r><C-w>?<CR> |
11 | 11 | |
12 | +set path= | |
13 | +for p in split(&rtp, ",") | |
14 | + execute "set path+=" .. escape(p .. g:slash, " \\") .. "**" | |
15 | +endfor | |
16 | + | |
12 | 17 | if empty(matchstr(expand("%:p:h"), "color")) |
13 | 18 | " source Vim file |
14 | 19 | nnoremap <special> <buffer> <CR> :w<bar>source%<CR> |
@@ -18,22 +23,20 @@ else | ||
18 | 23 | endif |
19 | 24 | |
20 | 25 | " source current visual region |
21 | -vnoremap <buffer> <CR> :<C-U>call VisExecute()<CR> | |
26 | +vnoremap <buffer> <CR> :<C-U>call s:VisExecute()<CR> | |
22 | 27 | |
23 | 28 | iabbrev <buffer> _fun function!<CR>endfunction<Up> |
24 | 29 | iabbrev <buffer> _aug augroup NAME<CR>au!<CR>augroup END<Up><Up><End> |
25 | 30 | |
26 | -if !exists("*VisExecute") | |
27 | - function! VisExecute() abort | |
28 | - let save_selection = &selection | |
29 | - let save_reg_x = @x | |
30 | - silent normal '<V'>"xy | |
31 | - let @a = substitute(@x, '\r', '\n', 'g') | |
32 | - @x | |
33 | - let @x = save_reg_x | |
34 | - let &selection = save_selection | |
35 | - endfunction | |
36 | -endif | |
31 | +function! s:VisExecute() abort | |
32 | + let save_selection = &selection | |
33 | + let save_reg_x = @x | |
34 | + silent normal '<V'>"xy | |
35 | + let @a = substitute(@x, '\r', '\n', 'g') | |
36 | + @x | |
37 | + let @x = save_reg_x | |
38 | + let &selection = save_selection | |
39 | +endfunction | |
37 | 40 | |
38 | 41 | if !exists('*LogError') |
39 | 42 | " Description: Support testing with Vim's assert functions |