vim 的简单配置

编辑~/.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           " 设置退格键可用


或者如下:

  1. "==========================  
  2. "         General  
  3. "==========================  
  4. " set F8 as the shortcut key to toogle :Tlist  
  5. nnoremap <silent> <F8> :TlistToggle<CR>  
  6.   
  7. " set to auto read when a file is changed from the outside  
  8. set autoread  
  9. "==========================  
  10. "    Colors and Fonts  
  11. "==========================  
  12. " enable syntax highlight  
  13. syntax enable  
  14.   
  15.    
  16. "==========================  
  17. "    VIM UserInterface  
  18. "==========================  
  19. " show line number  
  20. set nu  
  21.    
  22. " show matching bracets  
  23. set showmatch  
  24.    
  25. " highlight search things  
  26. set hlsearch     
  1. "=========================  
  2. "    Text Options  
  3. "=========================  
  4. " set Tab = 4 spaces  
  5. set ts=4 












评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值