[TOOL] Add remap tool for vim on Linux (#626)

* Update Vim.md

Add remap tools for linux (both wayland and x.org).

* Update Vim.md

fix newline
This commit is contained in:
ulic-youthlic 2024-06-15 22:03:34 +08:00 committed by GitHub
parent 631898ad68
commit 4a1932f3f0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -27,7 +27,8 @@ Vim 的学习资料浩如烟海,但掌握它最好的方式还是将它用在
用 Vim 编辑代码的时候会频繁用到 ESC 和 CTRL 键, 但是这两个键都离 home row 很远, 可以把 CapsLock 键映射到 Esc 或者 Ctrl 键,让手更舒服一些。
Windows 系统可以使用 [Powertoys](https://learn.microsoft.com/en-us/windows/powertoys/) 或者 [AutoHotkey](https://www.autohotkey.com/) 重映射键位。
MacOS 系统提供了重映射键位的[设置](https://vim.fandom.com/wiki/Map_caps_lock_to_escape_in_macOS),另外也可以使用 [Karabiner-Elements](https://karabiner-elements.pqrs.org/) 重映射。
MacOS 系统提供了重映射键位的[设置](https://vim.fandom.com/wiki/Map_caps_lock_to_escape_in_macOS),另外也可以使用 [Karabiner-Elements](https://karabiner-elements.pqrs.org/) 重映射。
Linux 系统可以使用 [xremap](https://github.com/xremap/xremap) 进行映射,对于 wayland 和 x.org 都可以使用,并且支持分别映射点按和按住。
但更佳的做法是同时将 CapsLock 映射为 Ctrl 和 Esc点按为 Esc按住为 Ctrl。这是不同系统下的实现方法