Comments (3)
I think it should be easy to implement as long as we have a way to open the default browser that works on linux/windows/osx.
Maybe using something like https://github.com/chrishrb/gx.nvim?
The gx mapping is already a default builtin that is cross-platform. In t
and nt
mode we could just have cursorless issue a gx
on the target and it's up to the user to manually install gx.nvim or not if they want something fancier. Could be listed as a recommended plugin or something.
From :help gx
:
gx Opens the current filepath or URL (decided by
|<cfile>|, 'isfname') at cursor using the system
default handler, by calling |vim.ui.open()|.
*v_gx*
{Visual}gx Opens the selected text using the system default
handler, by calling |vim.ui.open()|.
From :help vim.ui.open()
:
vim.ui.open({path}) *vim.ui.open()*
Opens `path` with the system default handler (macOS `open`, Windows
`explorer.exe`, Linux `xdg-open`, …), or returns (but does not show) an
error message on failure.
Expands "~/" and environment variables in filesystem paths.
Examples: >lua
-- Asynchronous.
vim.ui.open("https://neovim.io/")
vim.ui.open("~/path/to/file")
-- Synchronous (wait until the process exits).
local cmd, err = vim.ui.open("$VIMRUNTIME")
if cmd then
cmd:wait()
end
<
Parameters: ~
• {path} (`string`) Path or URL to open
Return (multiple): ~
(`vim.SystemObj?`) Command object, or nil if not found.
(`string?`) Error message on failure, or nil on success.
See also: ~
• |vim.system()|
For being able to jump to definition (which is outside the scope of terminal side I think?) you'd have to do some more complicated target pre-parsing to see if it is a URL, path, or a follow-able symbol I guess.
from cursorless.
note that it should also jump to definition if you use it to target an identifier
from cursorless.
I think it should be easy to implement as long as we have a way to open the default browser that works on linux/windows/osx.
Maybe using something like https://github.com/chrishrb/gx.nvim?
from cursorless.
Related Issues (20)
- neovim: use vim.fn.getregionpos() to replace buffer_get_selection() HOT 2
- neovim: test that neovim's config loads properly
- Switch from `CURSORLESS_TEST` to `CURSORLESS_MODE` environment variable HOT 2
- Add ability to repeat last cursorless command
- keyboard: Add ability to make range past output of modifier
- keyboard: Undo stack for keyboard target
- keyboard: support ordinal modifiers
- keyboard: Switch default maps for surrounding pairs to the delimiters themselves
- keyboard: By default, move selection when user sets keyboard target
- keyboard: Have keyboard target follow selection if it moves
- keyboard: Add support for "rewrap"
- keyboard: Support targeting modes for targeting selection
- Change default nested modifier for tail to stop at "inside"
- parsed actions: Better error message on failed parse
- parsed actions: Handle destination placeholders
- parsed actions: Fill out rest of grammar
- keyboard: Support parsed actions
- neovim: The show logs task can currently fail when it shouldn't
- neovim: `Neovim: Test` launch command doesn't auto attach to neovim node process on Linux
- Unable to use "@" in string literals within .scm files
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cursorless.