Skip to content

Keyboard shortcuts for opening links, copying file paths or hashes. #1078

@ferdinandyb

Description

@ferdinandyb

Abstract

Add a new feature that allows for quick action on URL-s, file paths, hashes or other user defined regexes.

Possible solutions:

  • Kitty for example has a keybind which will assign a number/letter to each visible link, and pressing the key opens the link in the default browser (see kitty's docs for details).
  • Another solution I could imagine is defining some searches for the vi-mode, so with a keybind the user could jump into vi mode with search for say URL-s already enabled. Cycling through with n and for example using gx to open the url in default browser or if it's a path or a hash than pasting it with an appropriate key.

Motivation

Currently, the fastest way to open a link seems to be ctrl + mouse click. Using only the keyboard one would need to enter vi mode, navigate manually to the URL, yank it (yiW if lucky, more complicated if not), switch to a browser, and manually input the copied URL. Which is rather cumbersome. Although vi mode is great for selecting arbitrary text, I think opening URLs and copying file paths and (git commit) hashes to the currently typed command are very common operations, that could benefit from extra speed.

Metadata

Metadata

Labels

enhancementNew feature or requestfeature-requestUser requested featuresvi-modeVi/Vim movement and operation mode

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions