dotfiles/vim/.vim/init.vim
2026-03-30 20:46:28 +02:00

41 lines
1.1 KiB
VimL

set ts=4 sw=4
set wrap!
set number
set incsearch
set cursorline
set scrolloff=2
set completeopt=menuone,noinsert
augroup FocusNumbers
autocmd!
autocmd WinEnter,BufEnter * setlocal relativenumber
autocmd WinLeave,BufLeave * setlocal norelativenumber
augroup END
let g:vimtex_view_method = 'general'
let g:vimtex_compiler_method = 'pdflatex'
let g:vimtex_compiler_pdflatex = {
\ 'build_dir' : 'build',
\ 'callback' : 1,
\ 'continuous' : 0,
\ 'options' : [
\ '-verbose',
\ '-file-line-error',
\ '-synctex=1',
\ '-interaction=nonstopmode',
\ ],
\}
let g:vimtex_quickfix_mode = 2
let g:vimtex_quickfix_open_on_warning = 0
augroup LatexAbbrev
autocmd!
autocmd FileType tex inoreabbrev <buffer> sec \section{}<Left>
autocmd FileType tex inoreabbrev <buffer> ssec \subsection{}<Left>
autocmd FileType tex inoreabbrev <buffer> bf \textbf{}<Left>
autocmd FileType tex inoreabbrev <buffer> it \textit{}<Left>
autocmd FileType tex inoreabbrev <buffer> href \href{}{}<Left><Left><Left>
autocmd FileType tex inoreabbrev <buffer> enum \begin{itemize}<CR>\item<CR>\end{itemize}<Up>
augroup END