简体   繁体   English

命令中的Vim反斜杠

[英]Vim backslash in command

I feel like this is a very stupid question, but I can't seem to find the answer to this anywhere. 我觉得这是一个非常愚蠢的问题,但我似乎无法在任何地方找到答案。 I'm relatively new to vim. 我对vim比较新。 After a fresh install I installed the vim-LaTeX plugin, or the LaTeX-suite for vim. 在全新安装后,我安装了vim-LaTeX插件,或者用于vim的LaTeX套件。 It works correctly apart for the fact that there are some commands I don't understand. 它可以正常工作,因为有些命令我不明白。 It gives the following instruction: 它给出了以下指示:

To do this, visually select a portion of the text and press \\ll while in visual mode. 要执行此操作,请在视觉模式下直观地选择文本的一部分并按\\ ll。 The visually selected portion will be saved to a temporary file with the preamble from the current document prepended. 视觉选择的部分将被保存到临时文件中,其中前缀是当前文档的前导码。 Latex-Suite will then switch focus to this temporary file and compile it 然后,Latex-Suite将焦点切换到此临时文件并进行编译

But if I press '\\' it does nothing and double l moves the cursor to the right. 但是,如果我按'\\'它什么都不做,双l将光标向右移动。 I don't understand what I'm supposed to be doing, and I feel incredibly stupid. 我不明白我应该做什么,我觉得非常愚蠢。 Sorry if off-topic. 对不起,如果偏离主题。

The \\ is the default value for the :help <Leader> key. \\:help <Leader>键的默认值。 Plugins are encouraged to start all default mappings with <Leader> . 鼓励插件使用<Leader>启动所有默认映射。 If you've redefined it, you need to use that key instead. 如果您已重新定义它,则需要使用该密钥。

Otherwise, you need to press V \\ L L (without Shift ) in quick succession (by default within one second). 否则,您需要快速连续按下V \\ L L (不带Shift )(默认情况下在一秒钟内)。

If you want to find out whether the plugin has been successfully installed and there's actually an action behind those keys, you can use either: 如果您想知道插件是否已成功安装,并且这些键后面确实存在操作,您可以使用以下任一方法:

:verbose vmap <Leader>ll
:verbose vmap \ll

If Vim says No mapping found , or just lists other mappings starting with some of the keys, the plugin isn't installed properly, or you're not using it right. 如果Vim说No mapping found ,或者只是列出了从某些键开始的其他映射,那么插件安装不正确,或者您没有正确使用它。

Press v to go into visual mode. v进入可视模式。 Then you can use your arrow keys to select text. 然后,您可以使用箭头键选择文本。 After you've selected the text you want, type \\ll . 选择所需的文本后,键入\\ll

That should be it. 那应该是它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM