-
Notifications
You must be signed in to change notification settings - Fork 3
/
.vimrc
113 lines (96 loc) · 3.15 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
" ___ ___
" ___ ___ /\_ \ /\_ \ (R)
" sssssssssssssamuelolololololololol /\_ \ /\_ \ ___\//\ \ ___\//\ \
" ____ __ ___ ___ __ __ __\//\ \ ___\//\ \ / __`\\ \ \ / __`\\ \ \
" /',__\ /'__`\ /' __` __`\/\ \/\ \ /'__`\\ \ \ / __`\\ \ \ /\ \L\ \\_\ \_/\ \L\ \\_\ \_
" /\__, `\\ \L\.\_/\ \/\ \/\ \ \ \_\ \\ __/ \_\ \_/\ \L\ \\_\ \\ \____//\____\ \____//\____\
" \/\____/ \__/.\_\ \_\ \_\ \_\ \____/ \____\/\____\ \____//\____\/___/ \/____/\/___/ \/____/
" \/___/ \/__/\/_/\/_/\/_/\/_/\/___/ \/____/\/____/\/___/ \/____/ by samuelololol@gmail.com
"
"
" Samuel's .vimrc config file
"
" 2010, 09/28 @NSYSU
"LVSTHW: LearnVimScriptTheHardWay
"vi compatible mode
set nocompatible
" " handle nvim normal/insert mode switch issue
" if has('nvim')
" set ttimeoutlen=10
" augroup FastEscape
" autocmd!
" au InsertEnter * set timeoutlen=0
" au InsertLeave * set timeoutlen=1000
" augroup END
" endif
"
""" show line number
set number
set shiftround "LVSTHW
set showmatch "LVSTHW
set cursorline
syntax enable "syntax on
"""spell check
setlocal spell spelllang=en_us
set nospell
"set spell
""" filetype support
filetype on
filetype plugin on
filetype indent on
set smartcase
set ignorecase
set encoding=utf-8
"folding series setting
"set fdm=marker
"set fdm=syntax
"set fdm=indent
"
"set foldcolumn=3
"set foldlevel=0 " fold everything deeper than 0
"set foldnestmax=1 " dont fold everything deeper than 1
"""reference from: http://nvie.com/posts/how-i-boosted-my-vim
set history=1000 " remember more commands and search history
set undolevels=1000 " use many muchos levels of undo
set wildignore=*.swp,*.bak,*.pyc,*.class,*.o
set title " change the terminal's title
set visualbell " don't beep
set noerrorbells " don't beep
set nobackup " don't backup
set noswapfile " don't backup
"確保 Vim 能在中文字符之間折行而不要求空格的存在
"並且在大部分情況下可以正確地處理中文重新格式化
set formatoptions+=tmM
set textwidth=80
""" pathogen setting
"call pathogen#helptags()
"call pathogen#runtime_append_all_bundles()
"call pathogen#infect()
"execute pathogen#infect()
"Helptags
"runtime ~/.vim/bundle/vim-pathogen/autoload/pathogen.vim
"""disable mouse
set mouse-=a
"""modeline default disable by samuel
"set modeline
"set modelines=5
"""setting key map must in vimrc
let s:myrtp=&runtimepath
exec 'set rtp=' . '~/.vim/before,' . s:myrtp
"set runtimepath+=~/.vim/pack-after
"set runtimepath+=~/.vim/samuelololol
"set runtimepath+=~/.vim/samuelololol/after
"set runtimepath+=~/.vim/local_settings
"set runtimepath+=~/.vim/local_settings/after
""check whether a git repo folder
"let gitdir=system("git rev-parse --show-toplevel 2>&1 /dev/null;")
"let isnotgitdir=matchstr(gitdir, '^fatal:.*')
"
"if empty(isnotgitdir)
" "original
" :packadd nerdtree-git-plugin
" :packadd vim-fugitive
" :packadd vim-gitgutter
" "samuelololol
" :packadd for_git
"endif