-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc
73 lines (59 loc) · 1.65 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
syntax on
set noerrorbells
set tabstop=4 softtabstop=4
set shiftwidth=4
set expandtab
set smartindent
set nu
set relativenumber
set nowrap
set smartcase
set noswapfile
set nobackup
set undodir=~/.vim/undodir
set undofile
set incsearch
colorscheme default
set colorcolumn=80
highlight ColorColumn ctermbg=0
call plug#begin('~/.vim/plugged')
Plug 'morhetz/gruvbox'
Plug 'jremmen/vim-ripgrep'
Plug 'tpope/vim-fugitive'
Plug 'leafgarland/typescript-vim'
Plug 'vim-utils/vim-man'
Plug 'lyuts/vim-rtags'
Plug '[email protected]:kien/ctrlp.vim.git'
Plug '[email protected]:Valloric/YouCompleteMe.git'
Plug 'mbbill/undotree'
call plug#end()
colorscheme gruvbox
set background=dark
" Allows rg to detect root, search for git root and use .gitignore for
" faster search
if executable('rg')
let g:rg_derive_root='true'
endif
" Basically exclude from search
let g:ctrlp_user_command = ['.git/', 'git --git-dir=%s/.git ls-files -oc --exclude-standard']
let mapleader = " "
let g:netrw_browse_split = 4
let g:netrw_banner = 0
let g:netrw_liststyle = 4
let g:netrw_winsize = 25
let g:ctrlp_use_caching = 0
" Remaps
nnoremap <leader>h :wincmd h<CR>
nnoremap <leader>j :wincmd j<CR>
nnoremap <leader>k :wincmd k<CR>
nnoremap <leader>l :wincmd l<CR>
nnoremap <leader>u :UndotreeToggle<CR>
nnoremap <leader>pv :wincmd v<bar> :Ex <bar>:vertical resize 30<CR>
nnoremap <leader>ps :Rg<SPACE>
nnoremap <silent> <Leader>+ :vertical resize +5<CR>
nnoremap <silent> <Leader>- :vertical resize -5<CR>
" YCM
nnoremap <silent> <leader>gd :YcmCompleter Goto<CR>
nnoremap <silent> <leader>gf :YcmCompleter FixIt<CR>
" LaTeX
autocmd BufWritePost *.tex silent! execute "!pdflatex % >/dev/null 2>&1" | redraw!