Vim Open Url banner
dhruvasagar dhruvasagar

Vim Open Url

Development community

Description

A simple plugin for opening urls in browser

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

VIM Open Url v0.5.4

A VIM plugin to open urls in the default browser

This plugin aim's is to provide a cross platform API to open a url in your default web browser.

API

VIM Command :

  • :OpenURL to open given url in the default web browser
  • :OpenIn to open given url in the specified web browser
  • :OpenSearchURL to search the search terms using registered search engine.

    The default search engine is `duckduckgo` However, `google`, `stackoverflow` and `wikipedia` are also available. You can change the default by setting `g:open_url#engines#default`.

    Search engines can be added using the API `open_url#engines#add(name, pattern)` where name is a logical name and pattern is a string that represents the search url pattern, use `%s` as a placeholder for where the search term is added.

  • :OpenURLFind to find a url ahead of the cursor on the same line and open it if found. NOTE: This also moves the cursor to the url when found.

VIM Mappings :

These work in both normal mode and visual mode :

  • gB: Open url under cursor in the default web browser.
  • g<CR>: Search word under cursor using default search engine
  • gG: Google search word under cursor in the default web browser
  • gW: Wikipedia search word under cursor in the default web browser

The following plug mappings are provided which can be remapped if you prefer different mappings to those provided by default.

  • (open-url-browser)
  • (open-url-search)
  • (open-url-search-so)
  • (open-url-search-google)
  • (open-url-search-wikipedia)

VIM Variables :

  • g:open_url_browser_default changes default browser (Default: xdg-open)
  • g:open_url_default_mappings enable/disable default mappings without remapping mappings (Default: 1)

VIM autoload function :

  • open_url#open(url): Open given url in the default we