-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc
93 lines (69 loc) · 2.03 KB
/
.vimrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
set clipboard+=unnamedplus
set mouse=a
set number
call plug#begin('~/.local/share/nvim/plugged')
"Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
"Plug g:plug_home.'/vim-jml'
Plug 'vim-airline/vim-airline'
Plug 'morhetz/gruvbox'
Plug 'ryanoasis/vim-devicons'
Plug 'lervag/vimtex'
Plug 'FredKSchott/CoVim'
call plug#end()
" Enable folding with the spacebar
nnoremap <space> za
set encoding=UTF-8
" spell checking
setlocal spell spelllang=de_de,en_us
"DEOPLETE
let g:deoplete#enable_at_startup = 1
autocmd InsertLeave,CompleteDone * if pumvisible() == 0 | pclose | endif
"AIRLINE
let g:airline_powerline_fonts = 1
"GRUVBOX
let g:gruvbox_italic=1
colorscheme gruvbox
set background=dark
set termguicolors
"2 spaces instead of tab
set tabstop=2
set shiftwidth=2
set expandtab
set softtabstop=0
set smarttab
" ------------------------------------------------
" VIMTEX
" ------------------------------------------------
" use neovim-remote to search stuff in the pdf viewer
let g:vimtex_compiler_progname = 'nvr'
" leader required to use the texvim mappings
let maplocalleader = "."
"
" enable deoplete completion
if !exists('g:deoplete#omni#input_patterns')
let g:deoplete#omni#input_patterns = {}
endif
let g:deoplete#omni#input_patterns.tex = g:vimtex#re#deoplete
" enable the vimtex folds
let g:vimtex_fold_enabled = 1
" Compile Latex with F5
:inoremap <F5> <C-\><C-N>:VimtexCompile<CR>
:nnoremap <F5> :VimtexCompile<CR>
" Delete auxiliary files when you quit vim
augroup vimtex_config
au!
au User VimtexEventQuit call vimtex#compiler#clean(0)
au User VimtexEventQuit call delete(expand('%:r') . '.synctex.gz')
augroup END
let g:vimtex_view_method = 'mupdf'
" Close viewers on quit
function! CloseViewers()
if executable('xdotool') && exists('b:vimtex')
\ && exists('b:vimtex.viewer') && b:vimtex.viewer.xwin_id > 0
call system('xdotool windowclose '. b:vimtex.viewer.xwin_id)
endif
endfunction
augroup vimtex_event_2
au!
au User VimtexEventQuit call CloseViewers()
augroup END