vi help, how to modify previous command
Is there a way to get the command in vi that I typed in previously? I am sure there must be, but I just don't know how to get it. :)
Here is an example, I typed following command to modify the word outputofthisfile from a file Code:
:%s/outputofthisfile/output of this file/g I want to modify the /outputofthisfile/ to /inputofthisfile/ instead of writing the whole thing again. |
use colon ( : ) to enter extended mode, then press the up arrow. vim (assuming you are actually using vim not vi) lets you see a history of commands you have run in the past.
Good luck =0) |
All times are GMT -5. The time now is 01:06 AM. |