Skip to content

Instantly share code, notes, and snippets.

i <C-R> * "\<C-G>u\<C-R>".nr2char(getchar())."\<C-G>u"
i <C-R><Tab> * <C-R>=ShowAvailableSnips()<CR>
function! ScreenMovement(movement)
if exists("b:physical_line_mode") && b:physical_line_mode && &wrap
return "g" . a:movement
else
return a:movement
endif
endfunction
function! InsertModeScreenMovement(movement)
if &filetype != "fuf"
Note that there are some tricks to make special keys work and escape CSI bytes
in the text. The |:map| command also does this, thus you must avoid that it
is done twice. This does not work: >
:imap <expr> <F3> "<Char-0x611B>"
Because the <Char- sequence is escaped for being a |:imap| argument and then
again for using <expr>. This does work: >
:imap <expr> <F3> "\u611B"
Using 0x80 as a single byte before other text does not work, it will be seen
as a special key.
@mschulkind
mschulkind / gist:942829
Created April 26, 2011 18:42
ERB output
defaults: &defaults
host: localhost
persist_in_safe_mode: true
# slaves:
# - host: slave1.local
# port: 27018
# - host: slave2.local
# port: 27019
development: