-
Notifications
You must be signed in to change notification settings - Fork 0
/
vim_config.vim
63 lines (49 loc) · 1.33 KB
/
vim_config.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
scriptencoding utf-8
" 开启文件类型侦测
filetype on
" 根据侦测到的不同类型加载对应的插件
filetype plugin on
filetype indent on
set expandtab
" 设置编辑时制表符占用空格数
set tabstop=2
" 设置格式化时制表符占用空格数
set shiftwidth=2
" 让 vim 把连续数量的空格视为一个制表符
set softtabstop=2
" 基于缩进或语法进行代码折叠
"set foldmethod=indent
set foldmethod=syntax
" 启动 vim 时关闭折叠代码
set nofoldenable
" 开启实时搜索功能
set incsearch
" 搜索时大小写不敏感
set ignorecase
" 关闭兼容模式
set nocompatible
set t_Co=256
" vim 自身命令行模式智能补全
set wildmenu
" 禁止折行
set nowrap
let s:home = fnamemodify(resolve(expand('<sfile>:p')), ':h')
let g:vim_config#windows = has('win32') || has('win64') || has('win95') || has('win16')
command! -nargs=1 IncScript exec 'so '. fnameescape(s:home."/<args>")
function! vim_config#path(path)
let path = expand(s:home . '/' . a:path )
return substitute(path, '\\', '/', 'g')
endfunc
function! s:path(path)
return bundle#path(a:path)
endfunc
set fileformat=unix
" 自动关闭最后的quicklist
aug QFClose
au!
au WinEnter * if winnr('$') == 1 && &buftype == "quickfix"|q|endif
aug END
set termwinsize=10x0
IncScript plugins.vim
IncScript ui.vim
IncScript keymap.vim