wellle / vimsed

The vimsed script makes vim behave kind of like sed. Syntax: vimsed "<vim normal-mode keystrokes>" (/Syntax). vimsed will "pipe" stdin to stdout, modifying it first by running the keystrokes. Note/Warning: Uses temporary files temp, temp.vim and temp2 in the ~ directory.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The vimsed script makes vim behave kind of like sed. 

Syntax: vimsed "<vim normal-mode keystrokes>"

vimsed will "pipe" stdin to stdout, modifying it first by running the keystrokes.

Note/Warning: Uses temporary files temp, temp.vim and temp2 in the ~ directory.

Example: (type ctrl-v enter to get the ^M, it stands for a carriage return)

$ vimsed ":s/e/i/g^M"
(user input:)
hello
hello
(Ctrl-D to terminate user input)
(vimsed output:)
hillo
hello

About

The vimsed script makes vim behave kind of like sed. Syntax: vimsed "<vim normal-mode keystrokes>" (/Syntax). vimsed will "pipe" stdin to stdout, modifying it first by running the keystrokes. Note/Warning: Uses temporary files temp, temp.vim and temp2 in the ~ directory.