簡體   English   中英

無法弄清楚一些vimrc設置

[英]Unable to figure out some vimrc settings

我在vimrc文件中遇到了以下幾行,無法弄清楚它們應該做什么或它們應該如何工作。 因使用$符號而被拋棄。 它是否有任何特殊含義,或者像其他角色一樣以常規方式使用?

" Parenthesis/bracket expanding
vnoremap $1 <esc>`>a)<esc>`<i(<esc>
vnoremap $2 <esc>`>a]<esc>`<i[<esc>
vnoremap $3 <esc>`>a}<esc>`<i{<esc>
vnoremap $$ <esc>`>a"<esc>`<i"<esc>
vnoremap $q <esc>`>a'<esc>`<i'<esc>
vnoremap $e <esc>`>a"<esc>`<i"<esc>

" Map auto complete of (, ", ', [
inoremap $1 ()<esc>i
inoremap $2 []<esc>i
inoremap $3 {}<esc>i
inoremap $4 {<esc>o}<esc>O
inoremap $q ''<esc>i
inoremap $e ""<esc>i
inoremap $t <><esc>i

如果有人有興趣。 是vimrc的鏈接

只看其中兩個。

第一個是可視模式映射

" Parenthesis/bracket expanding
vnoremap $1 <esc>`>a)<esc>`<i(<esc>

當您鍵入$ 1時,這會將選項包裝在() 首先,它(跳到選擇結束'>和) a PPEND SA )跳躍到選擇(開始前'< )和i nsert荷蘭國際集團一個(

這是一個插入模式映射

" Map auto complete of (, ", ', [
inoremap $1 ()<esc>i

當您鍵入$ 1並將光標留在兩個括號之間時插入()

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM