Skip to content

Commit

Permalink
Merge pull request #5 from VSCode-Extension/ex-mode
Browse files Browse the repository at this point in the history
command line mode refactoring
  • Loading branch information
guillermooo committed Nov 16, 2015
2 parents 335e93b + ef66cab commit 974dab8
Show file tree
Hide file tree
Showing 15 changed files with 753 additions and 814 deletions.
45 changes: 24 additions & 21 deletions src/cmd_line/command_node.ts
Original file line number Diff line number Diff line change
@@ -1,23 +1,26 @@
import * as vscode from 'vscode';
import * as token from './token';
import * as node from './node';
import * as lexer from './lexer';
import * as util from '../util';
import * as vscode from "vscode";
import * as token from "./token";
import * as node from "./node";
import * as lexer from "./lexer";
import * as util from "../util";

export class WriteCommand implements node.CommandBase {
name : string;
shortName : string;
args : Object;

constructor(args : Object = null) {
// TODO: implement other arguments.
this.name = 'write';
this.shortName = 'w';
this.args = args;
}

runOn(textEditor : vscode.TextEditor) : void {
if (this.args || !textEditor.document.fileName) util.showInfo("Not implemented.");
textEditor.document.save();
}
}
name : string;
shortName : string;
args : Object;

constructor(args : Object = null) {
// TODO: implement other arguments.
this.name = "write";
this.shortName = "w";
this.args = args;
}

runOn(textEditor : vscode.TextEditor) : void {
if (this.args || !textEditor.document.fileName) {
util.showInfo("Not implemented.");
return;
}
textEditor.document.save();
}
}
Loading

0 comments on commit 974dab8

Please sign in to comment.