Skip to content

Instantly share code, notes, and snippets.

@pervognsen
Created June 15, 2010 08:43
Show Gist options
  • Save pervognsen/438858 to your computer and use it in GitHub Desktop.
Save pervognsen/438858 to your computer and use it in GitHub Desktop.
;; Initialization
#NoEnv
SendMode Input
SetTitleMatchMode, 2
;; MacBook-friendly modifier remapping
$RWin::RCtrl
$LWin::LAlt
$LAlt::LWin
SetCapsLockState, AlwaysOff
$CapsLock::LCtrl
;; MacOS emulation
CloseWindow() {
if WinActive("Google Chrome") {
Send ^{F4}
} else {
Send !{F4}
}
return
}
!w::CloseWindow() ; Close window
!q::Send !{F4} ; Quit application
!t::Send ^t ; New tab
!s::Send ^s ; Save document
!Space::Send ^{Esc} ; Launcher
;; Emacs emulation
^a::Send {Home} ; Beginning of line
^e::Send {End} ; End of line
+^a::Send +{Home} ; Mark to beginning of line
+^e::Send +{End} ; Mark to end of line
!<::Send ^{Home} ; Beginning of document
!>::Send ^{End} ; End of document
^k::Send +{End}{Del} ; Kill rest of line
^BS::Send ^+{Left}{BS} ; Kill previous word
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment