Fix shortcuts and settings for bibtex-fzf
This commit is contained in:
parent
75195765ca
commit
3c6ef91ae0
1 changed files with 12 additions and 14 deletions
|
@ -149,11 +149,11 @@ augroup nerd_loader
|
||||||
\| endif
|
\| endif
|
||||||
augroup END
|
augroup END
|
||||||
|
|
||||||
" PLUGIN: markdown-group
|
" " PLUGIN: markdown-group
|
||||||
" unify markdown extensions to all use markdown filetype
|
" " unify markdown extensions to all use markdown filetype
|
||||||
au! BufRead,BufNewFile *.markdown set filetype=markdown
|
" au! BufRead,BufNewFile *.markdown set filetype=markdown
|
||||||
au! BufRead,BufNewFile *.md set filetype=markdown
|
" au! BufRead,BufNewFile *.md set filetype=markdown
|
||||||
au! BufRead,BufNewFile *.mkd set filetype=markdown
|
" au! BufRead,BufNewFile *.mkd set filetype=markdown
|
||||||
|
|
||||||
" automatically enables markdown plugins for md & txt files
|
" automatically enables markdown plugins for md & txt files
|
||||||
function! Prose()
|
function! Prose()
|
||||||
|
@ -163,18 +163,21 @@ function! Prose()
|
||||||
" enable extended sentence textobject use on md and plaintext files
|
" enable extended sentence textobject use on md and plaintext files
|
||||||
call textobj#sentence#init()
|
call textobj#sentence#init()
|
||||||
" hide the markdown cruft
|
" hide the markdown cruft
|
||||||
set conceallevel=2
|
setlocal conceallevel=2
|
||||||
|
setlocal foldlevel=2
|
||||||
endfunction
|
endfunction
|
||||||
" enable syntax highlighting for codeblocks WITHIN markdown
|
" enable syntax highlighting for codeblocks WITHIN markdown
|
||||||
let g:markdown_fenced_languages = ['html', 'python', 'bash=sh', 'javascipt', 'go']
|
let g:markdown_fenced_languages = ['html', 'python', 'bash=sh', 'javascipt', 'go']
|
||||||
|
|
||||||
" call the prose function defined above for any md files
|
" call the prose function defined above for any md files
|
||||||
autocmd FileType pandoc,markdown,txt,rmarkdown call Prose()
|
au FileType pandoc call Prose()
|
||||||
|
|
||||||
" or invoke it manually by writing :Prose
|
" or invoke it manually by writing :Prose
|
||||||
command! -nargs=0 Prose call Prose()
|
command! -nargs=0 Prose call Prose()
|
||||||
|
|
||||||
" PLUGIN: vim-pandoc
|
" PLUGIN: vim-pandoc
|
||||||
" handle markdown files with pandoc (and pandoc syntax!)
|
" handle markdown files with pandoc (and pandoc syntax!)
|
||||||
|
let g:pandoc#modules#disabled = ["folding"]
|
||||||
let g:pandoc#filetypes#pandoc_markdown = 1
|
let g:pandoc#filetypes#pandoc_markdown = 1
|
||||||
" disable all default keymaps
|
" disable all default keymaps
|
||||||
let g:pandoc#keyboard#use_default_mappings=0
|
let g:pandoc#keyboard#use_default_mappings=0
|
||||||
|
@ -190,7 +193,7 @@ let g:pandoc#biblio#use_preview=1
|
||||||
let g:pandoc#completion#bib#mode='citeproc'
|
let g:pandoc#completion#bib#mode='citeproc'
|
||||||
let g:pandoc#folding#fold_yaml=1
|
let g:pandoc#folding#fold_yaml=1
|
||||||
let g:pandoc#folding#fastfolds=1
|
let g:pandoc#folding#fastfolds=1
|
||||||
let g:pandoc#folding#level=2
|
" let g:pandoc#folding#level=2
|
||||||
let g:pandoc#spell#default_langs=["en_us", "de_de"]
|
let g:pandoc#spell#default_langs=["en_us", "de_de"]
|
||||||
let g:pandoc#hypertext#ausosave_on_edit_open_link=1
|
let g:pandoc#hypertext#ausosave_on_edit_open_link=1
|
||||||
let g:pandoc#hypertext#create_if_no_alternates_exists=1
|
let g:pandoc#hypertext#create_if_no_alternates_exists=1
|
||||||
|
@ -330,7 +333,7 @@ function! s:bibtex_cite_sink_insert(lines)
|
||||||
endfunction
|
endfunction
|
||||||
" insert markdown formatted reference
|
" insert markdown formatted reference
|
||||||
function! s:bibtex_markdown_sink(lines)
|
function! s:bibtex_markdown_sink(lines)
|
||||||
let r=system("bibtex-markdown -cache " . g:fzf_bibtex_cache . ' ' . g:fzf_bibtex_sources, a:lines)
|
let r=system("bibtex-markdown -cache " . g:fzf_bibtex_cache . ' ' . join(g:fzf_bibtex_sources), a:lines)
|
||||||
echo join(a:lines, '; ')
|
echo join(a:lines, '; ')
|
||||||
execute ':normal! i' . r
|
execute ':normal! i' . r
|
||||||
endfunction
|
endfunction
|
||||||
|
@ -665,11 +668,6 @@ noremap <leader>N :NV!<cr>
|
||||||
" FZF git diff
|
" FZF git diff
|
||||||
noremap <leader>gd :FzfGFiles?<cr>
|
noremap <leader>gd :FzfGFiles?<cr>
|
||||||
|
|
||||||
" insert a citation of a source using bib ref (uses academia library)
|
|
||||||
nnoremap <leader>c :CiteRef<cr>
|
|
||||||
" insert a pretty printed Markdown version of a reference
|
|
||||||
nnoremap <leader>CM :CitePretty<cr>
|
|
||||||
|
|
||||||
" Mostly dealing with Prose writing from here on out
|
" Mostly dealing with Prose writing from here on out
|
||||||
" Format current Paragraph (esp useful in prose writing)
|
" Format current Paragraph (esp useful in prose writing)
|
||||||
nnoremap <silent> <leader>q gqap
|
nnoremap <silent> <leader>q gqap
|
||||||
|
|
Loading…
Reference in a new issue