-
Notifications
You must be signed in to change notification settings - Fork 0
/
vimrc
94 lines (78 loc) · 3.1 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
" For Vundle
set nocompatible " be iMproved, required
filetype off " required
" 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'
" Put in all Plugins here
" Plugin 'Valloric/YouCompleteMe'
" Plugin 'artur-shaik/vim-javacomplete2'
" autocmd FileType java setlocal omnifunc=javacomplete#Complete
Plugin 'vim-airline/vim-airline'
Plugin 'scrooloose/nerdtree'
" Plugin 'lervag/vimtex'
" ':Goyo' toggles distraction free mode
Plugin 'junegunn/goyo.vim'
" Git wrapper for vim
" Plugin 'tpope/vim-fugitive'
" Enables keystrokes for surrounding characters like '(' and '['
Plugin 'tpope/vim-surround'
" Adds rainbow colors for matching parentheses
Plugin 'luochen1990/rainbow'
let g:rainbow_active = 1 "set to 0 if you want to enable it later via :RainbowToggle
" 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
" Auto closes scratch window in YouCompleteMe
let g:ycm_autoclose_preview_window_after_completion = 1
let g:ycm_autoclose_preview_window_after_insertion = 1
set laststatus=2
syntax enable
set number
set autoindent
set smartindent
set expandtab
set tabstop=4
set shiftwidth=4
set softtabstop=4
au BufRead,BufNewFile *.js set tabstop=2
au BufRead,BufNewFile *.js set shiftwidth=2
au BufRead,BufNewFile *.js set softtabstop=2
au BufRead,BufNewFile *.tsx set tabstop=2
au BufRead,BufNewFile *.tsx set shiftwidth=2
au BufRead,BufNewFile *.tsx set softtabstop=2
" Highlights all search matches
set hlsearch
inoremap jk <esc>
inoremap JK <esc>
map <C-n> :NERDTreeToggle<CR>
" Changes the split navigations
nnoremap <C-j> <C-W><C-J>
nnoremap <C-k> <C-W><C-K>
nnoremap <C-h> <C-W><C-H>
nnoremap <C-l> <C-W><C-L>
" Defaults splitscreen to bottom right
set splitbelow
set splitright
" Turns on spell checker for txt files
" use 'z=' when in Normal mode on mispelled word to get suggestions
" use 'zg' to add a highlighted word to user dictionary
" When the spellcheck is active, you should see 'SPELL' next to mode name
" au BufRead,BufNewFile *.txt set spell spelllang=en_us
au BufRead,BufNewFile *.tex set spell spelllang=en_us
au BufRead,BufNewFile *.tex command! Refresh execute "w | execute \"silent !latexmk -pdf % && latexmk -c\" | redraw!"
au BufRead,BufNewFile /Users/rohan/Documents/UCSD/Representation\ Theory/Senior_Thesis/* command! Refresh execute "w | execute \"silent !latexmk -pdf honors_thesis.tex && latexmk -c\" | redraw!"
au BufRead,BufNewFile *.tex map <C-s> :Refresh<CR>
au BufRead,BufNewFile *.tex set tw=111