Vim can wget + c-w search

Post by Nico Brailovsky @ 2024-03-03 | Permalink | Leave a comment

I (re?)learned a thing today: Vim can wget a site!

Doing c-w gf tells Vim to open whatever path is under the cursor. This is usually something like "#include ", which means it will ask Vim to open foo/bar/baz.h. If you happen to have http://nicolasbrailo.github.io under your cursor, you'll be fetching this site into a temp buffer, in Vim.

Bonus tip:

If c-w gf isn't finding the files you want it to, you may need to set your search path:

set path+=/home/user/path/to/foo,/home/user/src/bar