0
votes
0answers
21 views

with rlwrap vi file edit not happening

Am using rlwrap,with that history fetch commands editing works fine. But in vi mode am not able to edit the file, and not able to exit from vi mode. I added following entries in inputrc, set ...
0
votes
1answer
190 views

Selecting all text in Vi/Vim through PuTTY

I need to select the text in a log file (~900 lines) and paste it into a normal text file. However, I am on my server via PuTTY so when I do :%y+ or gg"+yG it does not let me paste it. By any ...
2
votes
2answers
157 views

In Vim, what are the differences between using :sus and :sh to access the shell without ending the Vim session?

I know that, while in Vim (and Vi, too, I think), if I want to temporarily access the shell I can do one of several things: Use :sh (a.k.a. :shell), then log out from the shell to return to Vim Use ...
0
votes
1answer
52 views

How to add a shell output content to vim?

When using vim, we can use :!ls to execute shell command, but how can we import the ls output into vim for editing?
12
votes
2answers
2k views

How to use a pipe to edit a file with vi

Lets say I have a file called file.txt. In it is a name of a file that I want to edit with vi. I want to do something like this so that I can edit the file: cat file.txt | vi However, that doesn't ...
26
votes
8answers
79k views

How do i select all text in Vi/Vim?

I always use vi for editing config files. Today I wanted to select all the text in a file (around 1000 lines), copy it, then paste into Google Docs. How can I do that?
12
votes
5answers
2k views

How to show the current Vi mode when using Vi keybindings in the shell?

I use the vi keybindings in my tcsh shell. Now, I don't know which vi mode I'm in (insert mode or command mode), which leads to a lot of frustration. Does anyone know of a way to show the current ...