Skip to content

Commit 158bbaa

Browse files
committed
implement A to insert EOL. Release v0.0.2
1 parent 4fa94e1 commit 158bbaa

File tree

4 files changed

+13
-7
lines changed

4 files changed

+13
-7
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[![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) [![Slack Status](http://slackin.westus.cloudapp.azure.com/badge.svg)](http://slackin.westus.cloudapp.azure.com)
22

3-
# VSCodeVim
3+
# Vim
44

55
Vim emulation for Visual Studio Code.
66

@@ -9,7 +9,7 @@ Vim emulation for Visual Studio Code.
99
## Installation and Usage
1010

1111
1. Install [Visual Studio Code](https://code.visualstudio.com/)
12-
2. In the command palette (`Ctrl-Shift-P` or `Cmd-Shift-P`) select `Install Extension` and search for **vim**. Alternatively, run `ext install vscodevim`
12+
2. In the command palette (`Ctrl-Shift-P` or `Cmd-Shift-P`) select `Install Extension` and search for **vim**. Alternatively, run `ext install vim`
1313

1414
## Project Status
1515

@@ -27,7 +27,7 @@ Vim emulation for Visual Studio Code.
2727
* Indentation: `>>`, `<<`
2828
* Deletion: `dd`, `dw`
2929
* Editing: `u`, `ctrl+r`
30-
* File Operations: `:q`
30+
* File Operations: `:q`, `:w`
3131

3232
### Planned
3333

@@ -40,7 +40,7 @@ In no particular order:
4040

4141
## Contributions
4242

43-
Contributions are extremely welcomed! Take a look at [Extension API](https://code.visualstudio.com/docs/extensionAPI/overview) on how to get started and our current [Issues](https://github.com/VSCodeVim/Vim/issues) to see what we are working on next.
43+
Contributions are extremely welcomed! Take a look at [Extension API](https://code.visualstudio.com/docs/extensionAPI/overview) on how to get started and our current [ssues](https://github.com/VSCodeVim/Vim/issues) to see what we are working on next.
4444

4545
## License
4646

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"displayName": "Vim",
44
"description": "Vim emulation for Visual Studio Code",
55
"icon": "images/icon.png",
6-
"version": "0.0.1",
6+
"version": "0.0.2",
77
"publisher": "vscodevim",
88
"galleryBanner": {
99
"color": "#a5c9a2",

src/mode/modeInsert.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export default class InsertMode extends Mode {
1919
"a" : (position) => { return new vscode.Position(position.line, position.character + 1); },
2020

2121
// append at the end of the line
22-
"A" : (position) => { return position; },
22+
"A" : (position) => { return TextEditor.GetEndOfLine(position); },
2323

2424
// open blank line below current line
2525
"o" : (position) => {

src/textEditor.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,13 @@ export default class TextEditor {
4040
}
4141

4242
static SetCurrentPosition(position: vscode.Position) {
43-
var newSelection = new vscode.Selection(position, position);
43+
let newSelection = new vscode.Selection(position, position);
4444
vscode.window.activeTextEditor.selection = newSelection;
4545
}
46+
47+
static GetEndOfLine(position: vscode.Position) : vscode.Position {
48+
const lineLength = vscode.window.activeTextEditor.document.lineAt(position.line).text.length;
49+
50+
return new vscode.Position(position.line, lineLength);
51+
}
4652
}

0 commit comments

Comments
 (0)