编辑~/.vimrc
添加如下文件
set nocompatible "去掉有关vi一致性模式,避免以前版本的bug和局限
syntax on "语法高亮度显示
set number 显示行号
colorscheme slate 颜色选择/usr/share/vim/vim74/colors/slate.vim
set cursorline 为光标所在行加下滑线
set autoindent "vim使用自动对齐,也就是把当前行的对齐格式应用到下一行(自动缩进)
set ruler "在编辑过程中,在右下角显示光标位置的状态行
set shiftwidth=4
"设置当行之间交错时使用4个空格
set softtabstop=4
set tabstop=4 "设置tab键为4个空格,
set nobackup
set backspace=2 " 设置退格键可用
或者如下:
- "==========================
- " General
- "==========================
- " set F8 as the shortcut key to toogle :Tlist
- nnoremap <silent> <F8> :TlistToggle<CR>
- " set to auto read when a file is changed from the outside
- set autoread
- "==========================
- " Colors and Fonts
- "==========================
- " enable syntax highlight
- syntax enable
- "==========================
- " VIM UserInterface
- "==========================
- " show line number
- set nu
- " show matching bracets
- set showmatch
- " highlight search things
- set hlsearch
- "=========================
- " Text Options
- "=========================
- " set Tab = 4 spaces
- set ts=4

被折叠的 条评论
为什么被折叠?



