Articles tagged “today-i-learned”

TIL: pedit

Often times I find myself editing a file and I suddenly realize I need to look up some data from some other file. Until today, I would normally do something along the lines of the following:

I continue editing my original file. When I find I no longer need the reference file, I need to switch to it and kill its window:

There is a better way. pedit path/to/file (or :ped if you’re lazy like me) will open a split window just as before, but cuts out the middle commands. Focus stays on the file I was working on with my cursor unmoved. The same scenario with :pedit is:

Four steps cut to two. This is why I use vim.

Published on October 10, 2010 Comments