Skip to main content
2 of 3
added 1 character in body
Sassan
  • 515
  • 4
  • 10

Ability to make vim run commands in background and only show the final result on screen

Consider something like this

nnoremap <silent> <leader>( F(a<cr><esc>vi(:^Uexecute"'<,'>s/,/,\r/gg"<cr>=i(k$%i,<cr><esc>%:nohlsearch<cr>

It expands arguments of a function in lines. (You can run it on (a, b, c, d) for example.) The problem is things happen in front of my eyes while I expect it to happen in background and only show me the final result. I just thought maybe there's a way to make vim do some commands in background and just show the final result on screen.

Sassan
  • 515
  • 4
  • 10