From a48b9cb9b9f4a2a85a7132f26b04bee7372bbf4f Mon Sep 17 00:00:00 2001 From: Gabriel Ebner Date: Wed, 8 Oct 2014 16:41:06 +0200 Subject: [PATCH] vim: add non-functional latex paragraph text object --- latexmkrc | 2 +- vimrc | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/latexmkrc b/latexmkrc index e200ee8..da27bec 100644 --- a/latexmkrc +++ b/latexmkrc @@ -1,3 +1,3 @@ -$pdf_previewer = 'evince %O %S'; +$pdf_previewer = 'zathura %O %S'; $pdf_mode = 1; push @extra_pdflatex_options, '-interaction=nonstopmode'; diff --git a/vimrc b/vimrc index 9871aac..e254ff1 100644 --- a/vimrc +++ b/vimrc @@ -69,6 +69,9 @@ NeoBundle 'idris-hackers/idris-vim' NeoBundle 'tpope/vim-fugitive' " git integration +NeoBundle 'kana/vim-textobj-user' +NeoBundle 'rbonvall/vim-textobj-latex' + " vim-sleuth? call neobundle#end() @@ -90,6 +93,15 @@ au BufReadCmd *.epub call zip#Browse(expand("")) au syntax haskell setl omnifunc=necoghc#omnifunc let g:necoghc_enable_detailed_browse=1 +" better paragraph object for tex files FIXME +call textobj#user#plugin('latexparagraph', { +\ 'paragraph': { +\ 'pattern': ['\n\s*\n\\|\\end\\|\\begin', '\n\s*\n\\|\\begin\\|\\end'], +\ 'select-a': 'al', +\ 'select-i': 'il', +\ }, +\ }) + " disable annoying "file is read-only" warnings au FileChangedRO * set noreadonly