-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc
187 lines (137 loc) · 4.58 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
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
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Plugins - General
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Setting up Vundle
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
" Color schemes
Plugin 'altercation/vim-colors-solarized'
Plugin 'morhetz/gruvbox'
Plugin 'Rigellute/rigel'
Plugin 'sainnhe/everforest'
" NERDTree -- File browser in vim
Plugin 'scrooloose/nerdtree'
" NERDcommenter -- Auto comment out lines
Plugin 'scrooloose/nerdcommenter'
" Ctlr-P Stuff
Plugin 'kien/ctrlp.vim'
" Insert or delete brackets, parens, quotes in pair
Plugin 'jiangmiao/auto-pairs'
Plugin 'Rainbow-Parenthesis'
" vim-airline
Plugin 'vim-airline/vim-airline'
" Markdown preview
Plugin 'JamshedVesuna/vim-markdown-preview'
" Vim Personal Wiki
Plugin 'vimwiki/vimwiki'
" Proper pep8 indents for python
Plugin 'hynek/vim-python-pep8-indent' " Python
" Auto-complete tags in html
Plugin 'alvan/vim-closetag' " HTML
" Better CSS Highlighting for Vim
Plugin 'hail2u/vim-css3-syntax' " CSS
"Beautifier for JavaScript
Plugin 'beautify-web/js-beautify' " JavaScript
" Javascript indentation help
Plugin 'JavaScript-Indent' " JavaScript
" Better JS syntax highlighting
Plugin 'pangloss/vim-javascript' " JavaScript
" JSX Syntax Highlighting
Plugin 'mxw/vim-jsx' " React JS
" Auto-complete for Java
Plugin 'artur-shaik/vim-javacomplete2' " Java
" Go development plugin for Vim
Plugin 'fatih/vim-go' " Golang
"Required for Vundle
call vundle#end()
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" General
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set encoding=utf-8
set scrolloff=5
set showmode " Displays current mode
set ruler " Shows line and column of position
set number
set backspace=indent,eol,start
set noswapfile " Disables swap files
fixdel " Better functionality for delete key
set mouse=a
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Indentation, column highlighting, Search/Replace
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set tabstop=4 " Indent to four spaces
set expandtab " Spaces, not tabs
set autoindent
set smartindent
set wrap " Lines wrap
set cursorcolumn " Column cursorline
set relativenumber
set ignorecase " Ignores case when searching
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Key Bindings
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Rebind line navigation keys
nnoremap j gj
nnoremap k gk
nnoremap H ^
nnoremap L $
" Rebind back a word keys
nnoremap w b
"Change windows with <C-movement>
nnoremap <C-h> <C-w>h
nnoremap <C-j> <C-w>j
noremap <C-k> <C-w>k
nnoremap <C-l> <C-w>l
" Copying to system clipboard
vnoremap <C-c> "+y
" Toggle paste mode
nnoremap <C-p> :set paste!<cr>
" Entering command mode with ; instead of :
nnorema ; :
" Exiting insert mode
inoremap jk <ESC>
inoremap JK <ESC>
" Open NERDTree with ctrl+n
map <C-n> :NERDTreeToggle<CR>
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" General/Plugin Settings
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""
syntax enable on
filetype plugin indent on
filetype plugin on
set tabstop=4
set shiftwidth=4
" Nerdtree settings
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") && b:NERDTreeType == "primary") | q | endif
" Ctrl-P stuff
set runtimepath^=~/.vim/bundle/ctrlp.vim
set wildignore+=*.class,*.o,*.a,*.pyc
let g:ctrlp_custom_ignore= '\v(.*[\/](node_modules|doc|build|bin|gen|res)[\/].*)|(*.(o|class))'
" Vim markdown preview configurations
let vim_markdown_preview_hotkey='<C-m>'
let vim_markdown_preview_browser='Google Chrome'
""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" ColorScheme and Their Settings
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""
if exists('+termguicolors')
let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
set termguicolors
endif
set background=dark
let g:everforest_background = 'hard'
colorscheme everforest
let g:airline_theme = 'everforest'
let g:everforest_italic_comment = 1
let g:everforest_better_performance = 1
"let g:gruvbox_contrast_dark="hard"
"colorscheme gruvbox
"let g:airline_theme = 'gruvbox'
"let g:javascript_plugin_flow = 1
"colorscheme rigel
"let g:rigel_airline = 1
"let g:airline_theme = 'rigel'