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:
parent
60b825183d
commit
ac4a78f43d
2 changed files with 2 additions and 1 deletions
|
@ -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>),
|
||||||
|
|
|
@ -98,3 +98,4 @@ weaponization
|
||||||
blog
|
blog
|
||||||
flexicurity
|
flexicurity
|
||||||
indices
|
indices
|
||||||
|
Anthropocene
|
||||||
|
|
Loading…
Reference in a new issue