简体   繁体   English

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

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

How can I get Emacs style key bindings in Visual Studio?如何在 Visual Studio 中获得 Emacs 样式的键绑定? Is it available in Settings?设置里可以用吗? Do I need a Plug-in?我需要插件吗?

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

Xkeymacs does a really good job of this. Xkeymacs在这方面做得非常好。 It is possible to configure this tool for every application running on your desktop.可以为桌面上运行的每个应用程序配置此工具。

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 的默认文本编辑器。

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

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

Unfortunately, the Emacs emulation extension for 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 问题的解决方法是可能的

For VS2019 it is an extension written by the community.对于VS2019,它是社区编写的扩展。

(Installing the extension) (安装扩展)

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

(Turning on EMACS) (开启EMACS)

  1. Open Visual Studio打开 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.在顶部的框中将有一个以前没有的 EMACS 方案。 Pick it.选择它。 Click OK.单击确定。
  4. Close and reopen any code/text editing windows.关闭并重新打开任何代码/文本编辑窗口。

Press Ctrl-A, Ctrl-E, Ctrl-F.. It feels like a warm blanket on a cold day.按 Ctrl-A、Ctrl-E、Ctrl-F.. 感觉就像在寒冷的日子里铺上温暖的毯子。

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 .如果您使用的是 Visual Studio Express 2008 并且想要 Emacs 键绑定,那么您需要安装 VSE 2008 的 Visual C++ 版本。最初我只安装了 C# 版本,并且工具->选项->环境中没有自定义键绑定- >键盘 Once I installed the C++ edition the Emacs key bindings became available in both products.一旦我安装了 C++ 版本,Emacs 键绑定在两个产品中都可用。

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 ....

A quick Live search for "visual studio emacs" gave this page .对“visual studio emacs”的快速实时搜索提供了这个页面 I'm not sure how thorough it is though (having never used emacs myself).我不确定它有多彻底(我自己从未使用过 emacs)。

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

相关问题 如何在Microsoft Visual C#2008 Express Edition中启用Emacs密钥绑定? - How can I enable Emacs key bindings in Microsoft Visual C# 2008 Express Edition? 在Visual Studio社区2015中使用Emacs绑定 - Using Emacs bindings in Visual Studio Community 2015 如何使用Visual Studio / Express快捷键获取vs goto关闭html标签而不是关闭'>'? - How to get vs goto closing html tags instead of closing '>' using Visual Studio/Express key-bindings? 如何在Visual Studio emacs模式下禁用绑定到Tab键的“智能插入”功能? - How do I disable the “smart insert” function that is bound to the Tab key in the Visual Studio emacs mode? 如何共享Visual Studio 2017代码样式和格式? - How Can I Share Visual Studio 2017 Code Style and Formatting? visual studio中的emacs风格键盘宏 - emacs style keyboard macros in visual studio Visual Studio键绑定配置文件 - Visual Studio key bindings configuration file Eclipse / PyDev中的Visual Studio键绑定 - Visual Studio key bindings in Eclipse/PyDev 类似于Visual Studio的Aptana键绑定 - Visual Studio-like Aptana key bindings 如何使用Emacs仿真扩展将另一个应用程序中的文本粘贴到Visual Studio中? - How Can I Paste Text From Another Application Into Visual Studio with Emacs Emulation Extension?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM