简体   繁体   English

多字移动键盘快捷键

[英]Multiple words movement keyboard shortcut

I have not seen this answered anywhere, so here it goes.我在任何地方都没有看到这个答案,所以就这样吧。

I am working for the moment at work with Visual Studio and a generic shortcut that seems to facilitate movement word-by-word is Ctrl+left arrow (or Ctrl+right arrow ).我目前正在使用 Visual Studio 工作,似乎有助于逐字移动的通用快捷方式是Ctrl+left arrow (或Ctrl+right arrow )。 Moreover, with Ctrl+Home or Ctrl+End , one moves to the beginning or the end of the line, accordingly.此外,使用Ctrl+HomeCtrl+End ,相应地移动到行首或行尾。 Is there some Vim-like shortcut that I can use or program into the editor so that I can move eg 3 words to the right?是否有一些类似 Vim 的快捷方式我可以使用或编程到编辑器中,以便我可以将例如 3 个单词向右移动? Keep pressing the arrow key gets tedious.一直按箭头键会很乏味。 I know of the VsVim plugin, but I would examine (if there are any) more options, maybe even applicable outside the context of Visual Studio.我知道 VsVim 插件,但我会检查(如果有的话)更多选项,甚至可能适用于 Visual Studio 的上下文之外。 Thanks in advance.提前致谢。

You can use my Visual Commander extension to chain Visual Studio commands like this:您可以使用我的Visual Commander扩展来链接 Visual Studio 命令,如下所示:

public void Run(EnvDTE80.DTE2 DTE, Microsoft.VisualStudio.Shell.Package package) 
{
    DTE.ExecuteCommand("Edit.WordNext");
    DTE.ExecuteCommand("Edit.WordNext");
    DTE.ExecuteCommand("Edit.WordNext");
}

And then you can assign a shortcut to this new command.然后您可以为这个新命令分配一个快捷方式。

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

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