Quantcast
Channel: How to execute selected lines in bash and print the output in the next line? - Vi and Vim Stack Exchange
Browsing all 3 articles
Browse latest View live

Answer by Ralf for How to execute selected lines in bash and print the output...

I would propose the following:nnoremap _X :put =system(getline('.'))<cr>vnoremap _X :<C-U>'>put =system(join(getline('''<','''>'),\"\n\").\"\n\")<cr>The first mapping is to...

View Article



Answer by B.G. for How to execute selected lines in bash and print the output...

When you have the lines selected you could just use the following:yPgv:!bashIf you want to have that as a mapping you can do like that::xnoremap x yPgv:!bash<CR>To be clear, do NOT use x here but...

View Article

How to execute selected lines in bash and print the output in the next line?

I know that with this command::yyp!!bashI can execute current line and print the output in the next line (actually it copies the current line to the next line, executes it, and replaces it with the...

View Article
Browsing all 3 articles
Browse latest View live




Latest Images