forked from azhao1981/My-Vim-Rails
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc
99 lines (73 loc) · 1.98 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
" 启动vim时窗口的大小
set lines=30 columns=120
" 不兼容VI键盘,使用vim键盘
set nocompatible
" 调用Pathogen插件来管理插件 必须在 filetype plugin indent on 之前
call pathogen#runtime_append_all_bundles()
" 文件类型识别
filetype on
filetype plugin indent on
" 禁止生成临时文件
set nobackup
set noswapfile
" 历史记录数
set history=50
" 设置编码
set enc=utf-8
" 设置文件编码
set fenc=utf-8
" 设置文件编码检测类型及支持格式
set fencs=utf-8,ucs-bom,gb18030,gbk,gb2312,cp936
" 设置开启语法高亮
syntax on
" 显示行号
set number
" 高亮显示匹配的括号
set showmatch
" 搜索忽略大小写
set ignorecase
" 查找结果高亮度显示
set hlsearch
set incsearch
" tab宽度
set tabstop=4
set cindent shiftwidth=4
set autoindent shiftwidth=4
" 命令行下按tab键自动完成
set wildmode=list:full
set wildmenu
" 设置默认的颜色
colorscheme railscasts
" 带有如下符号的单词不要被换行分割
set iskeyword+=_,$,@,%,#,-
" 通过使用: commands命令,告诉我们文件的哪一行被改变过
set report=0
" 可以在buffer的任何地方使用鼠标(类似office中在工作区双击鼠标定位)
set mouse=a
set selection=exclusive
set selectmode=mouse,key
" 设置自动保存
imap <F9> <Esc>:up<cr>
" 把 F8 映射到 启动NERDTree插件
let NERDTreeShowBookmarks = 1
let NERDChristmasTree = 1
let NERDTreeWinPos = "left"
map <F8> :NERDTree<CR>
" 在不同的窗口移动
map <C-j> <C-W>j
map <C-k> <C-W>k
map <C-h> <C-W>h
map <C-l> <C-W>l
" 设置FuzzyFinder
let mapleader = "\\"
map <leader>F :FufFile<CR>
map <leader>f :FufTaggedFile<CR>
map <leader>g :FufTag<CR>
map <leader>b :FufBuffer<CR>
" 设置Color-Sample
map <silent><F3> :NEXTCOLOR<cr>
map <silent><F2> :PREVCOLOR<cr>
" 设置Rubytest
let g:rubytest_cmd_spec = "rspec -fd %p"
" 设置SuperTab
let g:SuperTabRetainCompletionType="context"