how can i use a script to run in vi !
hi all!
what i actually want is to run script containing vi commands (not shell commands)on a text file. is there any way to do this? |
It's called 'ex' command. Run 'man ex'.
|
Hi
Here is an example: I wrote a file 'script.vim' containing vim commands: Quote:
Code:
vim text_file_name -s script.vim the first 'a' is the ex command to append text, then the text to write in the file, the ESC character, to write it use <ctrl-v> <ESC> keys, ':wq' to save and quit the editor. Hope this will help you. Have a nice day. |
All times are GMT -5. The time now is 04:57 AM. |