Updated runtime files.

This commit is contained in:
Bram Moolenaar
2015-06-09 19:44:55 +02:00
parent d0d0fe09cf
commit f2571c61d5
22 changed files with 505 additions and 176 deletions

View File

@ -1,6 +1,10 @@
" Vim filetype plugin file
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
" Vim syntax file
" Maintainer: Christian Brabandt <cb@256bit.org>
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2015-05-29
" License: Vim (see :h license)
" Repository: https://github.com/chrisbra/vim-kconfig
if exists("b:did_ftplugin")
finish
@ -14,5 +18,10 @@ let b:undo_ftplugin = "setl com< cms< fo<"
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
" For matchit.vim
if exists("loaded_matchit")
let b:match_words = '^\<menu\>:\<endmenu\>,^\<if\>:\<endif\>,^\<choice\>:\<endchoice\>'
endif
let &cpo = s:cpo_save
unlet s:cpo_save

View File

@ -2,7 +2,7 @@
" Filename: spec.vim
" Maintainer: Igor Gnatenko i.gnatenko.brain@gmail.com
" Former Maintainer: Gustavo Niemeyer <niemeyer@conectiva.com> (until March 2014)
" Last Change: Fri Feb 20 16:01 MSK 2014 Igor Gnatenko
" Last Change: Mon Jun 01 21:15 MSK 2015 Igor Gnatenko
if exists("b:did_ftplugin")
finish
@ -22,11 +22,36 @@ if !hasmapto("call <SID>SpecChangelog(\"\")<CR>")
noremap <buffer> <unique> <script> <Plug>SpecChangelog :call <SID>SpecChangelog("")<CR>
endif
if !exists("*s:GetRelVer")
function! s:GetRelVer()
if has('python')
python << PYEND
import sys, datetime, shutil, tempfile
import vim
try:
import rpm
except ImportError:
pass
else:
specfile = vim.current.buffer.name
if specfile:
spec = rpm.spec(specfile)
headers = spec.packages[0].header
version = headers['Version']
release = ".".join(headers['Release'].split(".")[:-1])
vim.command("let ver = " + version)
vim.command("let rel = " + release)
PYEND
endif
endfunction
endif
if !exists("*s:SpecChangelog")
function s:SpecChangelog(format)
if strlen(a:format) == 0
if !exists("g:spec_chglog_format")
let email = input("Email address: ")
let email = input("Name <email address>: ")
let g:spec_chglog_format = "%a %b %d %Y " . l:email
echo "\r"
endif
@ -71,6 +96,9 @@ if !exists("*s:SpecChangelog")
else
let include_release_info = 0
endif
call s:GetRelVer()
if (chgline == -1)
let option = confirm("Can't find %changelog. Create one? ","&End of file\n&Here\n&Cancel",3)
if (option == 1)
@ -85,7 +113,7 @@ if !exists("*s:SpecChangelog")
endif
endif
if (chgline != -1)
let parsed_format = "* ".strftime(format)
let parsed_format = "* ".strftime(format)." - ".ver."-".rel
let release_info = "+ ".name."-".ver."-".rel
let wrong_format = 0
let wrong_release = 0

View File

@ -1,7 +1,10 @@
" Vim filetype plugin file
" Language: Zsh shell script
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2011-01-23
" Language: Zsh shell script
" Maintainer: Christian Brabandt <cb@256bit.org>
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2015-05-29
" License: Vim (see :h license)
" Repository: https://github.com/chrisbra/vim-zsh
if exists("b:did_ftplugin")
finish