In a bash script I want to edit a file. Is there a way to write a macro in vim, save it and then call it in bash script?
Tell me more
×
Unix & Linux Stack Exchange is a question and answer site for
users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.
|
No problem: Create the macro file with vi commands. For example:
Then run One advice: Try to use |
||||
|
|
|
This is an example of the use of vim to create HTML versions of files with vim :
|
|||
|
|
|
You could use Eran's answer is definitely correct, but I'd personally use
This is my preferred way, because there are not multiple files. If you remap escape to jj (for example), you can easily make more complicated normal statements:
For your information:
|
||||
|
|
