Skip to content

Instantly share code, notes, and snippets.

View luohy15's full-sized avatar
🎯
Focusing

luohy15 luohy15

🎯
Focusing
View GitHub Profile
@keelii
keelii / vimrc
Last active April 6, 2024 15:51
vimrc for window
" ------------------------------
" Name: vimrc for windows
" Author: keelii
" Email: keeliizhou@gmail.com
" ------------------------------
" Startup {{{
filetype indent plugin on
augroup vimrcEx
@tanyuan
tanyuan / smart-caps-lock.md
Last active June 16, 2024 18:29
Smart Caps Lock: Remap Caps Lock to Control AND Escape

Smart Caps Lock: Remap to Control AND Escape (Linux, Mac, Windows)

Caps Lock 變成智慧的 Control 以及 Escape

  • 單獨輕按一下就是 Escape
  • 若按下時同時按著其他鍵,就會是 Control

這應該是 Vim 和 Emacs 的最佳解了!(Emacs? Bash 的快捷鍵就是 Emacs 系列的)

  • Send Escape if you tap Caps Lock alone.
@sedm0784
sedm0784 / CapsLockCtrlEscape.ahk
Last active June 16, 2024 04:27
AutoHotkey script to map Caps Lock to Escape when it's pressed on its own and Ctrl when used in combination with another key, à la Steve Losh. Adapted from one that does something similar with the Ctrl Key on the Vim Tips Wiki (http://vim.wikia.com/wiki/Map_caps_lock_to_escape_in_Windows?oldid=32281). (Plus contribs from @randy909 & @mmikeww.)
g_LastCtrlKeyDownTime := 0
g_AbortSendEsc := false
g_ControlRepeatDetected := false
*CapsLock::
if (g_ControlRepeatDetected)
{
return
}