Lets say that you have either URL or a link on a webpage that is a text file. How would be the easiest way for the user to be able to open that file in a Vim?
Visually select the full path of a local html file or a URL, then type \h to preview the file or web page. Copy the full path of a local html file or a URL in another application, then type \h to preview the file or web page in Vim.
Type "gg" in command mode. This brings the cursor to the first line.
One can search forward in vim/vi by pressing / and then typing your search pattern/word. To search backward in vi/vim by pressing ? and then typing your search pattern/word. Once word found in vim, you can press the n key to go directly to the next occurrence of the word in backwards.
Depending on how your vim binary was built you can just give vim the url:
vim http://www.google.com/
Vim spawns curl and grabs the file, then opens it.
Assuming you want to just open a link in vim, how about this:
curl http://www.google.com | vim -
EDIT to make this command easier you can always user your browser of choice's "Copy link address" option.
EDIT Given @speshak's answer and my own, I would say the "easiest" way would be option 3, "a command line command".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With