mirror of
https://github.com/amix/vimrc
synced 2025-06-17 10:55:00 +08:00
Updated plugins
This commit is contained in:
@ -85,8 +85,12 @@ runtime! ftplugin/ruby.vim ftplugin/ruby_*.vim ftplugin/ruby/*.vim
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
" Combine the new set of values with those previously included.
|
||||
if exists("b:undo_ftplugin")
|
||||
let s:undo_ftplugin = b:undo_ftplugin . " | " . s:undo_ftplugin
|
||||
if !exists('b:undo_ftplugin')
|
||||
" No-op
|
||||
let b:undo_ftplugin = 'exe'
|
||||
endif
|
||||
if !empty(s:undo_ftplugin)
|
||||
let b:undo_ftplugin .= '|' . s:undo_ftplugin
|
||||
endif
|
||||
if exists ("b:browsefilter")
|
||||
let s:browsefilter = substitute(b:browsefilter,'\cAll Files (\*\.\*)\t\*\.\*\n','','') . s:browsefilter
|
||||
@ -118,7 +122,7 @@ endif
|
||||
setlocal commentstring=<%#%s%>
|
||||
|
||||
let b:undo_ftplugin = "setl cms< " .
|
||||
\ " | unlet! b:browsefilter b:match_words | " . s:undo_ftplugin
|
||||
\ " | unlet! b:browsefilter b:match_words | " . b:undo_ftplugin
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
@ -52,7 +52,7 @@ endif
|
||||
" TODO:
|
||||
"setlocal define=^\\s*def
|
||||
|
||||
setlocal comments=:#
|
||||
setlocal comments=b:#
|
||||
setlocal commentstring=#\ %s
|
||||
|
||||
if !exists('g:ruby_version_paths')
|
||||
@ -86,8 +86,14 @@ endfunction
|
||||
|
||||
function! s:build_path(path) abort
|
||||
let path = join(map(copy(a:path), 'v:val ==# "." ? "" : v:val'), ',')
|
||||
if &g:path !~# '\v^%(\.,)=%(/%(usr|emx)/include,)=,$'
|
||||
let path = substitute(&g:path,',,$',',','') . ',' . path
|
||||
if &g:path =~# '\v^%(\.,)=%(/%(usr|emx)/include,)=,$'
|
||||
let path = path . ',.,,'
|
||||
elseif &g:path =~# ',\.,,$'
|
||||
let path = &g:path[0:-4] . path . ',.,,'
|
||||
elseif &g:path =~# ',,$'
|
||||
let path = &g:path[0:-2] . path . ',,'
|
||||
else
|
||||
let path = substitute(&g:path, '[^,]\zs$', ',', '') . path
|
||||
endif
|
||||
return path
|
||||
endfunction
|
||||
@ -163,6 +169,8 @@ let b:undo_ftplugin .= "| sil! cunmap <buffer> <Plug><ctag>| sil! cunmap <buffer
|
||||
if !exists("g:no_plugin_maps") && !exists("g:no_ruby_maps")
|
||||
nmap <buffer><script> <SID>: :<C-U>
|
||||
nmap <buffer><script> <SID>c: :<C-U><C-R>=v:count ? v:count : ''<CR>
|
||||
cmap <buffer> <SID><cfile> <Plug><cfile>
|
||||
cmap <buffer> <SID><ctag> <Plug><ctag>
|
||||
|
||||
nnoremap <silent> <buffer> [m :<C-U>call <SID>searchsyn('\<def\>',['rubyDefine'],'b','n')<CR>
|
||||
nnoremap <silent> <buffer> ]m :<C-U>call <SID>searchsyn('\<def\>',['rubyDefine'],'','n')<CR>
|
||||
@ -209,20 +217,20 @@ if !exists("g:no_plugin_maps") && !exists("g:no_ruby_maps")
|
||||
call s:map('c', '', '<C-R><C-F> <Plug><cfile>')
|
||||
|
||||
cmap <buffer><script><expr> <SID>tagzv &foldopen =~# 'tag' ? '<Bar>norm! zv' : ''
|
||||
call s:map('n', '<silent>', '<C-]> <SID>:exe v:count1."tag <Plug><ctag>"<SID>tagzv<CR>')
|
||||
call s:map('n', '<silent>', 'g<C-]> <SID>:exe "tjump <Plug><ctag>"<SID>tagzv<CR>')
|
||||
call s:map('n', '<silent>', 'g] <SID>:exe "tselect <Plug><ctag>"<SID>tagzv<CR>')
|
||||
call s:map('n', '<silent>', '<C-W>] <SID>:exe v:count1."stag <Plug><ctag>"<SID>tagzv<CR>')
|
||||
call s:map('n', '<silent>', '<C-W><C-]> <SID>:exe v:count1."stag <Plug><ctag>"<SID>tagzv<CR>')
|
||||
call s:map('n', '<silent>', '<C-W>g<C-]> <SID>:exe "stjump <Plug><ctag>"<SID>tagzv<CR>')
|
||||
call s:map('n', '<silent>', '<C-W>g] <SID>:exe "stselect <Plug><ctag>"<SID>tagzv<CR>')
|
||||
call s:map('n', '<silent>', '<C-W>} <SID>:exe v:count1."ptag <Plug><ctag>"<CR>')
|
||||
call s:map('n', '<silent>', '<C-W>g} <SID>:exe "ptjump <Plug><ctag>"<CR>')
|
||||
call s:map('n', '<script><silent>', '<C-]> <SID>:exe v:count1."tag <SID><ctag>"<SID>tagzv<CR>')
|
||||
call s:map('n', '<script><silent>', 'g<C-]> <SID>:exe "tjump <SID><ctag>"<SID>tagzv<CR>')
|
||||
call s:map('n', '<script><silent>', 'g] <SID>:exe "tselect <SID><ctag>"<SID>tagzv<CR>')
|
||||
call s:map('n', '<script><silent>', '<C-W>] <SID>:exe v:count1."stag <SID><ctag>"<SID>tagzv<CR>')
|
||||
call s:map('n', '<script><silent>', '<C-W><C-]> <SID>:exe v:count1."stag <SID><ctag>"<SID>tagzv<CR>')
|
||||
call s:map('n', '<script><silent>', '<C-W>g<C-]> <SID>:exe "stjump <SID><ctag>"<SID>tagzv<CR>')
|
||||
call s:map('n', '<script><silent>', '<C-W>g] <SID>:exe "stselect <SID><ctag>"<SID>tagzv<CR>')
|
||||
call s:map('n', '<script><silent>', '<C-W>} <SID>:exe v:count1."ptag <SID><ctag>"<CR>')
|
||||
call s:map('n', '<script><silent>', '<C-W>g} <SID>:exe "ptjump <SID><ctag>"<CR>')
|
||||
|
||||
call s:map('n', '<silent>', 'gf <SID>c:find <Plug><cfile><CR>')
|
||||
call s:map('n', '<silent>', '<C-W>f <SID>c:sfind <Plug><cfile><CR>')
|
||||
call s:map('n', '<silent>', '<C-W><C-F> <SID>c:sfind <Plug><cfile><CR>')
|
||||
call s:map('n', '<silent>', '<C-W>gf <SID>c:tabfind <Plug><cfile><CR>')
|
||||
call s:map('n', '<script><silent>', 'gf <SID>c:find <SID><cfile><CR>')
|
||||
call s:map('n', '<script><silent>', '<C-W>f <SID>c:sfind <SID><cfile><CR>')
|
||||
call s:map('n', '<script><silent>', '<C-W><C-F> <SID>c:sfind <SID><cfile><CR>')
|
||||
call s:map('n', '<script><silent>', '<C-W>gf <SID>c:tabfind <SID><cfile><CR>')
|
||||
endif
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
|
Reference in New Issue
Block a user