Skip to content

Instantly share code, notes, and snippets.

@romainl
Created May 26, 2017 09:13
Show Gist options
  • Save romainl/3b8cdc6c3748a363da07b1a625cfc666 to your computer and use it in GitHub Desktop.
Save romainl/3b8cdc6c3748a363da07b1a625cfc666 to your computer and use it in GitHub Desktop.
Universal opposite of J
function! BreakHere()
s/^\(\s*\)\(.\{-}\)\(\s*\)\(\%#\)\(\s*\)\(.*\)/\1\2\r\1\4\6
call histdel("/", -1)
endfunction
nnoremap <key> :<C-u>call BreakHere()<CR>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment