本文介绍了什么是< leader>在.vimrc文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在许多.vimrc
文件中看到了<leader>
,我想知道这是什么意思?
I see <leader>
in many .vimrc
files, and I am wondering what does it mean?
它的作用是什么?
对用途和用途进行一般性概述会很好.
Just a general overview of the purpose and usage would be great.
推荐答案
默认情况下,<Leader>
键映射到.所以,如果你有地图,缺省情况下可以用 \ 骨节病> + 牛逼骨节病>执行.有关更多详细信息或使用mapleader
变量进行重新分配,请参见
The <Leader>
key is mapped to by default. So if you have a map of <Leader>t
, you can execute it by default with +. For more detail or re-assigning it using the mapleader
variable, see
:帮助领导者
To define a mapping which uses the "mapleader" variable, the special string
"<Leader>" can be used. It is replaced with the string value of "mapleader".
If "mapleader" is not set or empty, a backslash is used instead.
Example:
:map <Leader>A oanother line <Esc>
Works like:
:map \A oanother line <Esc>
But after:
:let mapleader = ","
It works like:
:map ,A oanother line <Esc>
Note that the value of "mapleader" is used at the moment the mapping is
defined. Changing "mapleader" after that has no effect for already defined
mappings.
这篇关于什么是< leader>在.vimrc文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!