-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc-minimal
214 lines (167 loc) · 5.31 KB
/
.vimrc-minimal
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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
" Don't try to be vi compatible
set nocompatible
" Helps force plugins to load correctly when it is turned back on below
filetype off
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
Plugin 'vim-airline/vim-airline'
Plugin 'vim-airline/vim-airline-themes'
" Plugin 'lervag/vimtex'
Plugin 'python-mode/python-mode'
" Plugin 'ycm-core/YouCompleteMe'
Plugin 'SirVer/ultisnips'
Plugin 'honza/vim-snippets'
Plugin 'mg979/vim-visual-multi'
Plugin 'craigemery/vim-autotag'
" Plugin 'iamcco/markdown-preview.nvim'
Plugin 'godlygeek/tabular'
" Plugin 'plasticboy/vim-markdown'
Plugin 'preservim/nerdtree'
Plugin 'morhetz/gruvbox' " colourscheme
Plugin 'christoomey/vim-tmux-navigator'
" All of your Plugins must be added before the following line
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
filetype plugin indent on " required
" change where swp and backup files are stored
set undodir=~/.vim/.undo/
set backupdir=~/.vim/backup/
set directory=~/.vim/.swp/
" Security
set modelines=0
" Show line numbers
set number
" Ultisnips configuration
" Trigger configuration. You need to change this to something else than <tab>
" if you use https://github.com/Valloric/YouCompleteMe.
let g:UltiSnipsExpandTrigger ="<c-h>"
let g:UltiSnipsJumpForwardTrigger ="<c-b>"
let g:UltiSnipsJumpBackwardTrigger ="<c-z>"
" If you want :UltiSnipsEdit to split your window.
let g:UltiSnipsEditSplit="vertical"
" Remap the leader to comma
let mapleader=","
let maplocalleader='\\'
" Enable syntax processing
syntax enable
" Show file stats
set ruler
" Turn of the annoying bells
set belloff=all
" Encoding
set encoding=utf-8
" Whitespace
set wrap
set textwidth=79
set formatoptions=tcqrn1
set tabstop=8 " number of visual spaces per tab
set shiftwidth=4 " number of spaces in tab when editing
set softtabstop=4
set expandtab
set noshiftround
set wildmenu " visual autocomplete for command menu
set showmatch " highlight matching parenthesis
" Move up or down the editor lines
nnoremap j gj
nnoremap k gk
" Show the status line
set laststatus=2
" Search related stuff
set incsearch " search as characters are enteres
set hlsearch " highlight search matches
" turn off search highlight after enter
nnoremap <leader><space> :nohlsearch<CR>
filetype indent on " load file-type specific indent files
filetype on "let vim detect the filetype
" reload vimrc config
map <leader>s :source ~/.vimrc<CR>
" remove whitespace on save
autocmd BufWritePre * %s/\s\+$//e
" Search related stuff
set incsearch " search as characters are enteres
" Search related stuff
set hlsearch " highlight search matches
" turn off search highlight after enter
nnoremap <leader><space> :nohlsearch<CR>
set ignorecase " ignore case when searching
set smartcase " include case if a case in search is upper
set hidden
set history=100
" switch to previously viewed file
nnoremap <leader><leader> :e#<CR>
" change default filetype to tex instead of plaintex
let g:tex_flavor='latex'
" change netrw configuration
let g:netrw_liststyle = 3
let g:netrw_banner = 0
let g:netrw_winsize = 25
let g:netrw_browse_split = 4
" map the escape key to various key combinations
inoremap jj <Esc>
inoremap jk <Esc>
" control screen split and navigation
nnoremap <C-J> <C-W><C-J>
nnoremap <C-K> <C-W><C-K>
nnoremap <C-L> <C-W><C-L>
nnoremap <C-H> <C-W><C-H>
" key map to add clipboard copy and paste
:inoremap <C-v> <ESC>"+pa
:vnoremap <C-c> "+y
:vnoremap <C-d> "+d
set splitbelow
set splitright
" add some support for tab completion
set wildmode=longest,list,full
set wildmenu
" change clipboard config in visual mode
vnoremap <cr> "+y<cr>
vnoremap <BS> "+p<cr>
" allow vim access to the system clipboard
set clipboard=unnamed
if (has("termguicolors"))
set termguicolors
"" This is only necessary if you use "set termguicolors".
let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
endi
" Color scheme (terminal)
set background=light
colorscheme gruvbox
" set powerline colorscheme
let g:airline_theme='distinguished'
let g:airline_powerline_fonts = 1
" python stuff
let g:pymode_syntax = 1
let g:pymode_syntax_all = 1
let g:pymode_warnings = 0
let g:pymode_lint_cwindow = 0
let g:pymode_folding = 0
" Turn on spellcheck for latex and markdown files
autocmd BufRead,BufNewFile *.md setlocal spell spelllang=en_gb
autocmd BufRead,BufNewFile *.tex setlocal spell spelllang=en_gb
" Add tags file
set tags=./tags,tags;$HOME
" vim-markdown config
autocmd FileType markdown normal zR
let g:vim_markdown_conceal = 0
let g:vim_markdown_math = 1
let g:vim_markdown_frontmatter = 1
"" Markdownn previewer config
"let g:mkdp_markdown_css = '/home/vinulw/global_css/github-markdown-css/github-markdown.css'
"let g:mkdp_refresh_slow = 1
" Make the working directory the same as the current file
set autochdir