* patch 9.1.1508: string manipulation can be improved in cmdexpand.c * runtime(vim): Update base-syntax and generator, match all default highlight groups * runtime(vim): Update base-syntax and generator, generate command modifiers * patch 9.1.1507: symlinks are resolved on :cd commands * runtime(postscr): Correct some standard font names in syntax * runtime(optwin): show 'guiligatures' option also on MS-Windows builds * patch 9.1.1506: tests: missing cleanup in Test_search_cmdline_incsearch_highlight() * patch 9.1.1505: not possible to return completion type for :ex command * patch 9.1.1504: filetype: numbat files are not recognized * patch 9.1.1503: filetype: haxe files are not recognized * patch 9.1.1502: filetype: quickbms files are not recognized * patch 9.1.1501: filetype: flix files are not recognized * runtime(go): add section movement mappings to ftplugin * runtime(doc): Tweak documentation style * patch 9.1.1500: if_python: typo in python error variable * runtime(tutor): regenerate utf-8 version of French vimtutor manpage * runtime(netrw): upstream snapshot of v183 * runtime(vim): Update base-syntax, improve :syn-sync line defaults * patch 9.1.1498: completion: 'complete' funcs behave different to 'omnifunc' * patch 9.1.1497: Link error with shm_open() * patch 9.1.1496: terminal: still not highlighting empty cells correctly * README: mention POSIX vi as a goal of this project * patch 9.1.1495: Wayland: uses $XDG_SEAT to determine seat * patch 9.1.1494: runtime(tutor): no French translation for Chapter 2 * runtime(tutor): apply fixes to runtime/tutor/tutor2 * translation(it): updated Italian manpage * patch 9.1.1493: manually comparing positions on buffer * nsis: copy tutor directory recursively * patch 9.1.1492: tests: failure when Wayland compositor fails to start OBS-URL: https://build.opensuse.org/package/show/editors/vim?expand=0&rev=895
41 lines
1.2 KiB
VimL
41 lines
1.2 KiB
VimL
if exists("loaded_spec") || &cp
|
|
finish
|
|
endif
|
|
let loaded_spec = 1
|
|
|
|
function! SKEL_spec()
|
|
0r /usr/share/vim/current/skeletons/skeleton.spec
|
|
language time en_US
|
|
if $USER != ''
|
|
let login = $USER
|
|
elseif $LOGNAME != ''
|
|
let login = $LOGNAME
|
|
else
|
|
let login = 'unknown'
|
|
endif
|
|
let newline = stridx(login, "\n")
|
|
if newline != -1
|
|
let login = strpart(login, 0, newline)
|
|
endif
|
|
if $HOSTNAME != ''
|
|
let hostname = $HOSTNAME
|
|
else
|
|
let hostname = system('hostname -f')
|
|
if v:shell_error
|
|
let hostname = 'localhost'
|
|
endif
|
|
endif
|
|
let newline = stridx(hostname, "\n")
|
|
if newline != -1
|
|
let hostname = strpart(hostname, 0, newline)
|
|
endif
|
|
exe "%s/specCURRENT_YEAR/" . strftime("%Y") . "/ge"
|
|
exe "%s/specRPM_CREATION_DATE/" . strftime("%a\ %b\ %d\ %Y") . "/ge"
|
|
exe "%s/specRPM_CREATION_AUTHOR_MAIL/" . login . "@" . hostname . "/ge"
|
|
exe "%s/specRPM_CREATION_NAME/" . expand("%:t:r") . "/ge"
|
|
setf spec
|
|
endfunction
|
|
|
|
" Skeleton for spec files
|
|
autocmd BufNewFile *.spec call SKEL_spec()
|