Jay Taylor | programmer notes

TAG | Automation

Oct/09

26

Automating Vim Actions

I have finally discovered how to automate the nice regular-expressions capable search-and-replace functionality with Vim.  This provides a way to run Vim commands without having to ever enter the program!  Very useful for automation.  Sed is a great tool, but I am so used to Vim, and usually computational speed is not my primary concern.

vim -c %s/old/new/g -c wq somefile.txt

(more…)

, Hide

Find it!