Use file selection dialog
Example
Normal 0 / 4Command-line 1 / 4Awaiting choice 2 / 4Awaiting choice 3 / 4Normal 4 / 4alpha
beta
gammaCursor on line 1, column 1alpha
beta
gammaCursor on line 1, column 1alpha
beta
gammaCursor on line 1, column 1alpha
beta
gammaCursor on line 1, column 1betaCursor on line 1, column 1Use file selection dialog.
Command entered · ready to apply
Command line
- Typed text
:browse edit- Insertion offset
12
The :browse modifier opens a supported GUI file selection dialog.
GUI file chooser
- Directory files
alpha.txt, beta.txt- Current selection
none
Click beta.txt in the file chooser to select it; the dialog still waits for the Open button.
GUI file chooser
- Directory files
alpha.txt, beta.txt- Current selection
beta.txt- Open button
ready
The GUI file chooser is shown; choosing beta.txt and accepting opens that file.
File chooser result
- Chosen file
beta.txt
Windows
- beta.txt Active
beta
Before & after
alpha
beta
gammaCursor on line 1, column 1betaCursor on line 1, column 1File chooser result
- Chosen file
beta.txt
Windows
- beta.txt Active
beta
Documentation-backed illustration. a supported GUI with +browse; beta.txt exists, the current buffer is unmodified, and the illustrated user accepts beta.txt. The GUI file chooser is shown; choosing beta.txt and accepting opens that file. Primary help: :browse.
Details & Vim help
Use file selection dialog. This Ex reference uses the full command name; the alphabetical index omits arguments. Supply the ranges, arguments, flags and prerequisite state documented in the linked help. Press Enter to submit a complete command. The index spelling :bro[wse] puts the optional abbreviation suffix in square brackets; those brackets are not typed. Availability and exact behavior can depend on Vim build features, options, mappings and editor state; the linked help is authoritative.