-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.vim
75 lines (72 loc) · 1.96 KB
/
init.vim
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
" Plugins
call plug#begin('~/.config/nvim/plugged')
Plug 'Yggdroot/indentLine'
Plug 'scrooloose/nerdcommenter'
Plug 'Shutnik/jshint2.vim'
Plug 'kshenoy/vim-signature'
Plug 'morhetz/gruvbox'
Plug 'ervandew/supertab'
Plug 'kien/ctrlp.vim'
Plug 'tpope/vim-fugitive'
Plug 'bling/vim-airline'
Plug 'powerline/fonts'
Plug 'scrooloose/nerdtree'
Plug 'Xuyuanp/nerdtree-git-plugin'
Plug 'mattn/emmet-vim'
Plug 'airblade/vim-gitgutter'
Plug 'gregsexton/MatchTag'
Plug 'sheerun/vim-polyglot'
Plug 'Raimondi/delimitMate'
Plug 'vim-scripts/vim-auto-save'
call plug#end()
" UI/Theme config
set number
set cursorline
set ts=2
set sw=2
syntax enable
" Spaces instead of tabs
set expandtab
" Set theme color schema
set bg=dark
colorscheme gruvbox
" highlight trim trailing white space
highlight ExtraWhitespace ctermbg=red
match ExtraWhitespace /\s\+$/
" Keybindings
let mapleader = ','
" Tabs navigation settings
map <silent><C-n> :tabnext<CR>
map <silent><C-p> :tabprevious<CR>
" nerdtree settings
map <C-x> :NERDTreeToggle<CR>
" select all text
map <C-a> <esc>ggVG<CR>
" git preview hunk
nmap <Leader>hv <Plug>GitGutterPreviewHunk
" Plugin Settings
" indentLine
let g:indentLine_char = '┆'
" nerdcommenter
let g:NERDSpaceDelims = 1
" jshint2.vim
if has("autocmd")
autocmd BufWritePost *.js silent execute 'JSHint'
endif
let jshint2_confirm = 0
" ctrlp.vim
let g:ctrlp_map = '<c-f>'
" vim-auto-save
let g:auto_save = 1
let g:auto_save_in_insert_mode = 0
" vim-airline
let g:airline#extensions#branch#enabled = 1
let g:airline#extensions#tabline#enabled = 1
if !exists('g:airline_symbols')
let g:airline_symbols = {}
endif
let g:airline_powerline_fonts = 1
let g:airline_left_sep = ''
let g:airline_right_sep = ''
let g:airline_symbols.linenr = '¶'
let g:airline_symbols.branch = '⎇'