diff --git a/README.md b/README.md index 788fb89..4696f0d 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,7 @@ smart people at [Hashrocket](http://hashrocket.com/). - [Generate and Edit Rails Migration](vim/generate-and-edit-rails-migration.md) - [Head of File Name](vim/head-of-file-name.md) +- [Opening a URL](vim/opening-a-url.md) - [Preview Buffer](vim/previous-buffer.md) - [Quick File Info](vim/quick-file-info.md) - [Quick Man Pages](vim/quick-man-pages.md) diff --git a/vim/opening-a-url.md b/vim/opening-a-url.md new file mode 100644 index 0000000..9bf7562 --- /dev/null +++ b/vim/opening-a-url.md @@ -0,0 +1,11 @@ +# Opening a URL + +Vim makes it easy to quickly open a URL that appears in a file. Simply move +the cursor over the URL and hit `gx`. This will use your respective +operating system's *open* command (e.g. `open` for Mac OS X) to open the +URL. + +One caveat is that the URL must contain the protocol/scheme. That is, +`www.duckduckgo.com` won't work, but `https://www.duckduckgo.com` will. + +You can also use `gx` to open files on your system.