" Vim filetype plugin" Language: git rebase --interactive" Maintainer: Tim Pope <vimNOSPAM@tpope.org>" Last Change: 2016 Aug 29" Only do this when not done yet for this bufferif (exists("b:did_ftplugin"))finishendifruntime! ftplugin/git.vimlet b:did_ftplugin = 1setlocal comments=:# commentstring=#\ %s formatoptions-=tsetlocal nomodelineif !exists("b:undo_ftplugin")let b:undo_ftplugin = ""endiflet b:undo_ftplugin = b:undo_ftplugin."|setl com< cms< fo< ml<"function! s:choose(word)s/^\(\w\+\>\)\=\(\s*\)\ze\x\{4,40\}\>/\=(strlen(submatch(1)) == 1 ? a:word[0] : a:word) . substitute(submatch(2),'^$',' ','')/eendfunctionfunction! s:cycle()call s:choose(get({'s':'edit','p':'squash','e':'reword','r':'fixup'},getline('.')[0],'pick'))endfunctioncommand! -buffer -bar Pick :call s:choose('pick')command! -buffer -bar Squash :call s:choose('squash')command! -buffer -bar Edit :call s:choose('edit')command! -buffer -bar Reword :call s:choose('reword')command! -buffer -bar Fixup :call s:choose('fixup')command! -buffer -bar Cycle :call s:cycle()" The above are more useful when they are mapped; for example:"nnoremap <buffer> <silent> S :Cycle<CR>if exists("g:no_plugin_maps") || exists("g:no_gitrebase_maps")finishendifnnoremap <buffer> <expr> K col('.') < 7 && expand('<Lt>cword>') =~ '\X' && getline('.') =~ '^\w\+\s\+\x\+\>' ? 'wK' : 'K'let b:undo_ftplugin = b:undo_ftplugin . "|nunmap <buffer> K"
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。