-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.vimrc
More file actions
164 lines (137 loc) · 4.3 KB
/
.vimrc
File metadata and controls
164 lines (137 loc) · 4.3 KB
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
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'
Plugin 'https://github.com/scrooloose/nerdtree.git'
" Plugin 'othree/yajs.vim'
" Plugin 'othree/javascript-libraries-syntax.vim'
Plugin 'mattn/emmet-vim'
Plugin 'othree/html5.vim'
Plugin 'othree/csscomplete.vim'
Plugin 'tpope/vim-surround'
" Plugin 'groenewege/vim-less'
Plugin 'hail2u/vim-css3-syntax'
" Plugin 'Valloric/YouCompleteMe'
" Plugin 'user/L9', {'name': 'newL9'}
Plugin 'jonathanfilip/vim-lucius'
" Plugin 'jaredpar/VsVim'
Plugin 'ybian/smartim'
" Plugin 'mileszs/ack.vim'
Plugin 'https://github.com/rking/ag.vim'
Plugin 'pangloss/vim-javascript' , { 'for': ['javascript', 'javascript.jsx'] }
" Plugin 'mxw/vim-jsx'
" Plugin 'digitaltoad/vim-jade'
" Track the engine.
" Plugin 'SirVer/ultisnips'
" Snippets are separated from the engine. Add this if you want them:
Plugin 'honza/vim-snippets'
Plugin 'https://github.com/ctrlpvim/ctrlp.vim.git'
Plugin 'https://github.com/gabesoft/vim-ags.git'
Plugin 'vim-airline/vim-airline'
Plugin 'vim-airline/vim-airline-themes'
" TypeScript
Plugin 'leafgarland/typescript-vim'
" autopair
Plugin 'jiangmiao/auto-pairs'
" ng2
" Plugin 'mhartington/vim-angular2-snippets'
" tern_for_vim
Plugin 'ternjs/tern_for_vim'
" Wechat app
" Plugin 'chemzqm/wxapp.vim'
" Ruby
Bundle 'vim-ruby/vim-ruby'
Plugin 'tpope/vim-rails'
" All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent 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
"
" see :h vundle for more details or wiki for FAQ
" Put your non-Plugin stuff after this line
" 开启语法高亮功能
syntax enable
" 允许用指定语法高亮配色方案替换默认方案
syntax on
" 总是显示状态栏
set laststatus=2
" 显示光标当前位置
" set ruler
" 开启行号显示
set number
" 高亮显示当前行/列
" set cursorline
" set cursorcolumn
" 高亮显示搜索结果
set hlsearch
"搜索时逐字符高亮
set incsearch
set history=200
set fileencodings=ucs-bom,utf-8,cp936,gb18030,big5,euc-jp,euc-kr,latin1
set encoding=utf-8
set tabstop=2
set expandtab
set shiftwidth=2
set softtabstop=2
set foldmethod=indent
" set autoindent
set fdl=2
cnoremap <C-p> <Up>
cnoremap <C-n> <Down>
"设置切换Buffer快捷键"
nnoremap <C-N> :bn<CR>
nnoremap <C-P> :bp<CR>
" shortcut for tab
noremap <C-t> :tabnew<CR>
colorscheme lucius
LuciusDark
set t_Co=256
"NERDTree-Tabs{
"设置打开vim的时候默认打开目录树
"let g:nerdtree_tabs_open_on_console_startup=1
"设置打开目录树的快捷键
map <F3> :NERDTreeToggle <CR>
map <F2> @:
" disable ex mode
map Q <Nop>
" NERDTree ignore
let NERDTreeIgnore=['\.vim$', '\~$', 'node_modules']
"}
" Webpack watch issue
set backupcopy=yes
let g:jsx_ext_required = 0
autocmd FileType html set omnifunc=htmlcomplete#CompleteTags
autocmd FileType css setlocal omnifunc=csscomplete#CompleteCSS noci
" " Trigger configuration. Do not use <tab> if you use
let g:UltiSnipsSnippetDirectories=["UltiSnips"]
let g:UltiSnipsUsePythonVersion = 2
let g:UltiSnipsExpandTrigger="<tab>"
let g:UltiSnipsJumpForwardTrigger="<c-b>"
let g:UltiSnipsJumpBackwardTrigger="<c-z>"
" " If you want :UltiSnipsEdit to split your window.
let g:UltiSnipsEditSplit="vertical"
set wildignore+=*/tmp/*,*.so,*.swp,*.zip,*/node_modules/*
let g:ag_prg='ag -S --nocolor --column --ignore node_modules'
" AirLine {
"
let g:airline_theme="cool"
let g:airline_powerline_fonts = 1
" 打开tabline功能,方便查看Buffer和切换,这个功能比较不错"
" 我还省去了minibufexpl插件,因为我习惯在1个Tab下用多个buffer"
let g:airline#extensions#tabline#enabled = 1
let g:airline#extensions#tabline#buffer_nr_show = 1
"}
"
set clipboard^=unnamed
" Disable preview when auto complete
set completeopt-=preview