Skip to content

Commit

Permalink
Add :Ex[plore] command (#8959) (#8960)
Browse files Browse the repository at this point in the history
This is mapped to `workbench.view.explorer`
  • Loading branch information
bvoq authored May 20, 2024
1 parent f4efb73 commit 47fa5b5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/cmd_line/commands/explore.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { commands } from 'vscode';
import { VimState } from '../../state/vimState';
import { ExCommand } from '../../vimscript/exCommand';

export class ExploreCommand extends ExCommand {
async execute(vimState: VimState): Promise<void> {
await commands.executeCommand('workbench.view.explorer');
}
}
2 changes: 2 additions & 0 deletions src/vimscript/exCommandParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { HistoryCommand } from '../cmd_line/commands/history';
import { ClearJumpsCommand, JumpsCommand } from '../cmd_line/commands/jumps';
import { CenterCommand, LeftCommand, RightCommand } from '../cmd_line/commands/leftRightCenter';
import { DeleteMarksCommand, MarksCommand } from '../cmd_line/commands/marks';
import { ExploreCommand } from '../cmd_line/commands/explore';
import { MoveCommand } from '../cmd_line/commands/move';
import { NohlCommand } from '../cmd_line/commands/nohl';
import { OnlyCommand } from '../cmd_line/commands/only';
Expand Down Expand Up @@ -223,6 +224,7 @@ export const builtinExCommands: ReadonlyArray<[[string, string], ArgParser | und
[['ex', ''], FileCommand.argParsers.edit],
[['exe', 'cute'], undefined],
[['exi', 't'], WriteQuitCommand.argParser],
[['Ex', 'plore'], succeed(new ExploreCommand())],
[['exu', 'sage'], undefined],
[['f', 'ile'], FileInfoCommand.argParser],
[['files', ''], undefined],
Expand Down

0 comments on commit 47fa5b5

Please sign in to comment.