位置:/etc/vim/vimrc
建議使用gedit來進行配置。即使用命令:sudo gedit /etc/vim/vimrc
set mouse=a " Enable mouse usage (all modes) set confirm " ?應該可刪,用於詢問確定 "縮進格數 set tabstop=4 set shiftwidth=4 set smarttab "智能縮進 set smartindent "智能縮進 color desert "顏色風格 set nu "顯示行號 set ruler "行標尺 set hlsearch set incsearch "上行和該行都是搜索高亮用 set cursorline "行高亮 set nobackup "取消自動備份 set autoread "自動讀取被更該文件 map <F9> <ESC>:w<CR> :!g++ % -o %< -Wall -DLOCAL && ./%< <CR> "F9 編譯並運行 imap <F9> <ESC>:w<CR> :!g++ % -o %< -Wall -DLOCAL && ./%< <CR>
同時運用map的操作舉一反三你可以配置一條一鍵打開gedit的指令,這樣大概就能方便的復制粘貼剪切。
注:本文轉載大佬ajcxsu的博客:http://www.cnblogs.com/acxblog/p/7497310.html