gpt4 book ai didi

vim - 视口(viewport)导航不支持重新映射 vim 方向键

转载 作者:行者123 更新时间:2023-12-04 06:04:20 26 4
gpt4 key购买 nike

我正在使用 colemak,因此我重新映射了我的方向键,就像这样

noremap n h
noremap e j
noremap i k
noremap o l

noremap h n
noremap j e
noremap k i
noremap l o

问题是视口(viewport)导航不支持这些键绑定(bind)。例如。当我按 ^w+n我想将焦点转移到左侧的视口(viewport),而是打开了一个新的空视口(viewport)。

如何帮助单独重新绑定(bind)所有视口(viewport)导航键?

最佳答案

在 colemak 论坛上,这个主题有些被打死:

  • http://colemak.com/forum/viewtopic.php?id=50 (5 页,由 colemak 的设计师积极贡献,他(曾经)也是一个狂热的 vim 用户)。

  • 有许多列出的链接到
  • 键盘映射
  • 插件脚本

  • 我觉得 Shai 自己的脚本走得太远了——不仅仅是将 Colemak 集成到 vim 中(将 C-w 重新映射到 Close Tab 例如,显示出对面向标签的编辑器的一些偏见,人们提示 in-/exclusive Action (diw,daB等)不再工作等)。

    我想最好的建议是给 stick with the defaults并做:

    Keyboard bindings for Vim

    Vim is an extremely efficient text editor that I use for writing emails and editing any sort of text file. Vim's commands are all controlled from the keyboard: 'd' for delete, 'w' to move the cursor forward one word, 'dw' to delete the text moved over by 'w', '2dw' to delete two words, etc. Left/Down/Up/Right navigation is located on the QWERTY keys H/J/K/L so that the typist's hands never need to reach for arrow keys or the mouse.

    Unfortunately, these navigation keys are not so intuitive under Colemak and so I needed to find some more appropriate mappings. After experimenting with many alternatives, here is what I finally decided on and am very happy with:

    noremap n j|noremap <C-w>n <C-w>j|noremap <C-w><C-n> <C-w>j
    noremap e k|noremap <C-w>e <C-w>k|noremap <C-w><C-e> <C-w>k
    noremap s h
    noremap t l

    noremap f e
    noremap k n
    noremap K N
    noremap U <C-r>

    关于vim - 视口(viewport)导航不支持重新映射 vim 方向键,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8544246/

    26 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com