diff options
Diffstat (limited to 'ftplugin/cucumber.vim')
-rw-r--r-- | ftplugin/cucumber.vim | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/ftplugin/cucumber.vim b/ftplugin/cucumber.vim index 1c1f0f25..f52a1b21 100644 --- a/ftplugin/cucumber.vim +++ b/ftplugin/cucumber.vim @@ -1,7 +1,7 @@ " Vim filetype plugin " Language: Cucumber " Maintainer: Tim Pope <vimNOSPAM@tpope.org> -" Last Change: 2010 Aug 09 +" Last Change: 2013 Jun 01 " Only do this when not done yet for this buffer if (exists("b:did_ftplugin")) @@ -9,6 +9,9 @@ if (exists("b:did_ftplugin")) endif let b:did_ftplugin = 1 +let s:keepcpo= &cpo +set cpo&vim + setlocal formatoptions-=t formatoptions+=croql setlocal comments=:# commentstring=#\ %s setlocal omnifunc=CucumberComplete @@ -18,25 +21,17 @@ let b:undo_ftplugin = "setl fo< com< cms< ofu<" let b:cucumber_root = expand('%:p:h:s?.*[\/]\%(features\|stories\)\zs[\/].*??') if !exists("g:no_plugin_maps") && !exists("g:no_cucumber_maps") - nnoremap <silent><buffer> <C-]> :<C-U>exe <SID>jump('edit',v:count)<CR> nnoremap <silent><buffer> [<C-D> :<C-U>exe <SID>jump('edit',v:count)<CR> nnoremap <silent><buffer> ]<C-D> :<C-U>exe <SID>jump('edit',v:count)<CR> - nnoremap <silent><buffer> <C-W>] :<C-U>exe <SID>jump('split',v:count)<CR> - nnoremap <silent><buffer> <C-W><C-]> :<C-U>exe <SID>jump('split',v:count)<CR> nnoremap <silent><buffer> <C-W>d :<C-U>exe <SID>jump('split',v:count)<CR> nnoremap <silent><buffer> <C-W><C-D> :<C-U>exe <SID>jump('split',v:count)<CR> - nnoremap <silent><buffer> <C-W>} :<C-U>exe <SID>jump('pedit',v:count)<CR> nnoremap <silent><buffer> [d :<C-U>exe <SID>jump('pedit',v:count)<CR> nnoremap <silent><buffer> ]d :<C-U>exe <SID>jump('pedit',v:count)<CR> let b:undo_ftplugin .= - \ "|sil! nunmap <buffer> <C-]>" . \ "|sil! nunmap <buffer> [<C-D>" . \ "|sil! nunmap <buffer> ]<C-D>" . - \ "|sil! nunmap <buffer> <C-W>]" . - \ "|sil! nunmap <buffer> <C-W><C-]>" . \ "|sil! nunmap <buffer> <C-W>d" . \ "|sil! nunmap <buffer> <C-W><C-D>" . - \ "|sil! nunmap <buffer> <C-W>}" . \ "|sil! nunmap <buffer> [d" . \ "|sil! nunmap <buffer> ]d" endif @@ -145,4 +140,7 @@ function! CucumberComplete(findstart,base) abort return sort(steps) endfunction +let &cpo = s:keepcpo +unlet s:keepcpo + " vim:set sts=2 sw=2: |