-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvimrc
executable file
·115 lines (93 loc) · 2.94 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
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Maintainer: xthsky
"
" Sections:
" -> General
" -> VIM user interface
" -> Colors and Fonts
" -> Text, tab and indent related
"
" -> Omni complete functions
" -> JavaScript section
"
"
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Vundle
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set nocompatible " be iMproved
filetype off " required by Vundle
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
" let Vundle manage Vundle
" required!
Bundle 'gmarik/vundle'
" original repos on github
Bundle 'Lokaltog/vim-powerline'
Bundle 'ap/vim-css-color'
Bundle 'jelera/vim-javascript-syntax'
Bundle 'jnwhiteh/vim-golang'
Bundle 'scrooloose/nerdtree'
Bundle 'scrooloose/syntastic'
let g:syntastic_javascript_checkers=['jshint']
Bundle 'kien/ctrlp.vim'
Bundle 'mileszs/ack.vim'
Bundle 'scrooloose/nerdcommenter'
Bundle 'tsaleh/vim-matchit'
Bundle 'maksimr/vim-jsbeautify'
map <c-f> :call JsBeautify()<cr>
Bundle 'majutsushi/tagbar'
Bundle 'gregsexton/gitv'
filetype plugin indent on " required by Vundle
"
" Brief help
" :BundleList - list configured bundles
" :BundleInstall(!) - install(update) bundles
" :BundleSearch(!) foo - search(or refresh cache first) for foo
" :BundleClean(!) - confirm(or auto-approve) removal of unused bundles
"
" see :h vundle for more details or wiki for FAQ
" NOTE: comments after Bundle command are not allowed..
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => General
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set history=256 " 保留历史记录
" With a map leader it's possible to do extra key combinations
" like <leader>w saves the current file
let mapleader = ","
let g:mapleader = ","
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => VIM user interface
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
if has("win32")
source $VIMRUNTIME/mswin.vim
set guioptions-=m
set guioptions-=T
set guioptions-=L
autocmd vimenter * if !argc() | cd d:\dev | endif
autocmd GUIEnter * simalt ~x
elseif has("gui_macvim")
set anti
set guifont=Monaco:h13
set guioptions-=T
endif
set number
set incsearch
set mouse=a
set laststatus=2
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Colors and Fonts
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
colorscheme desert
syntax enable
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Text, tab and indent related
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set autoindent " 开启自动缩进
set smartindent
set tabstop=4 " tab长度
set shiftwidth=4 " 自动缩进的长度
set expandtab " 以空格代替tab
set smarttab " 针对expandtab,不用按4次Backspace来删1个tab
set fdm=marker
set fencs=utf-8,gbk