-*eval.txt* For Vim version 9.1. Last change: 2025 Apr 02
+*eval.txt* For Vim version 9.1. Last change: 2025 Jun 04
VIM REFERENCE MANUAL by Bram Moolenaar
filetype string
executable string
+ *package-open*
+The |:Open| and |:Launch| command are provided by the included plugin
+$VIMRUNTIME/plugin/openPlugin.vim
+
*dist#vim9#Open()* *:Open* *:URLOpen*
*g:Openprg* *gx*
dist#vim9#Open(file: string) ~
The |:Open| user command uses file completion for its argument.
+The |:URLOpen| user command works the same but does not perform file
+completion and therefore does not expand special characters |cmdline-special|.
+
This function is by default called using the gx mapping. In visual mode
tries to open the visually selected text.
Usage: >vim
:call dist#vim9#Open(<path>)
:Open <path>
+ :URLOpen <path>
<
- *package-open*
-The |:Open| and |:Launch| command are provided by the included plugin
-$VIMRUNTIME/plugin/openPlugin.vim
-
*dist#vim9#Launch()* *:Launch*
dist#vim9#Launch(file: string) ~
# technically, -nargs=1 is correct, but this throws E480: No match
# when the argument contains a wildchar on Windows
command -complete=file -nargs=* Open vim9.Open(trim(<q-args>))
+# Use URLOpen when you don't want completion to happen
+# (or because you want to avoid cmdline-special)
+command -nargs=1 URLOpen vim9.Open(trim(<q-args>))
const no_gx = get(g:, "nogx", get(g:, "netrw_nogx", false))
if !no_gx