seeing_is_believing vim插件的键映射

时间:2018-08-16 12:31:13

标签: vim vim-plugin

我正在尝试让seeing_is_believing插件与我的vim一起使用。

到目前为止,我已经能够使用键映射来注释整个文件并清除注释。

但是现在我停留在Mark the current line for annotation部分。

this is what is in the wiki page

enter image description here

我的问题是此键映射是什么意思(或如何读取这些内容? 键映射)

" Mark the current line for annotation
nmap <leader>m A # => <Esc>
" Mark the highlighted lines for annotation
vmap <leader>m :norm A # => <Esc>

1 个答案:

答案 0 :(得分:2)

nmap <leader>m A # => <Esc>

与插件无关,如果您按# =>,它只会在行末添加<leader>m。 (请参见:h leader)。

映射的第一部分是启动映射的键序列(<leader>m),第二部分定义了其作用A # => <Esc> A表示在行尾进入插入模式。在插入模式下,键入# =>,然后使用<esc>

返回正常状态。

第二个映射nmap <leader>m A # => <Esc>的功能完全相同,但是对于在可视模式下标记的每一行。 (请参见:h :norm,它在普通模式下的确会在按键时执行以下字符串)

相关问题