jVi 视觉块选择

发布于 2025-01-01 19:51:36 字数 272 浏览 3 评论 0原文

我正在尝试在 Netbeans 中使用 jVi 进行块选择。我似乎无法让它工作 - 似乎有很多关于这个主题的好信息,但是我没有看到我的问题的答案。

这就是我的理解:要进行块选择,您首先进入视觉模式并选择一些文本。然后按 Ctrl-V 进入块选择模式?对我来说,Ctrl-V 粘贴剪贴板,所以我发现有人提到了 Ctrl-Q。我尝试这样做,但无法使用箭头键或 h、j、k、l 键在列中选择文本。对我来说,它只是进行常规选择,抓取该行的其余部分,以及下面的行(如果我向下移动光标)直到光标。

我缺少什么?

I'm trying to do a block selection using jVi in Netbeans. I cannot seem to get it working - there seems to be a lot of good info on this topic, however I'm not seeing the answer to my problem.

This is what I understand: to do a block select, you first enter visual mode and select some text. Then you hit Ctrl-V to enter block select mode? For me, Ctrl-V pastes the clipboard, so I found someone mentioned Ctrl-Q. I try that, but I cannot get text to select in a column using the arrow keys or the h,j,k,l keys. For me, it just does a regular selection grabbing the rest of the line, and the line below (if I move the cursor down) up to the cursor.

What am I missing?

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

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

发布评论

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

评论(3

め可乐爱微笑 2025-01-08 19:51:36

jVi 具有选项来指定哪些控制键由 jVi 处理以及哪些控制键传递给 NetBeans 进行处理。您的描述表明 Ctrl-V 正在由 NB 处理(而不是由 jVi 处理)。在 NetBeans 中查看

工具>选项> jViConfig > Ctrl 键绑定
并启用/检查 jVi 应处理的键。

jVi has options to specify which control keys are handled by jVi and which passed on to NetBeans for processing. Your description indicates that Ctrl-V is being handled by NB (not by jVi). In NetBeans look at

Tools > Options > jViConfig > Ctrl-Key Bindings
and enable/check the keys that jVi should process.

桜花祭 2025-01-08 19:51:36

开始之前请确保您没有处于特殊状态(只需按几次 ESC 即可)。您的某些 jVi 启动脚本也可能正在重新映射这些键。

Ctrl-V 是默认设置,但 Ctrl-Q 是在 Windows 上的 gvim 上引入的,以避免混淆知道 Ctrl-v 用于粘贴文本的用户。 键入来查看键映射

:map

您可以通过在命令模式下 。您甚至可以

:verbose map

找出每个映射的定义位置。我认为这仅列出了用户设置映射,因此它会显示脚本何时重新定义 Ctrl-V 和 Ctrl-Q。

Make sure you're not in a special more before you start (just press ESC a few times). It's also possible that some of your jVi startup scripts are remapping those keys.

Ctrl-V is the default, but Ctrl-Q was introduces on gvim on Windows, to avoid confusing users who knew Ctrl-v is for pasting text. You can look at your key mappings by typing

:map

in command-mode. You can even do

:verbose map

to find out where each mapping was defined. I think that only lists user-set mappings, so it'll show you when Ctrl-V and Ctrl-Q were re-defined by a script.

千年*琉璃梦 2025-01-08 19:51:36

这对我有用 - 结合上面的两个建议。在 jVi 设置页面中,启用 Ctrl-Q 并将其用于经典的 Ctrl-V 功能。不要启用 Ctrl-V,因为它对处理鼠标选择缓冲区有太多副作用。对于我来说,netbean 8.2 以这种方式工作得很好。

This worked for me - combining both suggestions from above. In jVi settings page, enable Ctrl-Q and use it for classic Ctrl-V functionality. Do not enable Ctrl-V as it has too many side effects wrt handling of mouse selection buffer. Works nicely in this way for me with netbean 8.2.

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