在 OS X Lion 中使用 pycharm 中的 emacs 绑定

发布于 2024-12-07 13:09:02 字数 264 浏览 3 评论 0原文

我正在尝试在 OS X 10.7 中的 Pycharm 1.5 中使用 emacs 键绑定。它们都有效,除了 ALT+B 插入一个 beta 符号而不是向后移动一个单词。令人费解的是 ALT+F 确实正确地向前移动了一个单词。 另外,我想知道 Pycharm 是否支持在匹配的括号或方括号之间移动,就像 emacs 中的 Control-Meta-F 一样。我在 Pycharm 键绑定首选项窗格中没有看到此选项。 谢谢!

I am trying to use the emacs keybindings in Pycharm 1.5 in OS X 10.7. They all work except that ALT+B inserts a beta symbol rather than moving back a word. It's puzzling since ALT+F does correctly move forward a word.
Also, I was wondering if Pycharm has support for moving between matching parentheses or brackets, like Control-Meta-F in emacs. I didn't see an option for this in the Pycharm keybindings preference pane.
Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

不羁少年 2024-12-14 13:09:02

我在 JetBrains 论坛上找到了一个解决方案。 该论坛帖子包含一个键盘映射作为附件,全局禁用 alt 键生成符号。

引用论坛里的话,
“因此,经过一番挖掘后,我发现此选项键映射到这些相对未使用的符号,这些符号在操作系统中优先。使用 http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=u​​kelele (Ukelele),我能够生成优化的 Emacs 键盘布局,您应该将其放入 /Library/Keyboard Layouts/ 文件夹中,

然后切换到在 Mac OSX 工具栏和选项键上使用此键盘布局 。在 PyCharm 中可以免费使用热键,我稍后会写一篇关于此的博客文章,

希望这会有所帮助。”

I found a solution on the JetBrains forum. The forum post includes a keymap as an attachment that globally disables the alt keys from generating symbols.

Quoting the forum,
"So, after some digging around, I figured that this option key maps to these relatively unused symbols that are take precedence in the operating system. Using http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=ukelele (Ukelele), I was able to generate an optimized Emacs keyboard layout. You should take this and put it in your /Library/Keyboard Layouts/ folder.

Reboot, and switch to use this keyboard layout on the Mac OSX toolbar and the option key will be free for hotkeying in PyCharm. I'll write up a blog post about this later.

Hope this helps."

清引 2024-12-14 13:09:02

esc-ctrl-b 对我有用,但 alt-b 不起作用t。它就在 emacs 键盘映射中,所以一开始很奇怪,但我认为问题是 alt-b 映射到一个字符(∫而不是我的 ß) case),因此 PyCharm 不会将其视为键修饰符对,而只是单个字符。

切换到不同的国际键盘映射将改变哪些组合有效,哪些组合无效。我建议向 PyCharm 发送错误报告,因为他们可以修复这个问题,或者您必须以某种方式破解您的键盘映射。

为了回答你的另一个问题,我认为没有办法匹配括号,或者至少我从未找到过。

esc-ctrl-b works for me, but alt-b doesn't. It's right there in the emacs keymap, so it's strange at first, but I think the problem is that alt-b is mapped to a character (∫ rather than ß in my case) so PyCharm doesn't see it as a key-modifier pair, just a single character.

Switching to a different international keyboard map will change which combinations work and which don't. I'd suggest sending a bug report to PyCharm as it's something they can fix, or alternatively you'll have to hack your keyboard mapping somehow.

To answer your other question, I don't think that there's a way to go to matching parenthesis, or at least I've never found one.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文