Skip to content

Instantly share code, notes, and snippets.

@mschulkind
Created May 14, 2011 22:58
Show Gist options
  • Save mschulkind/972731 to your computer and use it in GitHub Desktop.
Save mschulkind/972731 to your computer and use it in GitHub Desktop.
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"
"return "\u0F".ScreenMovement(a:movement)
return "<C-O>".ScreenMovement(a:movement)
else
return a:movement
endif
endfunction
inoremap <silent> <expr> <Up> InsertModeScreenMovement('<Up>')
inoremap <silent> <expr> <Down> InsertModeScreenMovement('<Down>')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment