Add neovim for real

This commit is contained in:
Fabian Ising
2018-07-29 16:29:44 +02:00
parent 1a47a9f316
commit 47d4930bcc
200 changed files with 28808 additions and 1 deletions

29
nvim/ftplugin/tex.vim Normal file
View File

@@ -0,0 +1,29 @@
set formatoptions+=1rnmBa
" Reformat lines (getting the spacing correct) {{{
fun! TeX_fmt()
if (getline(".") != "")
let save_cursor = getpos(".")
let op_wrapscan = &wrapscan
set nowrapscan
let par_begin = '^\(%D\)\=\s*\($\|\\begin\|\\end\|\\\[\|\\\]\|\\\(sub\)*section\>\|\\item\>\|\\NC\>\|\\blank\>\|\\noindent\>\)'
let par_end = '^\(%D\)\=\s*\($\|\\start\|\\stop\|\\Start\|\\place\|\\\(sub\)*section\>\|\\item\>\|\\NC\>\|\\blank\>\)'
try
exe '?'.par_begin.'?+'
catch /E384/
1
endtry
norm V
try
exe '/'.par_end.'/-'
catch /E385/
$
endtry
norm gq
let &wrapscan = op_wrapscan
call setpos('.', save_cursor)
endif
endfun
nmap Q :call TeX_fmt()<CR>
" }}}