nvim: Fix bibcite insertion position

Fixed the position of my BibTex citations to be in front of the cursor
not appended to it (i.e. using `i` instead of `a`).

That means for example `sometext <insertioninvoked>.` will put the
insertion *before* the full stop instead of after it, which was kind of
weird.
This commit is contained in:
Marty Oehme 2021-04-18 12:02:09 +02:00
parent 60b825183d
commit ac4a78f43d
Signed by: Marty
GPG key ID: B7538B8F50A1C800
2 changed files with 2 additions and 1 deletions

View file

@ -20,7 +20,7 @@ endfunction
" insert citation from normal mode at cursor (with brackets) " insert citation from normal mode at cursor (with brackets)
function! s:bibtex_cite_sink(lines) function! s:bibtex_cite_sink(lines)
let r=system("bibtex-cite ", a:lines) let r=system("bibtex-cite ", a:lines)
execute ':normal! a[' . r . ']' execute ':normal! i[' . r . ']'
endfunction endfunction
command! -bang -nargs=* CiteRef call fzf#run(fzf#wrap({ command! -bang -nargs=* CiteRef call fzf#run(fzf#wrap({
\ 'source': <sid>bibtex_ls(<q-args>), \ 'source': <sid>bibtex_ls(<q-args>),

View file

@ -98,3 +98,4 @@ weaponization
blog blog
flexicurity flexicurity
indices indices
Anthropocene