-
Notifications
You must be signed in to change notification settings - Fork 1
/
.vimrc
121 lines (97 loc) · 1.91 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
""""""""""""""""""""""""""""""""""""""""""""""""""""
" Creator: hbin - huangbin88@foxmail.com
""""""""""""""""""""""""""""""""""""""""""""""""""""
set nocompatible
set shortmess=atI
" No beep
set noerrorbells
set novisualbell
set t_vb=
autocmd! GUIEnter * set vb t_vb=
" GUI
set go=
set number
set scrolloff=3
set laststatus=2
set lazyredraw
set guioptions=e
if has("gui_running")
if has("gui_gtk3")
set guifont=Monaco\ 14
elseif has("gui_win32")
set guifont=Monaco:h14:cANSI
else
set guifont=Monaco:h16
endif
endif
" Syntax highlight
syntax enable
" Formats & encoding
set encoding=utf-8
set fileencodings=utf-8
set fileformats=unix,dos,mac
" No temp files
set nobackup
set nowritebackup
set noswapfile
" Edit
set autoread
set backspace=start,indent,eol
set bsdir=buffer
set history=1024
set hidden
set list
set listchars=tab:,.,trail:.,extends:#,nbsp:.
" Tab
set expandtab
set smarttab
set tabstop=4
set shiftwidth=2
" Indentaion
set autoindent
set copyindent
" Word wrap
set nowrap
set iskeyword+=_,$,@,%,#,-
" Indentation
filetype plugin indent on
" Search
set ignorecase
set incsearch
set hlsearch
" Parenthensis
set showmatch
set matchtime=0
" Tab completion
set wildmenu
set wildmode=list:full
" Other
set viminfo=
set clipboard=unnamed
""""""""""""""""""""""""""""""
" =>>> Keys
""""""""""""""""""""""""""""""
let mapleader = " "
nmap Y y$
imap jj <ESC>
imap <C-b> <ESC>i
imap <C-f> <ESC>la
""""""""""""""""""""""""""""""
" =>>> Setting for Plugins
""""""""""""""""""""""""""""""
" CtrlP
let g:ctrlp_max_height=500
" NERDTree
nmap <leader>s :NERDTreeFind<CR>
nmap <leader>f :NERDTree<CR>
" Resolve key mapping conflict
nnoremap <leader>cr <Plug>RooterChangeToRootDirectory
" Ctags
set tags=tags
set tags+=../tags
set autochdir
map <C-\> :tab split<CR>:exec("tag ".expand("<cword>"))<CR>
" python-mode
" let g:pymode_options_max_line_length = 0
let g:pymode_warnings = 0
let g:pymode_options_colorcolumn = 0