Created
September 19, 2014 07:37
-
-
Save zxkletters/771a59882c05162461f1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
"显示相关 | |
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
set cul "高亮光标所在行 | |
"set cuc | |
set shortmess=atI " 启动的时候不显示那个援助乌干达儿童的提示 | |
set lines=40 columns=155 | |
set go= " 不要图形按钮 | |
"set guifont=Courier_New:h10:cANSI " 设置字体 | |
autocmd InsertLeave * se nocul " 用浅色高亮当前行 | |
autocmd InsertEnter * se cul " 用浅色高亮当前行 | |
set ruler " 显示标尺 | |
set showcmd " 输入的命令显示出来,看的清楚些 | |
"set whichwrap+=<,>,h,l " 允许backspace和光标键跨越行边界(不建议) | |
set scrolloff=3 " 光标移动到buffer的顶部和底部时保持3行距离 | |
set statusline=%F%m%r%h%w\ [FORMAT=%{&ff}]\ [TYPE=%Y]\ [POS=%l,%v][%p%%]\ %{strftime(\"%d/%m/%y\ -\ %H:%M\")} "状态行显示的内容 | |
set laststatus=2 " 启动显示状态行(1),总是显示状态行(2) | |
"set foldenable " 允许折叠 | |
""set foldmethod=manual " 手动折叠 | |
set nocompatible "去掉讨厌的有关vi一致性模式,避免以前版本的一些bug和局限 | |
" 显示中文帮助 | |
if version >= 603 | |
set helplang=cn | |
set encoding=utf-8 | |
endif | |
" 自动缩进 | |
set autoindent | |
set cindent | |
" Tab键的宽度 | |
set tabstop=4 | |
" 统一缩进为4 | |
set softtabstop=4 | |
set shiftwidth=4 | |
" 不要用空格代替制表符 | |
set noexpandtab | |
" 在行和段开始处使用制表符 | |
set smarttab | |
" 显示行号 | |
set number | |
" 历史记录数 | |
set history=1000 | |
"搜索逐字符高亮 | |
set hlsearch | |
set incsearch | |
"语言设置 | |
set langmenu=zh_CN.UTF-8 | |
set helplang=cn | |
" 总是显示状态行 | |
set cmdheight=2 | |
" 侦测文件类型 | |
filetype on | |
" 载入文件类型插件 | |
filetype plugin on | |
" 为特定文件类型载入相关缩进文件 | |
filetype indent on | |
" 保存全局变量 | |
set viminfo+=! | |
" 带有如下符号的单词不要被换行分割 | |
set iskeyword+=_,$,@,%,#,- | |
" 字符间插入的像素行数目 | |
"markdown配置 | |
au BufRead,BufNewFile *.{md,mdown,mkd,mkdn,markdown,mdwn} set filetype=mkd | |
au BufRead,BufNewFile *.{go} set filetype=go | |
au BufRead,BufNewFile *.{js} set filetype=javascript | |
"rkdown to HTML | |
nmap md :!~/.vim/markdown.pl % > %.html <CR><CR> | |
nmap fi :!firefox %.html & <CR><CR> | |
"将tab替换为空格 | |
nmap tt :%s/\t/ /g<CR> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment