Skip to content

Instantly share code, notes, and snippets.

@smujohnson
Created October 3, 2012 21:54
Show Gist options
  • Save smujohnson/3830128 to your computer and use it in GitHub Desktop.
Save smujohnson/3830128 to your computer and use it in GitHub Desktop.
func! FixShiftGlobal()
if getcmdtype() == ":"
let gcp = getcmdpos()-1
let head = strpart(getcmdline(), 0, gcp)
if head ==# "G" || head ==# "'<,'>G" || head =~# '^\.,\.+\d\+G$'
return "\<BS>g/"
endif
endif
return '/'
endfunc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment