From 4a1932f3f08493ef519a691223519c3801fc3bc2 Mon Sep 17 00:00:00 2001 From: ulic-youthlic <121918198+ulic-youthlic@users.noreply.github.com> Date: Sat, 15 Jun 2024 22:03:34 +0800 Subject: [PATCH] [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 --- docs/必学工具/Vim.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/必学工具/Vim.md b/docs/必学工具/Vim.md index cd2ec10b..85e2cc67 100644 --- a/docs/必学工具/Vim.md +++ b/docs/必学工具/Vim.md @@ -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。这是不同系统下的实现方法: