-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc
151 lines (118 loc) Β· 2.95 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
"" START Vim-Plug PLUGIN MANAGER ""
" Install vim-plug if not found
if empty(glob('~/.vim/autoload/plug.vim'))
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
endif
" Run PlugInstall if there are missing plugins
autocmd VimEnter * if len(filter(values(g:plugs), '!isdirectory(v:val.dir)'))
\| PlugInstall --sync | source $MYVIMRC
\| endif
set nocompatible
" Required:
call plug#begin()
Plug 'tpope/vim-abolish'
Plug 'flazz/vim-colorschemes'
Plug 'tpope/vim-commentary'
Plug 'drmikehenry/vim-fontsize'
Plug 'tpope/vim-fugitive'
Plug 'tpope/vim-eunuch'
Plug 'tpope/vim-jdaddy'
Plug 'tpope/vim-ragtag'
Plug 'tpope/vim-repeat'
Plug 'tpope/vim-surround'
Plug 'machakann/vim-swap'
Plug 'triglav/vim-visual-increment'
Plug 'tpope/vim-unimpaired'
Plug 'lervag/vimtex'
" Required:
call plug#end()
" Required:
filetype plugin indent on
" Load python faster in nvim
let g:python3_host_prog = '/usr/bin/python3'
" Make command line two lines high
set cmdheight=2
" Hide the mouse when typing text
set mousehide
"" VIMTEX OPTIONS ""
let g:tex_flavor='latex'
let g:vimtex_view_method = 'zathura'
"let g:vimtex_view_general_options_latexmk = '-reuse-instance'
let g:vimtex_compiler_latexmk = {
\ 'build_dir' : '.build',
\ 'options' : [
\ '-pdf',
\ '-shell-escape',
\ '-verbose',
\ '-file-line-error',
\ '-synctex=1',
\ '-interaction=nonstopmode',
\ ],
\}
"" YCM TIGGERS ""
" Triggers for vimtex
if !exists('g:ycm_semantic_triggers')
let g:ycm_semantic_triggers = {}
endif
let g:ycm_semantic_triggers.tex = g:vimtex#re#youcompleteme
if has('gui_running')
set guifont=Monospace\ 12
autocmd GUIEnter * call system('wmctrl -i -b add,maximized_vert,maximized_horz -r '.v:windowid)
set toolbariconsize=giant
endif
" Commands specific to vim
" (many are defaults in nvim)
if !has('nvim')
set autoindent
set backspace=indent,eol,start
set belloff=all
set encoding=utf-8
set ttymouse=xterm2
set wildmenu
endif
set nu
set tabstop=4
set softtabstop=4
set shiftwidth=4
set expandtab
set smartindent
set spell
colorscheme lyla
set wildmode=longest,list
set ignorecase
set smartcase
set lazyredraw
" Split behaviour
set splitbelow
set splitright
set undofile
set undodir=$HOME/.vim/undo/
set directory=$HOME/.vim/swap/
set backupdir=$HOME/.vim/backup/
" Automatically change to file directory
" set autochdir
"" REMAPS ""
" Lazy escape
imap jk <ESC>
imap kj <ESC>
" Map Y to act like D/C
map Y y$
" Status line
set laststatus=2
set statusline=
"set statusline=%{FugitiveStatusline()}
set statusline+=%#PmenuSel#
set statusline+=%#LineNr#
set statusline+=\ %F
set statusline+=%m\
set statusline+=%=
set statusline+=%#CursorColumn#
set statusline+=\ %y
set statusline+=\ %l:%c
set statusline+=\ %p%%
set statusline+=\
" Enable clipboard support
" Make shift-insert insert clipboard
map <S-Insert> <MiddleMouse>
map! <S-Insert> <MiddleMouse>