neovim/spec.vim

40 lines
1.2 KiB
VimL
Raw Permalink Normal View History

- Update to 0.10.2 - Features * jumplist: Allow opting out of removing unloaded buffers (#30419) - Bug Fixes * api: Error properly with invalid field in nvim_open_win (#30078) * api: Nvim_buf_get_text() crashes with large negative column #28740 * api: Fix crash/leak with float title/footer on error (#30543) * channel: Handle writing to file instead of pipe (#30520) * column: Set signcolumn width after splitting window (#30556) * completion: Don't include <Lua function> in -complete= (#30209) * decor: Don't use separate DecorSignHighlight for url (#30096) * decor: Exclude invalid marks from meta total * diagnostics: Don't apply extmarks to invalid lines #29321 * diff: Use mmfile_t in linematch * filetype: Handle .in files with no filename (#30487) * float: Properly find last window of tabpage (#30571) * health: Fix pyenv root and python exepath detect issue * health: Return correct name from 'path2name()' * lsp: Don't send foreign diagnostics to servers in buf.code_action (#29501) * lsp: Avoid reusing diagnostics from different servers in actions (#30002) * lsp: Return call hierarchy item, not the index (#30145) * lsp: Handle out-of-bounds character positions #30288 * lsp: Handle encoding bounds in str_utfindex_enc * lsp: Handle nil bytes in strings * lua: Ignore stdout and stderr for xdg-open * man: Avoid setting v:errmsg (#30052) * man: Check if buffer is valid before restoring 'tagfunc' (#30180) * regexp: Fix typo in E888 error message (#30161) * runtime: Sync bundled treesitter queries * runtime: Sync bundled treesitter queries OBS-URL: https://build.opensuse.org/package/show/editors/neovim?expand=0&rev=164
2024-10-04 07:40:33 +02:00
if exists("loaded_spec") || &cp
finish
endif
let loaded_spec = 1
function! SKEL_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()