diff options
author | Bram Moolenaar <Bram@vim.org> | 2014-01-23 14:24:41 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2014-01-23 14:24:41 +0100 |
commit | 8d04317104f7ab39785aa9451c6810ef22fcec76 (patch) | |
tree | 7bff2ef9af3dae8ef12177c43eb397e596fadc9e /runtime/ftplugin | |
parent | ac8400d48354a62b7b761cf6897641876d2c476d (diff) | |
download | vim-git-8d04317104f7ab39785aa9451c6810ef22fcec76.tar.gz |
Updated runtime files.
Diffstat (limited to 'runtime/ftplugin')
-rw-r--r-- | runtime/ftplugin/changelog.vim | 4 | ||||
-rw-r--r-- | runtime/ftplugin/cobol.vim | 11 | ||||
-rw-r--r-- | runtime/ftplugin/registry.vim | 36 |
3 files changed, 44 insertions, 7 deletions
diff --git a/runtime/ftplugin/changelog.vim b/runtime/ftplugin/changelog.vim index 6bd7ee129..244245e27 100644 --- a/runtime/ftplugin/changelog.vim +++ b/runtime/ftplugin/changelog.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file " Language: generic Changelog file " Maintainer: Nikolai Weibull <now@bitwi.se> -" Latest Revision: 2013-12-15 +" Latest Revision: 2014-01-10 " Variables: " g:changelog_timeformat (deprecated: use g:changelog_dateformat instead) - " description: the timeformat used in ChangeLog entries. @@ -152,7 +152,7 @@ if &filetype == 'changelog' if has_key(middles, str[i + 1]) let mid = middles[str[i + 1]] let str = strpart(str, 0, i) . mid . strpart(str, i + 2) - let inc = strlen(mid) + let inc = strlen(mid) - 1 endif let i = stridx(str, '%', i + 1 + inc) endwhile diff --git a/runtime/ftplugin/cobol.vim b/runtime/ftplugin/cobol.vim index 203d73475..11ad3ad72 100644 --- a/runtime/ftplugin/cobol.vim +++ b/runtime/ftplugin/cobol.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file " Language: cobol " Author: Tim Pope <vimNOSPAM@tpope.info> -" $Id: cobol.vim,v 1.1 2007/05/05 17:24:38 vimboss Exp $ +" Last Update: By ZyX: use shiftwidth() " Insert mode mappings: <C-T> <C-D> <Tab> " Normal mode mappings: < > << >> [[ ]] [] ][ @@ -113,7 +113,7 @@ endfunction function! s:increase(...) let lnum = '.' - let sw = &shiftwidth + let sw = shiftwidth() let i = a:0 ? a:1 : indent(lnum) if i >= 11 return sw - (i - 11) % sw @@ -128,7 +128,7 @@ endfunction function! s:decrease(...) let lnum = '.' - let sw = &shiftwidth + let sw = shiftwidth() let i = indent(a:0 ? a:1 : lnum) if i >= 11 + sw return 1 + (i + 12) % sw @@ -147,7 +147,7 @@ function! CobolIndentBlock(shift) let head = strpart(getline('.'),0,7) let tail = strpart(getline('.'),7) let indent = match(tail,'[^ ]') - let sw = &shiftwidth + let sw = shiftwidth() let shift = a:shift if shift > 0 if indent < 4 @@ -221,7 +221,8 @@ endfunction function! s:Tab() if (strpart(getline('.'),0,col('.')-1) =~ '^\s*$' && &sta) return s:IncreaseIndent() - elseif &sts == &sw && &sts != 8 && &et + " &softtabstop < 0: &softtabstop follows &shiftwidth + elseif (&sts < 0 || &sts == shiftwidth()) && &sts != 8 && &et return s:repeat(" ",s:increase(col('.')-1)) else return "\<Tab>" diff --git a/runtime/ftplugin/registry.vim b/runtime/ftplugin/registry.vim new file mode 100644 index 000000000..385785ac6 --- /dev/null +++ b/runtime/ftplugin/registry.vim @@ -0,0 +1,36 @@ +" Vim filetype plugin file +" Language: Windows Registry export with regedit (*.reg) +" Maintainer: Cade Forester <ahx2323@gmail.com> +" Latest Revision: 2014-01-09 + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +let s:cpo_save = &cpo +set cpo&vim + +let b:undo_ftplugin = + \ 'let b:browsefilter = "" | ' . + \ 'setlocal ' . + \ 'comments< '. + \ 'commentstring< ' . + \ 'formatoptions< ' + + +if has( 'gui_win32' ) +\ && !exists( 'b:browsefilter' ) + let b:browsefilter = + \ 'registry files (*.reg)\t*.reg\n' . + \ 'All files (*.*)\t*.*\n' +endif + +setlocal comments=:; +setlocal commentstring=;\ %s + +setlocal formatoptions-=t +setlocal formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save |