visual-studio 如何在 Visual Studio 中获得 Emacs 样式的键绑定?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/190402/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-22 09:44:25  来源:igfitidea点击:

How can I get Emacs style key bindings in Visual Studio?

visual-studioconfigurationemacskeyboard-shortcuts

提问by Ray

How can I get Emacs style key bindings in Visual Studio? Is it available in Settings? Do I need a Plug-in?

如何在 Visual Studio 中获得 Emacs 样式的键绑定?设置里可以用吗?我需要插件吗?

采纳答案by jfs

You can try the Emacs keyboard scheme (Tools->Options->Environment->Keyboard)

您可以尝试 Emacs 键盘方案(Tools->Options->Environment->Keyboard

回答by Torleif

Xkeymacsdoes a really good job of this. It is possible to configure this tool for every application running on your desktop.

Xkeymacs在这方面做得非常好。可以为桌面上运行的每个应用程序配置此工具。

回答by Ray

After posting that Emacs keybindings/emulation would no longer be availablein Visual Studio 2010, Emacs Emulation is now available as a free extension for VS 2010.

在发布 Emacs 键绑定/仿真在 Visual Studio 2010 中不再可用后,Emacs 仿真现在可作为 VS 2010 的免费扩展提供

回答by CMS

With Settings:

使用设置:

Try the Emacs keyboard scheme on Environment options.

在环境选项中尝试 Emacs 键盘方案。

Plugins:

插件:

I have only seen this one: VisEmacs, it will integrate Emacs as the default text editor for Visual Studio.

我只看过这个:VisEmacs,它将 Emacs 集成为 Visual Studio 的默认文本编辑器。

回答by Alex B

I use VisEmacsbecause the emacs keyboard scheme isn't quite as nice as emacs itself.

我使用VisEmacs是因为 emacs 键盘方案不如 emacs 本身那么好。

回答by Ray

Unfortunately, the Emacs emulation extensionfor VS 2010 is not officially supported for VS 2012.

不幸的是,VS 2012 不正式支持 VS 2010的Emacs 仿真扩展

However, a workaround is possible if follow the steps outlined in this answer for an SO question on getting Emacs key-bindings in VS2012

但是,如果按照此答案中概述的步骤操作有关在 VS2012 中获取 Emacs 键绑定的 SO 问题,则可以解决此问题

回答by jgibson

If you're using Visual Studio Express 2008 and want the Emacs key bindings then you need to install the Visual C++ edition of VSE 2008. Initially I only installed the C# edition and there were no custom key bindings in Tools->Options->Environment->Keyboard. Once I installed the C++ edition the Emacs key bindings became available in both products.

如果您使用的是 Visual Studio Express 2008 并且想要 Emacs 键绑定,那么您需要安装 VSE 2008 的 Visual C++ 版本。最初我只安装了 C# 版本,并且工具->选项->环境中没有自定义键绑定- >键盘。一旦我安装了 C++ 版本,Emacs 键绑定在两个产品中都可用。

回答by Michael Paulukonis

I used the Emacs keyboard scheme for a few days, but it quickly drove me crazy -- I couldn't rebind keys they way I was used to in Emacs (or couldn't find how to rebind quickly).

我使用了几天 Emacs 键盘方案,但它很快让我发疯——我无法按照我在 Emacs 中习惯的方式重新绑定键(或者找不到如何快速重新绑定)。

I should try XKeyMacs....

我应该尝试 XKeyMacs ....

回答by Jimmy

A quick Live search for "visual studio emacs" gave this page. I'm not sure how thorough it is though (having never used emacs myself).

对“visual studio emacs”的快速实时搜索提供了这个页面。我不确定它有多彻底(我自己从未使用过 emacs)。

回答by user922020

For VS2019 it is an extension written by the community.

对于VS2019,它是社区编写的扩展。

(Installing the extension)

(安装扩展)

  1. Open Visual Studio 2019
  2. Click Extensions -> Manage Extensions
  3. Select "Online" in the left-side panel.
  4. In the search box, enter "emacs"
  5. As of March 2020, "Emacs Emulation 2" seems to be the thing. Select it and click "Download"
  6. Close the window and close all open copies of Visual Studio. VSIX Installer will install the plug-in with your permission.
  1. 打开 Visual Studio 2019
  2. 单击扩展 -> 管理扩展
  3. 在左侧面板中选择“在线”。
  4. 在搜索框中输入“emacs”
  5. 到 2020 年 3 月,“Emacs Emulation 2”似乎就是问题所在。选择它并单击“下载”
  6. 关闭窗口并关闭所有打开的 Visual Studio 副本。VSIX 安装程序将在您的许可下安装插件。

(Turning on EMACS)

(开启 EMACS)

  1. Open Visual Studio
  2. Use the menu Tools -> Customize. Click the "Keyboard" button at the bottom.
  3. In the box at the top there will be an EMACS scheme that wasn't there before. Pick it. Click OK.
  4. Close and reopen any code/text editing windows.
  1. 打开 Visual Studio
  2. 使用菜单工具 -> 自定义。单击底部的“键盘”按钮。
  3. 在顶部的框中将有一个以前没有的 EMACS 方案。选择。单击确定。
  4. 关闭并重新打开任何代码/文本编辑窗口。

Press Ctrl-A, Ctrl-E, Ctrl-F.. It feels like a warm blanket on a cold day.

按 Ctrl-A、Ctrl-E、Ctrl-F.. 感觉就像在寒冷的日子里铺上温暖的毯子。