首頁  >  文章  >  運維  >  VIM簡單設定實例詳解

VIM簡單設定實例詳解

零下一度
零下一度原創
2017-06-28 14:17:431492瀏覽

這次改版後,使用起來確實很順手~先讚一個。

vi很強大,但是要想在linux下快速開發程序,vim覺得算得上利器。簡單配置記錄如下。

第一步,安裝gvim。

[plain] view plain copy

# print?

sudo apt-get install vim-gtk vim-doc cscope  

第二步,新建一個新一個新一個新一個新一個新一個。設定檔vimrc

[plain] view plain copy

# print?

vi ~/.vimrc  


第三步,將下列內容新增至該文件中,儲存。

[plain] view plain copy

 print?

set nocompatible  "關閉與VI的相容  

set number  "顯示行號  

#filetype on   

set history=1000   

set background=dark "設定背景為灰色  

syntax on # "設定背景為灰色  

# ##set autoindent "自動對齊,使用上一行的對準方式  

set smartindent "智慧對準方式  

set tabstop=4  

##set shiftwidth=4 tabstop=4  

##set shiftwidth=4 tabstop=4  

#set showmatch  "設置匹配模式,類似當輸入一個左括號時匹配上相應的那個右括號  

set guioptions-=T  

set vb t_vb=  

set ruler "在編輯過程中,在右下角顯示遊標位置的狀態行  

#set nohls    

set incsearch "搜尋自動定位  

#if has("vmsincsearch "搜尋自動定位  

#if has("vms")

set nobackup  

else  

set backup  

endif  

#########################################################################################

以上是VIM簡單設定實例詳解的詳細內容。更多資訊請關注PHP中文網其他相關文章!

陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn