-
Notifications
You must be signed in to change notification settings - Fork 1
/
vimrc
149 lines (116 loc) · 2.91 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
set nocompatible
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'
" /// PLUGINS ///
" <============================================>
Plugin 'tpope/vim-surround'
Plugin 'scrooloose/nerdTree'
Plugin 'itchyny/lightline.vim'
Plugin 'pangloss/vim-javascript'
Plugin 'scrooloose/nerdcommenter'
Plugin 'kien/ctrlp.vim'
Plugin 'altercation/vim-colors-solarized'
Plugin 'nathanaelkane/vim-indent-guides'
Plugin 'honza/vim-snippets'
Plugin 'scrooloose/syntastic'
Plugin 'junegunn/fzf'
Plugin 'mattn/emmet-vim'
Plugin 'valloric/youcompleteme'
" <============================================>
call vundle#end() " required
filetype plugin indent on " required
syntax on
set background=dark
"set t_Co=256
"let g:onedark_termcolors=256
"packadd! onedark.vim
"colorscheme onedark
filetype plugin indent on
" set runtimepath^=~/.vim/bundle/ctrlp.vim
" let g:ctrlp_map = '<c-p>'
" let g:ctrlp_cmd = 'CtrlP'
" Toggle nerdtree with F10
map <C-n> :NERDTreeToggle<CR>
" Current file in nerdtree
map <F9> :NERDTreeFind<CR>
"let NERDTreeMinimalUI = 1
" let NERDTreeDirArrows = 1
"set mouse=a
let g:NERDTreeMouseMode=3
let g:indentLine_setColors = 0
let g:indentLine_char = 'c'
set tabstop=2
set shiftwidth=2
set expandtab
" Column guide
"set colorcolumn=80,100
"hi ColorColumn ctermbg=DarkGray guibg=DarkGray
set laststatus=2
set noshowmode
"Syntastic Settings for New Users
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0
let g:syntastic_javascript_checkers = ['jshint']
let g:syntastic_javascript_eslint_exe = 'npm run lint --'
let g:syntastic_quiet_messages = {
\ "!level": "errors",
\ "type": "style" }
set hlsearch
set ignorecase
set incsearch
set smartcase
set encoding=utf-8
let maplocalleader = "\\"
inoremap jk <esc>
inoremap kj <esc>
inoremap <silent>jj <esc>
inoremap <silent>kk <esc>
inoremap C-h <L>
set notimeout
set nottimeout
nmap <Up> <NOP>
nmap <Down> <NOP>
nmap <Left> <NOP>
nmap <Right> <NOP>
" Remap of arrow keys
set <up>=OA
set <down>=OB
set <right>=OC
set <left>=OD
map <Up> <Nop>
map <Down> <Nop>
map <Right> <Nop>
map <Left> <Nop>
set number
set t_Co=256
set term=screen-256color
set ruler
set bs=2
set pastetoggle=<F2>
au BufNewFile,BufRead *.ejs set filetype=html
"set t_ku=^[OA
"set t_kd=^[OB
"set t_kr=^[OC
"set t_kl=^[OD
" Emmet
let g:user_emmet_leader_key='<C-y>'
" Normal mode
nnoremap <C-j> :m .+1<CR>==
nnoremap <C-k> :m .-2<CR>==
" Insert mode
inoremap <C-j> <ESC>:m .+1<CR>==gi
inoremap <C-k> <ESC>:m .-2<CR>==gi
" Visual mode
vnoremap <C-j> :m '>+1<CR>gv=gv
vnoremap <C-k> :m '<-2<CR>gv=gv
let mapleader=" "
nnoremap <silent> <Esc> :nohlsearch<Bar>:echo<CR>