Skip to main content
edited tags
Link
romainl
  • 42.3k
  • 5
  • 87
  • 118
added 1 character in body
Source Link
Sassan
  • 515
  • 4
  • 10

Consider something like this

nnoremap <silent> <leader>( F(a<cr><esc>vi(:execute"'<^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.

Consider something like this

nnoremap <silent> <leader>( F(a<cr><esc>vi(:execute"'<,'>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.

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.

Source Link
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(:execute"'<,'>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.