Skip to content

Commit 7ef7461

Browse files
Fixed conventions and added repository url to package.json.
1 parent ac275bf commit 7ef7461

File tree

2 files changed

+19
-6
lines changed

2 files changed

+19
-6
lines changed

package.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,25 @@
44
"description": "Allows the user to navigate swiftly between paragraphs",
55
"version": "0.0.1",
66
"publisher": "brokenprogrammer",
7+
"repository": {
8+
"type": "git",
9+
"url": "https://github.com/brokenprogrammer/ParagraphJump"
10+
},
11+
"homepage": "https://github.com/brokenprogrammer/ParagraphJump",
12+
"bugs": {
13+
"url": "https://github.com/brokenprogrammer/ParagraphJump/issues"
14+
},
715
"engines": {
816
"vscode": "^1.51.0"
917
},
1018
"categories": [
1119
"Other"
1220
],
21+
"keywords": [
22+
"navigation",
23+
"keybindings",
24+
"travel"
25+
],
1326
"activationEvents": [
1427
"onCommand:paragraphjump.up",
1528
"onCommand:paragraphjump.down"

src/extension.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,22 @@ const targetLineIsEmptyOrWhitespace = (
66
) => !document.lineAt(line).isEmptyOrWhitespace;
77

88
enum LineOperation {
9-
Up = 1,
10-
Down = 2,
9+
up = 1,
10+
down = 2,
1111
}
1212

1313
function getNextLine(editor: vscode.TextEditor, op: LineOperation) {
1414
let document = editor.document;
1515
let line = editor.selection.active.line;
1616

1717
switch (op) {
18-
case LineOperation.Up:
18+
case LineOperation.up:
1919
{
2020
while (line > 0 && targetLineIsEmptyOrWhitespace(--line, document)) {}
2121
}
2222
break;
2323

24-
case LineOperation.Down:
24+
case LineOperation.down:
2525
{
2626
while (
2727
line < document.lineCount - 1 &&
@@ -44,7 +44,7 @@ export function activate(context: vscode.ExtensionContext) {
4444
let paragraphJumpUp = vscode.commands.registerTextEditorCommand(
4545
"paragraphjump.up",
4646
(editor: vscode.TextEditor) => {
47-
let targetLine: vscode.TextLine = getNextLine(editor, LineOperation.Up);
47+
let targetLine: vscode.TextLine = getNextLine(editor, LineOperation.up);
4848
const newPosition = new vscode.Position(targetLine.lineNumber, 0);
4949
moveCursor(editor, newPosition);
5050
}
@@ -53,7 +53,7 @@ export function activate(context: vscode.ExtensionContext) {
5353
let paragraphJumpDown = vscode.commands.registerTextEditorCommand(
5454
"paragraphjump.down",
5555
(editor: vscode.TextEditor) => {
56-
let targetLine: vscode.TextLine = getNextLine(editor, LineOperation.Down);
56+
let targetLine: vscode.TextLine = getNextLine(editor, LineOperation.down);
5757
const newPosition = new vscode.Position(targetLine.lineNumber, 0);
5858
moveCursor(editor, newPosition);
5959
}

0 commit comments

Comments
 (0)