Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

2
  • thank help convert lua script with zero error. But it doesn't work well, The idea is Splitting line capital k (shift+k) opposite of capital J (joining line), In vim script work quiet well. function! BreakHere() s/^\(\s*\)\(.\{-}\)\(\s*\)\(\%#\)\(\s*\)\(.*\)/\1\2\r\1\4\6 call histdel("/", -1) endfunction nnoremap K :<C-u>call BreakHere()<CR> Commented Dec 10, 2024 at 7:37
  • Could you give us an example that works with the Vim Substitution and not with the mapping? It would help us reproducing the problem :-) Commented Dec 10, 2024 at 7:58