News for hackers. Stuff that matters.
Re:Vim Plugins You Should Know About, Part I: surround.vim by pmarin on Monday December 08, 2008 @02:53PM (#390278)
My favorite vim plugin is to not use any plugin: use the filter command "!", the unix way.
Re:Vim Plugins You Should Know About, Part I: surround.vim by newsycaccount on Monday December 08, 2008 @08:51PM (#390770)
more on "!":

Run the given cmd/pipeline, and put it's output at the current cursor location:

    :r ! <cmd>

Filter the whole buffer through the given cmd/pipeline:

    :%! <cmd>

Filter a visual selection through the given cmd/pipeline: make selection (with mouse if you have :set mouse=a or gvim, or with any of the variations on 'v'), then hit '!'

you will pop into a command line like this:

    :'<,'>! <cmd>

'< is the beginning of the visual selection, and '> is the end.
Re:Vim Plugins You Should Know About, Part I: surround.vim by orib on Tuesday December 09, 2008 @12:04AM (#390970)
Sure, but some things (eg, surround.vim) can't be emulated with that.
Re:Vim Plugins You Should Know About, Part I: surround.vim by pmarin on Wednesday December 10, 2008 @09:14AM (#392902)
give me an example of something that i can't filter in a sed/grep/ed/awk/perl script.