我的vi 启动配置文件

VI帮助文档    http://vimdoc.sourceforge.net/htmldoc/usr_toc.html

 

1) ================================

set nocompatible " 不使用vi默认键盘布局
set number " 显示行号
set autoindent " 自动对齐
set smartindent " 智能对齐
set showmatch " 括号匹配模式
set ruler " 显示状态行
set incsearch " 搜索时一边输入一边显示效果
set tabstop=4 " tab键为4个空格
set shiftwidth=4
set softtabstop=4
set cindent " C语言格式对齐
set nobackup " 不要备份文件
set clipboard+=unnamed " 与windows共享剪贴板

 

2)==================================

""""""""""""""""""""""""""""""""""
"configure file for program's vim.
"From net.
"Edit in 2008.6.17
""""""""""""""""""""""""""""""""""
"no compatible with previous version.
set nocompatible

"show line number.
set number

"ctags setting
set tags=tags;
" set autochdir
"set tags=/home/desktop/fh35_Gemini_DVS/source/tags
"set tags=/home/desktop/fh35_Gemini_DVS/source/goahead/tags
"set tags=/home/desktop/fh35_Gemini_DVS/source/kernel/linux/tags

"detect file type.
filetype on

"background color.
set background=light

"syntax hightlighting.
syntax enable

set hlsearch

"enable mouse.
set mouse=a

"the following setting is used for format when writting code.
set autoindent
set smartindent
set cindent

set tabstop=4
set shiftwidth=4

"match () and {}
set showmatch

"show current mode
set showmode

"remove toolbar of GUI version vim.
"set guioption-=T

"remove belling when command error.
set vb t_vb=

"show cursor position status in lowleft corner.
set ruler

"close hight lighting search.
"set nohls

"realtime search word.
set incsearch

"auto backup when file changed,as FILENAME~
"if has("vms")
set nobackup
"else
"set backup
"endif

"Word encodeing.
"set fenc=chinese
"set enc=gb2312
"set fenc=gb2312
"set fencs=gb2312,utf-8,gbk,gb18030

"status line content
set statusline=%F%m%r%h%w\ [FORMAT=%{&ff}]\ [TYPE=%Y]\ [HEX=0x\%B]\ [POS=%l,%v][%p%%]\ [%{strftime(\"%y/%m/%d\-\%H:%M\")}]

"always show status line.
set laststatus=2

"set mapleader.
let mapleader="/"
let g:mapleader="/"

map <leader>1 :buffer 1<cr>
map <leader>2 :buffer 2<cr>
map <leader>3 :buffer 3<cr>
map <leader>4 :buffer 4<cr>
map <leader>ls :buffers<cr>

map <leader>w :w<cr>

map <F5> :! make<cr>

posted on 2012-05-22 15:25  bluebbc  阅读(302)  评论(0编辑  收藏  举报

导航