aboutsummaryrefslogtreecommitdiff
path: root/runtime/ftplugin/gitrebase.vim
diff options
context:
space:
mode:
authorChristian Clason <c.clason@uni-graz.at>2022-01-11 14:14:17 +0100
committerGitHub <noreply@github.com>2022-01-11 14:14:17 +0100
commite866da12eeae1e5521abd89a94a7f7c9595a75c3 (patch)
tree3ea2d88dd62d09b6b5962c40cf61be2c771444cb /runtime/ftplugin/gitrebase.vim
parent25eb7692d8e29cc83a70d74cbe1a8a1fae1f8ba2 (diff)
downloadrneovim-e866da12eeae1e5521abd89a94a7f7c9595a75c3.tar.gz
rneovim-e866da12eeae1e5521abd89a94a7f7c9595a75c3.tar.bz2
rneovim-e866da12eeae1e5521abd89a94a7f7c9595a75c3.zip
vim-patch:2f0936cb9a2e (#17007)
* vim-patch:2f0936cb9a2e Update runtime files https://github.com/vim/vim/commit/2f0936cb9a2eb026acac03e6a8fd0b2a5d97508b
Diffstat (limited to 'runtime/ftplugin/gitrebase.vim')
-rw-r--r--runtime/ftplugin/gitrebase.vim15
1 files changed, 6 insertions, 9 deletions
diff --git a/runtime/ftplugin/gitrebase.vim b/runtime/ftplugin/gitrebase.vim
index 2fed53c829..143f86a251 100644
--- a/runtime/ftplugin/gitrebase.vim
+++ b/runtime/ftplugin/gitrebase.vim
@@ -1,22 +1,20 @@
" Vim filetype plugin
" Language: git rebase --interactive
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
-" Last Change: 2019 Dec 05
+" Last Change: 2022 Jan 05
" Only do this when not done yet for this buffer
if (exists("b:did_ftplugin"))
finish
endif
-runtime! ftplugin/git.vim
let b:did_ftplugin = 1
-setlocal comments=:# commentstring=#\ %s formatoptions-=t
+let &l:comments = ':' . (matchstr(getline('$'), '^[#;@!$%^&|:]\S\@!') . '#')[0]
+let &l:commentstring = &l:comments[1] . ' %s'
+setlocal formatoptions-=t
setlocal nomodeline
-if !exists("b:undo_ftplugin")
- let b:undo_ftplugin = ""
-endif
-let b:undo_ftplugin = b:undo_ftplugin."|setl com< cms< fo< ml<"
+let b:undo_ftplugin = "setl com< cms< fo< ml<"
function! s:choose(word) abort
s/^\(\w\+\>\)\=\(\s*\)\ze\x\{4,40\}\>/\=(strlen(submatch(1)) == 1 ? a:word[0] : a:word) . substitute(submatch(2),'^$',' ','')/e
@@ -41,8 +39,7 @@ if exists("g:no_plugin_maps") || exists("g:no_gitrebase_maps")
finish
endif
-nnoremap <buffer> <expr> K col('.') < 7 && expand('<Lt>cword>') =~ '\X' && getline('.') =~ '^\w\+\s\+\x\+\>' ? 'wK' : 'K'
nnoremap <buffer> <silent> <C-A> :<C-U><C-R>=v:count1<CR>Cycle<CR>
nnoremap <buffer> <silent> <C-X> :<C-U><C-R>=v:count1<CR>Cycle!<CR>
-let b:undo_ftplugin = b:undo_ftplugin . "|exe 'nunmap <buffer> K'|exe 'nunmap <buffer> <C-A>'|exe 'nunmap <buffer> <C-X>'"
+let b:undo_ftplugin = b:undo_ftplugin . "|exe 'nunmap <buffer> <C-A>'|exe 'nunmap <buffer> <C-X>'"