-
Notifications
You must be signed in to change notification settings - Fork 0
/
_vimrc
79 lines (68 loc) · 2.25 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
set nocompatible " We're running Vim
set encoding=utf-8
set termencoding=gbk
set nobackup "We don't need the backup file
set showmatch "Show where the bracket match
set showcmd
set ruler "Show the line and column number
set hlsearch "Highlight the search key
set backspace=indent,eol,start
set fileencodings=ucs-bom,utf-8,chinese
set guifont=courier_new:h10
set guioptions=a
set autoindent
set lines=40 columns=120
"set spell spelllang=en_us
call plug#begin('~/.vim/plugged')
Plug 'vim-airline/vim-airline'
Plug 'Raimondi/delimitMate' "auto close brace
Plug 'majutsushi/tagbar'
Plug 'davidhalter/jedi-vim'
"Plug 'rstacruz/sparkup',{ 'for':['html','vue'] }
Plug 'posva/vim-vue'
Plug 'mattn/emmet-vim', { 'for': ['html', 'vue']}
call plug#end()
syntax on " Enable syntax highlighting
filetype plugin indent on " Enable filetype-specific indenting and plugins
language message zh_CN.utf-8 " Use chinese message
color zenburn " Color theme
"set background=light
"color solarized
"color molokai
"color monokai
"let g:molokai_original = 1
"set expandtab
set cursorline "高亮光标所在行
"set cursorcolumn "高亮光标所在列
set mouse=a
"set completeopt=longest,menu
"autocmd FileType python set omnifunc=pythoncomplete#Complete
"map key
vnoremap <C-V> "+gP
"
"au GUIEnter * simalt ~x
vnoremap <C-C> "+y
map <C-tab> :tabnext<CR>
exe 'inoremap <script> <C-V> <C-G>u' . paste#paste_cmd['i']
"split navigations
nnoremap <C-J> <C-W><C-J>
nnoremap <C-K> <C-W><C-K>
nnoremap <C-L> <C-W><C-L>
nnoremap <C-H> <C-W><C-H>
" Enable folding
"set foldmethod=marker
"set foldlevel=0
" Enable folding with the spacebar
nnoremap <space> za
nnoremap <F8> :TagbarToggle<CR>
" commnet the python
vnoremap <silent> <F6> :s/^/#/<cr>:noh<cr>
vnoremap <silent> <C-F6> :s/^#//<cr>:noh<cr>
let mapleader = ';'
autocmd FileType python setlocal completeopt-=preview
au BufNewFile,BufRead *.html,*.js,*.vue set tabstop=2
au BufNewFile,BufRead *.html,*.js,*.vue set softtabstop=2
au BufNewFile,BufRead *.html,*.js,*.vue set shiftwidth=2
au BufNewFile,BufRead *.html,*.js,*.vue set expandtab
au BufNewFile,BufRead *.html,*.js,*.vue set autoindent
au BufNewFile,BufRead *.html,*.js,*.vue set fileformat=unix