-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc
122 lines (102 loc) · 3.79 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
set nocompatible " be iMproved, required
filetype off " required <<========== We can turn it on later
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
" <============================================>
" Specify the plugins you want to install here.
" We'll come on that later
" the nord color theme - however this doesnt immediately work with lightline
" and breaks the tmuxline construction
" Plugin 'arcticicestudio/nord-vim'
Plugin 'tpope/vim-fugitive'
Plugin 'RltvNmbr.vim'
Plugin 'zxqfl/tabnine-vim'
Plugin 'tpope/vim-commentary'
Plugin 'itchyny/lightline.vim'
Bundle 'edkolev/tmuxline.vim'
" tmuxline requires powerline font (https://github.com/powerline/fonts) to work correctly, creates file ~/.tmuxlinesnapshot
Plugin 'ntpeters/vim-better-whitespace'
Plugin 'mbbill/undotree'
Plugin 'ludovicchabant/vim-gutentags'
Plugin 'lervag/vimtex'
Plugin 'luochen1990/rainbow'
" <============================================>
" All of your Plugins must be added before the following line
if !has('gui_running')
set t_Co=256
endif
set laststatus=2
call vundle#end() " required
filetype plugin indent on " required
" To ignore plugin indent changes, instead use:
"filetype plugin on
"
" Brief help
" :PluginList - lists configured plugins
" :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate
" :PluginSearch foo - searches for foo; append `!` to refresh local cache
" :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal
"
" see :h vundle for more details or wiki for FAQ
" Put your non-Plugin stuff after this line
" Put the rest of your .vimrc file here
filetype plugin indent on
" show existing tab with 4 spaces width
set tabstop=4
" when indenting with '>', use 4 spaces width
set shiftwidth=4
" On pressing tab, insert 4 spaces
set expandtab
" allow more than 10 open tabs from vim -p https://unix.stackexchange.com/questions/30665/gvim-p-limit-of-opened-tabs
set tabpagemax=100
" supposed to fix bug with tmux
set background=dark
" so lightline doesnt show a second bar
set noshowmode
" spellcheck: use both german and british english
set spelllang=en_gb,de_de
" intellisense like text completion
filetype plugin on
set omnifunc=syntaxcomplete#Complete
"Customization for tmuxline, this replaces config of statusline in .vimrc
let g:tmuxline_preset = {
\'a' : ['%a %d.%m. %R', '#S'],
\'b' : '#W',
\'c' : '#{prefix_highlight}',
\'win' : '#I #W',
\'cwin' : '#I #W',
\'z' : '#(gitmux -cfg ~/.gitmux.conf "#{pane_current_path}")'}
" the prefix_highlight line: https://github.com/tmux-plugins/tmux-prefix-highlight
" the "#(gitmux..' line allows gitmux = git info in statusline https://github.com/arl/gitmux/
set number
set cursorline
" auto-enable the RltvNmbr.vim Plugin on startup, using the answer from https://stackoverflow.com/questions/6821033/vim-how-to-run-a-command-immediately-when-starting-vim
autocmd VimEnter * RltvNmbr
set foldmethod=syntax
"convenience function to insert line numbers into the text
function! LineNumberInsert()
:%s/^/\=printf('%-4d', line('.'))
endfunction
" fugitive merge keys
nmap <leader>gf :diffget //2<CR>
nmap <leader>gj :diffget //3<CR>
" enable shell escape for vim-latex (for minted package)
let g:vimtex_compiler_latexmk = {
\ 'build_dir' : './build',
\ 'options' : [
\ '-pdf',
\ '-shell-escape',
\ '-verbose',
\ '-file-line-error',
\ '-synctex=1',
\ '-interaction=nonstopmode',
\ '--file-line-error',
\ ],
\}
set clipboard=unnamedplus
let g:rainbow_active = 1