-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc
142 lines (112 loc) · 4.38 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
set nocompatible
set noswapfile
" enable spell check for markdown and txt files
autocmd BufRead,BufNewFile *.txt,*.md setlocal spell
" vundle settings
filetype off
map <leader>v :edit $HOME/.vimrc<CR>
set ruler
set showmatch
set showmode
inoremap jk <ESC>
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" Keep plugin commands between vundle#begin/end.
Plugin 'Shutnik/jshint2.vim'
Plugin 'scrooloose/nerdcommenter'
Plugin 'vim-airline/vim-airline'
Plugin 'vim-airline/vim-airline-themes'
Plugin 'nathanaelkane/vim-indent-guides'
Plugin 'tpope/vim-sensible'
Plugin 'groenewege/vim-less'
Plugin 'othree/yajs.vim'
Plugin 'othree/javascript-libraries-syntax.vim'
Plugin 'kien/ctrlp.vim'
Plugin 'FelikZ/ctrlp-py-matcher' " faster CtrlP results
Plugin 'mbbill/undotree'
Plugin 'Raimondi/delimitMate'
Plugin 'tpope/vim-fugitive'
Plugin 'elzr/vim-json'
Plugin 'mhinz/vim-signify'
Plugin 'ap/vim-css-color'
Plugin 'KabbAmine/zeavim.vim'
Plugin 'editorconfig/editorconfig-vim'
Plugin 'tpope/vim-jdaddy' " JSON manipulation/pretty printing
Plugin 'tpope/vim-markdown'
Plugin 'tpope/vim-surround' " edit surrounding tags in pairs - cs<from><to>; ds<tag> to delete
Plugin 'briancollins/vim-jst' " template syntax highlighting
Plugin 'tpope/vim-vinegar' " enhanced netrw
Plugin 'edsono/vim-matchit' " % to jump between opening/closing tags
Plugin 'drmikehenry/vim-fontsize' " adjust font size <leader><leader>+/-
Plugin 'alvan/vim-closetag' " close html tags
Plugin 'heavenshell/vim-jsdoc' " plugin to generate JSDoc block comments
Plugin 'vim-multiple-cursors' " sublime-style multiple cursors
Plugin 'mxw/vim-jsx' " React JSX syntax highlighting/indenting
Plugin 'tpope/vim-eunuch' " Vim sugar for UNIX shell commands
" All plugins must be added before the following line
call vundle#end()
filetype plugin indent on
"set current workspace to :Explore
map <F2> :cd %:p:h
" Toggle undotree
nnoremap <F5> :UndotreeToggle<CR>
if has("persistent_undo")
set undodir=~/undo
set undofile
endif
" remove whitespace
map <F10> :%s/\s\+$//
" open NERDTree
map <C-n> :NERDTreeToggle<CR>
" delimitMate binding
imap <C-c> <CR><Esc>O
set lines=50 columns=100
set number
set encoding=utf-8
set fileencodings=utf-8
set linespace=2
" Use one of the following to define the camel characters.
" Stop on capital letters.
let g:camelchar = "A-Z"
" Also stop on numbers.
let g:camelchar = "A-Z0-9"
" Include '.' for class member, ',' for separator, ';' end-statement,
" and <[< bracket starts and "'` quotes.
let g:camelchar = "A-Z0-9.,;:{([`'\""
nnoremap <silent><C-h> :<C-u>call search('\C\<\<Bar>\%(^\<Bar>[^'.g:camelchar.']\@<=\)['.g:camelchar.']\<Bar>['.g:camelchar.']\ze\%([^'.g:camelchar.']\&\>\@!\)\<Bar>\%^','bW')<CR>
nnoremap <silent><C-l> :<C-u>call search('\C\<\<Bar>\%(^\<Bar>[^'.g:camelchar.']\@<=\)['.g:camelchar.']\<Bar>['.g:camelchar.']\ze\%([^'.g:camelchar.']\&\>\@!\)\<Bar>\%$','W')<CR>
inoremap <silent><C-h> <C-o>:call search('\C\<\<Bar>\%(^\<Bar>[^'.g:camelchar.']\@<=\)['.g:camelchar.']\<Bar>['.g:camelchar.']\ze\%([^'.g:camelchar.']\&\>\@!\)\<Bar>\%^','bW')<CR>
inoremap <silent><C-l> <C-o>:call search('\C\<\<Bar>\%(^\<Bar>[^'.g:camelchar.']\@<=\)['.g:camelchar.']\<Bar>['.g:camelchar.']\ze\%([^'.g:camelchar.']\&\>\@!\)\<Bar>\%$','W')<CR>
vnoremap <silent><C-h> :<C-U>call search('\C\<\<Bar>\%(^\<Bar>[^'.g:camelchar.']\@<=\)['.g:camelchar.']\<Bar>['.g:camelchar.']\ze\%([^'.g:camelchar.']\&\>\@!\)\<Bar>\%^','bW')<CR>v`>o
vnoremap <silent><C-l> <Esc>`>:<C-U>call search('\C\<\<Bar>\%(^\<Bar>[^'.g:camelchar.']\@<=\)['.g:camelchar.']\<Bar>['.g:camelchar.']\ze\%([^'.g:camelchar.']\&\>\@!\)\<Bar>\%$','W')<CR>v`<o
" Color scheme
set background=dark
syntax enable
" airline customizations
let g:airline#extensions#tabline#left_sep = ' '
let g:airline#extensions#tabline#left_alt_sep = '|'
let g:airline#extensions#tabline#enabled = 1
let g:airline#extensions#tabline#buffer_nr_show = 1
let g:airline_powerline_fonts = 1
" tab settings
" show existing tab with 4 spaces width
set tabstop=4
" when indenting with '>', use 4 spaces width
set shiftwidth=4
set softtabstop=4
" On pressing tab, insert 4 spaces
set expandtab
" caseless searching
set ignorecase
set listchars=eol:$,tab:>-,trail:~,extends:>,precedes:<
" vim-signify
let g:signify_vcs_list = [ 'git' ]
" vim-json
let g:vim_json_syntax_conceal = 0
match ErrorMsg '\s\+$'
" settings only for gVim
if has ('gui_running')
set background=dark
colorscheme solarized8
set guioptions -=T
endif