set nu "打開vim后顯示行號
set mouse=a "是能鼠標
set tabstop=2 "設(shè)置tab鍵的空格
如果你使用ubuntu等發(fā)行版,在使用的時候出現(xiàn)不能將vim的文本復(fù)制粘帖到其他軟件秒紧,使用+y +p都不行
用下面的方法可以解決(原文地址:http://www.liurongxing.com/ubuntu-system-vim-to-use-the-system-clipboard.html)
1 問題來源
用 apt-get install安裝的vim不能使用系統(tǒng)剪貼板栗恩,即復(fù)制:"+y透乾,和粘貼"+p不能用;用:reg 命令查看沒有"+寄存器
2 軟件版本
操作系統(tǒng):ubuntu 12.04磕秤;vim版本 7.3.429
3 安裝過程
3.1 安裝相關(guān)軟件包
$ sudo apt-get install build-essential
$ sudo apt-get install ncurses-dev
$ sudo apt-get install xorg-dev
$ sudo apt-get install libgtk2.0-dev
3.2 安裝vim
sudo apt-get install vim vim-scripts vim-gnome vim-gtk
sudo apt-get install exuberant-ctags cscope
設(shè)置映射配置.vimrc:
let mapleader = ","
let g:mapleader = ","
map c "+y
map p "+p