edit readme

This commit is contained in:
guillermooo 2015-11-19 19:22:17 +01:00
commit 206ab01adb
6 changed files with 29 additions and 28 deletions

View File

@ -1,12 +1,13 @@
[![Build Status](https://travis-ci.org/VSCode-Extension/VSCodeVim.svg?branch=master)](https://travis-ci.org/VSCode-Extension/VSCodeVim)[![Build status](https://ci.appveyor.com/api/projects/status/0t6ljij7g5h0ddx8?svg=true)](https://ci.appveyor.com/project/guillermooo/vim)
[![Build Status](https://travis-ci.org/VSCodeVim/Vim.svg?branch=master)](https://travis-ci.org/VSCodeVim/Vim)[![Build status](https://ci.appveyor.com/api/projects/status/0t6ljij7g5h0ddx8?svg=true)](https://ci.appveyor.com/project/guillermooo/vim)
# VSCodeVim
# Vim
Vim for Visual Studio Code. *Coming Soon!* :gift:
Vim emulation for Visual Studio Code. *Coming Soon!* :gift:
## Contributing
... would be awesome! Take a look at [Extension API](https://code.visualstudio.com/docs/extensionAPI/overview) on how to get started.
## License
[MIT](LICENSE.txt)

View File

@ -5,28 +5,28 @@ export enum ModeName {
}
export abstract class Mode {
private _isActive : boolean;
private _name : ModeName;
protected _keyHistory: string[];
private isActive : boolean;
private name : ModeName;
protected keyHistory : string[];
constructor(name: ModeName) {
this._name = name;
this._isActive = false;
this._keyHistory = [];
this.name = name;
this.isActive = false;
this.keyHistory = [];
}
get Name(): ModeName {
return this._name;
return this.name;
}
get IsActive() : boolean {
return this._isActive;
return this.isActive;
}
set IsActive(val : boolean) {
if (val !== this._isActive) {
this._isActive = val;
this._keyHistory = [];
if (val !== this.isActive) {
this.isActive = val;
this.keyHistory = [];
}
}

View File

@ -7,7 +7,7 @@ export default class CommandMode extends baseMode.Mode {
}
HandleKeyEvent(key : string) : void {
this._keyHistory.push(key);
this.keyHistory.push(key);
var commands = vscode.commands.getCommands();
commands.then(c => console.log(c));

View File

@ -5,11 +5,11 @@ import CommandMode from './mode_command';
import InsertMode from './mode_insert';
export default class ModeHandler {
private _modes : Mode[];
private _statusBarItem : StatusBarItem;
private modes : Mode[];
private statusBarItem : StatusBarItem;
constructor() {
this._modes = [
this.modes = [
new CommandMode(),
new InsertMode(),
];
@ -18,7 +18,7 @@ export default class ModeHandler {
}
public get CurrentMode() : Mode {
var currentMode = this._modes.find((mode, index) => {
var currentMode = this.modes.find((mode, index) => {
return mode.IsActive;
});
@ -26,7 +26,7 @@ export default class ModeHandler {
}
public SetCurrentModeByName(modeName : ModeName) {
this._modes.forEach(mode => {
this.modes.forEach(mode => {
mode.IsActive = (mode.Name === modeName);
});
@ -63,11 +63,11 @@ export default class ModeHandler {
}
private setupStatusBarItem(text : string) : void {
if (!this._statusBarItem) {
this._statusBarItem = window.createStatusBarItem(StatusBarAlignment.Left);
if (!this.statusBarItem) {
this.statusBarItem = window.createStatusBarItem(StatusBarAlignment.Left);
}
this._statusBarItem.text = 'vim: ' + text;
this._statusBarItem.show();
this.statusBarItem.text = 'vim: ' + text;
this.statusBarItem.show();
}
}

View File

@ -6,6 +6,6 @@ export default class InsertMode extends baseMode.Mode {
}
HandleKeyEvent(key : string) : void {
this._keyHistory.push(key);
this.keyHistory.push(key);
}
}

View File

@ -5,7 +5,7 @@
"curly": true,
"eofline": false,
"forin": true,
"indent": [true, "spaces"],
"indent": [true, "tab"],
"label-position": true,
"label-undefined": true,
"max-line-length": [true, 140],
@ -48,11 +48,11 @@
"check-else",
"check-whitespace"
],
"quotemark": [false, "double"],
"quotemark": false,
"radix": true,
"semicolon": true,
"triple-equals": [true, "allow-null-check"],
"variable-name": false,
"variable-name": [true, "check-format"],
"whitespace": [true,
"check-branch",
"check-decl",