mirror of
https://github.com/VSCodeVim/Vim.git
synced 2024-09-11 12:25:59 +03:00
update roadmap for tab commands
This commit is contained in:
parent
1bf1841a2e
commit
c0a986f991
12
ROADMAP.md
12
ROADMAP.md
@ -447,7 +447,7 @@ Status | Command | Description | Note
|
||||
:white_check_mark: | :se[t] {option}={value} | set string/number option to {value}
|
||||
:white_check_mark: | :se[t] {option}+={value} | append {value} to string option, add {value} to number option
|
||||
:white_check_mark: | :se[t] {option}-={value} | remove {value} to string option, subtract {value} from number option | We don't support string option here yet.
|
||||
| :se[t] {option}? | show value of {option}
|
||||
:white_check_mark: | :se[t] {option}? | show value of {option}
|
||||
:arrow_down: | :se[t] {option}& | reset {option} to its default value
|
||||
:arrow_down: | :setl[ocal] | like ":set" but set the local value for options that have one
|
||||
:arrow_down: | :setg[lobal] | like ":set" but set the global value of a local option
|
||||
@ -531,12 +531,12 @@ Status | Command | Description | Note
|
||||
| {count}<C-PageUp>, {count}gT | Same as above
|
||||
:white_check_mark: | :tabfir[st] | Go to the first tab page.
|
||||
:white_check_mark: | :tabl[ast] | Go to the last tab page.
|
||||
:running: | :tabe[dit] {file} | Open a new tab page with an empty window, after the current tab page | {file} is not supported yet.
|
||||
:arrow_down: | :[count]tabe[dit], :[count]tabnew | Same as above | [count] is not supported yet.
|
||||
:running: | :tabnew {file} | Open a new tab page with an empty window, after the current tab page | {file} is not supported yet.
|
||||
:white_check_mark: | :tabe[dit] {file} | Open a new tab page with an empty window, after the current tab page
|
||||
:arrow_down: | :[count]tabe[dit], :[count]tabnew | Same as above | [count] is not supported.
|
||||
:white_check_mark: | :tabnew {file} | Open a new tab page with an empty window, after the current tab page
|
||||
:arrow_down:| :[count]tab {cmd} | Execute {cmd} and when it opens a new window open a new tab page instead.
|
||||
:running: | :tabc[lose][!] :1234: | Close current tab page or close tab page {count}. | `!` is not supported yet.
|
||||
:running: | :tabo[nly][!] | Close all other tab pages. | `!` is not supported yet.
|
||||
:white_check_mark: :star: | :tabc[lose][!] :1234: | Close current tab page or close tab page {count}. | Code will close tab directly without saving.
|
||||
:white_check_mark: :star: | :tabo[nly][!] | Close all other tab pages. | `!` is not supported yet. | Code will close tab directly without saving.
|
||||
:white_check_mark: | :tabm[ove] [N] | Move the current tab page to after tab page N.
|
||||
:arrow_down:| :tabs | List the tab pages and the windows they contain. | You can always use Code's built-in shortcut: `cmd/ctrl+p`
|
||||
:arrow_down:| :tabd[o] {cmd} | Execute {cmd} in each tab page.
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
import * as vscode from "vscode";
|
||||
import * as node from "../node";
|
||||
import * as path from "path";
|
||||
|
||||
export enum Tab {
|
||||
Next,
|
||||
@ -17,6 +18,7 @@ export enum Tab {
|
||||
export interface ITabCommandArguments extends node.ICommandArgs {
|
||||
tab: Tab;
|
||||
count?: number;
|
||||
file?: string;
|
||||
}
|
||||
|
||||
//
|
||||
@ -67,7 +69,17 @@ export class TabCommand extends node.CommandBase {
|
||||
this.executeCommandWithCount(1, "workbench.action.openLastEditorInGroup");
|
||||
break;
|
||||
case Tab.New:
|
||||
this.executeCommandWithCount(1, "workbench.action.files.newUntitledFile");
|
||||
if (this.arguments.file) {
|
||||
let currentFilePath = vscode.window.activeTextEditor.document.uri.path;
|
||||
let newFilePath = path.join(path.dirname(currentFilePath), this._arguments.file);
|
||||
|
||||
if (newFilePath !== currentFilePath) {
|
||||
let folder = vscode.Uri.file(newFilePath);
|
||||
vscode.commands.executeCommand("vscode.open", folder);
|
||||
}
|
||||
} else {
|
||||
this.executeCommandWithCount(1, "workbench.action.files.newUntitledFile");
|
||||
}
|
||||
break;
|
||||
case Tab.Close:
|
||||
// Navigate the correct position
|
||||
|
@ -74,9 +74,16 @@ export function parseTabLastCommandArgs(args : string) : node.TabCommand {
|
||||
* :tabnew Open a new tab page with an empty window, after the current tab page.
|
||||
*/
|
||||
export function parseTabNewCommandArgs(args: string) : node.TabCommand {
|
||||
// TODO: Tab New takes parameter file name.
|
||||
let name = "";
|
||||
|
||||
if (args) {
|
||||
let scanner = new Scanner(args);
|
||||
name = scanner.nextWord();
|
||||
}
|
||||
|
||||
return new node.TabCommand({
|
||||
tab: node.Tab.New
|
||||
tab: node.Tab.New,
|
||||
file: name
|
||||
});
|
||||
}
|
||||
|
||||
@ -85,6 +92,9 @@ export function parseTabNewCommandArgs(args: string) : node.TabCommand {
|
||||
* :tabc[lose][!] {count}. Close tab page {count}.
|
||||
*/
|
||||
export function parseTabCloseCommandArgs(args: string) : node.TabCommand {
|
||||
if (args && args !== "" && args.startsWith("!")) {
|
||||
|
||||
}
|
||||
return new node.TabCommand({
|
||||
tab: node.Tab.Close,
|
||||
count: parseCount(args)
|
||||
|
Loading…
Reference in New Issue
Block a user