Skip to content

Instantly share code, notes, and snippets.

@tpope
Created June 29, 2019 03:33
Show Gist options
  • Save tpope/a368e62d73b51d35dfc9b7e1846eef39 to your computer and use it in GitHub Desktop.
Save tpope/a368e62d73b51d35dfc9b7e1846eef39 to your computer and use it in GitHub Desktop.
if !has('gui_running')
for s:chr in map(range(char2nr('!'), char2nr('~')), 'nr2char(v:val)')
let s:key = get({'\': 'M-Bslash', '>': 'M-char-62', '[': '', ']': '', 'O': '', 'P': ''}, s:chr, 'M-' . s:chr)
if len(s:key)
exe escape("set <" . s:key . ">=\e" . s:chr, '\|"')
endif
endfor
exe "set <M-Space>=\e\\ "
exe "set <M-CR>=\e\r"
endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment