vimrc 配置及引數解釋

2021-08-26 04:25:12 字數 1166 閱讀 8607

使用vim 編輯乙個檔案時,檔案內容的展現方式和 vimrc 的設定有關。在 /etc/vim/vimrc 中有系統關於vim的一些的配置。 對於系統中的每個使用者user, 在 /home/[user]/.vimrc 中含有自己的vim 配置資訊(如果沒有這個配置檔案可以自己建立,它是乙個隱藏檔案,可以提供 ls -la 來顯示)

part 1:

乙個可用的 .vimrc 檔案:

set autoindent #自動縮排

set tabstop=4 #set ts=4

set softtabstop=4 # table 鍵相當於4個spaces

set shiftwidth=4 # set sw=4

set expandtab # set et

set ignorecase # 預設不區分大小寫

set incsearch # 在檔案中查詢時,對於查詢到的結果高亮顯示

set ruler #開啟vim 的狀態標尺,即視窗下方的行號等資訊

set scs

set nu #顯示行號

set tw=76 #字元超過76時折行

另乙個可用的 .vimrc 檔案:

set autoindent

set tabstop=4

set softtabstop=4

set shiftwidth=4

set expandtab

set ignorecase

set incsearch

set ruler

set scs

set nu

set tw=76

set ru

set hls

set whichwrap=b,s,h,l,<,>,[,]

set selection=inclusive

set guioptions-=t

part 2: 常用引數解釋

1: set nocompatible 或 set nocp

vim 工作在不相容模式下。 vim 和 vi 是有差別的, 具體區別可以進入 vim模式,輸入 :help vi_diff.txt 檢視

2: set ru

開啟vim 的狀態標尺

3: set hls

搜尋時高亮顯示被找到的文字

4: syntax on

vimrc入門配置

csharp set number set tabstop 4colorscheme the creator syntax on inoremap jj map nerdtreetoggle nmap ss easymotion s2 set hlsearch set incsearch call ...

RMAN配置引數解釋

檢視rman配置的引數 rman show all 可以顯示出rman配置引數為 configure retention policy to redundancy 1 default configure backup optimization off default configure defaul...

vimrc配置文件示例

set nocompatible set number set numberwidth 4 set autoindent source home murphy set encoding info set encoding utf 8 set fileencodings utf 8,latin 1 s...