annotate runtime/ftplugin/gitrebase.vim @ 2737:329a9676040c v7.3.145

updated for version 7.3.145 Problem: Can't build with Python dynamically loading. Solution: Add dll_PyType_Ready.
author Bram Moolenaar <bram@vim.org>
date Sat, 26 Mar 2011 18:32:05 +0100
parents f7579a31705c
children 43efa4f5a8ea
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1624
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
1 " Vim filetype plugin
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
2 " Language: git rebase --interactive
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1624
diff changeset
3 " Maintainer: Tim Pope <vimNOSPAM@tpope.org>
2202
f7579a31705c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
4 " Last Change: 2010 May 21
1624
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
5
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
6 " Only do this when not done yet for this buffer
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
7 if (exists("b:did_ftplugin"))
2202
f7579a31705c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
8 finish
1624
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
9 endif
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
10
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
11 runtime! ftplugin/git.vim
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
12 let b:did_ftplugin = 1
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
13
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
14 setlocal comments=:# commentstring=#\ %s formatoptions-=t
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
15 if !exists("b:undo_ftplugin")
2202
f7579a31705c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
16 let b:undo_ftplugin = ""
1624
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
17 endif
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
18 let b:undo_ftplugin = b:undo_ftplugin."|setl com< cms< fo<"
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
19
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
20 function! s:choose(word)
2202
f7579a31705c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
21 s/^\(\w\+\>\)\=\(\s*\)\ze\x\{4,40\}\>/\=(strlen(submatch(1)) == 1 ? a:word[0] : a:word) . substitute(submatch(2),'^$',' ','')/e
1624
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
22 endfunction
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
23
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
24 function! s:cycle()
2202
f7579a31705c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
25 call s:choose(get({'s':'edit','p':'squash','e':'reword','r':'fixup'},getline('.')[0],'pick'))
1624
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
26 endfunction
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
27
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
28 command! -buffer -bar Pick :call s:choose('pick')
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
29 command! -buffer -bar Squash :call s:choose('squash')
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
30 command! -buffer -bar Edit :call s:choose('edit')
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1624
diff changeset
31 command! -buffer -bar Reword :call s:choose('reword')
2202
f7579a31705c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
32 command! -buffer -bar Fixup :call s:choose('fixup')
1624
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
33 command! -buffer -bar Cycle :call s:cycle()
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
34 " The above are more useful when they are mapped; for example:
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
35 "nnoremap <buffer> <silent> S :Cycle<CR>
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
36
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
37 if exists("g:no_plugin_maps") || exists("g:no_gitrebase_maps")
2202
f7579a31705c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
38 finish
1624
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
39 endif
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
40
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
41 nnoremap <buffer> <expr> K col('.') < 7 && expand('<Lt>cword>') =~ '\X' && getline('.') =~ '^\w\+\s\+\x\+\>' ? 'wK' : 'K'
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
42
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
43 let b:undo_ftplugin = b:undo_ftplugin . "|nunmap <buffer> K"