Tutorial by Examples

If you would like to use vim in a manner similar to sed, you may use the -c flag to run an ex command from the command line. This command will run automatically before presenting the file to you. For example, to replace foo with bar: vim file.txt -c "s/foo/bar" This will open up the fi...

Page 1 of 1