runtime: decouple Open and Launch commands and gx mapping from netrw

closes: #16494
fixes: ##16486

Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Luca Saccarola
2025-01-25 16:07:12 +01:00
committed by Christian Brabandt
parent d65aa1bbdb
commit c729d6d154
8 changed files with 192 additions and 166 deletions

View File

@ -1,4 +1,4 @@
*eval.txt* For Vim version 9.1. Last change: 2025 Jan 02
*eval.txt* For Vim version 9.1. Last change: 2025 Jan 25
VIM REFERENCE MANUAL by Bram Moolenaar
@ -4907,5 +4907,40 @@ executable. It takes the following arguments:
filetype string
executable string
*dist#vim9#Open()* *:Open*
*g:Openprg*
dist#vim9#Open(file: string) ~
Opens `path` with the system default handler (macOS `open`, Windows
`explorer.exe`, Linux `xdg-open`, …). If the variable |g:Openprg| exists the
string specified in the variable is used instead.
NOTE: Escaping of the path is automatically applied.
Usage: >vim
:call dist#vim9#Open(<path>)
:Open <path>
<
*dist#vim9#Launch()* *:Launch*
dist#vim9#Launch(file: string) ~
Launches <args> with the appropriate system programs. Intended for launching
GUI programs within Vim.
NOTE: escaping of <args> is left to the user
Examples: >vim
vim9script
import autoload 'dist/vim9.vim'
# Execute 'makeprg' into another xterm window
vim9.Launch('xterm ' .. expandcmd(&makeprg))
<
Usage: >vim
:call dist#vim9#Launch(<args>)
:Launch <app> <args>.
<
vim:tw=78:ts=8:noet:ft=help:norl: