forked from aminzai/vimrc
-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy path01.vimrc.vim
123 lines (96 loc) · 2.91 KB
/
01.vimrc.vim
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
" =============================================================================
" Author: Chu-Siang Lai / chusiang (at) drx.tw
" Blog: http://note.drx.tw
" Filename: 01.vimrc.vim
" Modified: 2018-04-14 02:29
" Description: uncategorized config.
" Reference: https://github.com/chusiang/vimrc/blob/master/_vim/01.vimrc.vim
" =============================================================================
" Built-in
" ========
if has("syntax")
syntax on
endif
if has("autocmd")
filetype plugin indent on
endif
set showcmd " Show (partial) command in status line.
set showmode " Show '-insert-' Mode at the lower left.
"set showmatch " Show matching brackets.
"set ignorecase " Do case insensitive matching
"set smartcase " Do smart case matching
" Incremental search (is), with the fight that is looking to use search
" features. Default off
set incsearch
"set autowrite " Automatically save before commands like :next and :make
"set hidden " Hide buffers when they are abandoned
"set mouse=a " Enable mouse usage (all modes)
set mouse=nv " Enable mouse usage (Normal + Visual modes)
" Other
" =====
" auto cd curent dir. (for support some plugin #22)
autocmd BufEnter * silent! lcd %:p:h
set fileencodings=utf8
set hlsearch " (hls) Hightlight in Search
set ignorecase " (ic) Case sensitive searches
"set nobackup
set ruler "Show Row & Colume position
" move swap and backup files from your working directory.
if has('win32')
set backupdir=/cygdrive/e/Cache
set directory=/cygdrive/e/Cache
else
set backupdir=/tmp
set directory=/tmp
endif
" indent
" ------
set autoindent " (ai)
set cindent
set expandtab " Set Tab to Space.
set smartindent
set tabstop=2
set softtabstop=2 " Set Soft tab stop.
set shiftwidth=2 " Set Soft tab width.
filetype indent on
" Scroll
" ------
set scrolloff=3 " We keep 3 lines when scrolling .
"set scrolljump=5 " Jump 5 lines when scrolling.
" Wild Mode
" ---------
"set wildmode=full,list
"set wildmode=list:full
set wildmode=longest,list " like bash completion. There was the same at the beginning of complement, rather than automatically fill in the name of the first complete.
set wildignore+=*.o,*.a,*.so,*.obj,*.exe,*.lib,*.ncb,*.opt,*.plg,.svn,.git
set wildignore+=*.png,*.jpg,*.gif,*.svg,*.xpm
" set wildoptions
"set winaltkeys=no
set wrap " auto line break.
" - Do not redraw while running macros (much faster).
set lazyredraw
" - Don't make noise
"set noerrorbells
" Folding
" -------
set foldenable
set foldmethod=indent
set foldcolumn=1
set foldlevel=6
" save folds
if !isdirectory("view")
" put view to tmp.
silent !mkdir /tmp/vim-view/ > /dev/null 2>&1
silent !ln -s /tmp/vim-view/ ~/.vim/view > /dev/null 2>&1
endif
autocmd BufWinLeave *.* mkview
autocmd BufWinEnter *.* silent loadview
" disable sound on errors
" -----------------------
set visualbell
set noerrorbells
set t_vb=
set tm=500
" support Neobundle in fish
" -------------------------
set shell=/bin/bash