File tree Expand file tree Collapse file tree 5 files changed +16
-5
lines changed Expand file tree Collapse file tree 5 files changed +16
-5
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ If the colors and looks of the syntax highlighting is not correct or as fancy as
25
25
// - markup.other.task.checkbox.ongoing.xit
26
26
// - markup.other.task.checkbox.checked.xit
27
27
// - markup.other.task.checkbox.obsolete.xit
28
+ // - markup.other.task.checkbox.inquestion.xit
28
29
// - markup.other.task.description.closed.xit
29
30
// - markup.other.task.priority.xit
30
31
// - markup.other.task.date.xit
@@ -76,3 +77,4 @@ The extension provides shortcuts for toggling/shuffling checkbox state. The shor
76
77
- ` a ` /` @ ` - Ongoing (` [@] ` )
77
78
- ` o ` /` ~ ` - Obsolete (` [~] ` )
78
79
- ` x ` - Checked (` [x] ` )
80
+ - ` q ` - Question (` [?] ` )
Original file line number Diff line number Diff line change 2
2
"name" : " xit" ,
3
3
"displayName" : " xit!" ,
4
4
"description" : " Language support for todo lists with xit syntax." ,
5
- "version" : " 0.0.4 " ,
5
+ "version" : " 0.0.5 " ,
6
6
"publisher" : " tscpp" ,
7
7
"repository" : " https://github.com/tscpp/xit-vscode" ,
8
8
"engines" : {
Original file line number Diff line number Diff line change 18
18
"prefix" : " @" ,
19
19
"body" : [" [@] $1" ],
20
20
"description" : " Ongoing item"
21
+ },
22
+ "In Question Item (?)" : {
23
+ "prefix" : " q" ,
24
+ "body" : [" [?] $1" ],
25
+ "description" : " In Question item"
21
26
},
22
27
"Obsolete Item (o)" : {
23
28
"prefix" : " o" ,
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ export function activate(context: vscode.ExtensionContext) {
48
48
const editor = vscode . window . activeTextEditor ! ;
49
49
50
50
editSelectedCheckboxes ( editor , ( value ) => {
51
- return / ^ \s * $ / . test ( value ) ? 'x' : ' ' ;
51
+ return / ^ ( \s * | \? ) $ / . test ( value ) ? 'x' : ' ' ;
52
52
} ) ;
53
53
} ) ) ;
54
54
@@ -59,10 +59,11 @@ export function activate(context: vscode.ExtensionContext) {
59
59
const edit =
60
60
/* 1. " " -> "@" */ / ^ \s * $ / . test ( value ) ? '@' :
61
61
/* 2. "@" -> "~" */ value === '@' ? '~' :
62
- /* 3. "~" -> "x" */ value === '~' ? 'x' :
62
+ /* 3. "~" -> "?" */ value === '~' ? '?' :
63
+ /* 3. "?" -> "x" */ value === '?' ? 'x' :
63
64
/* 4. "x" -> " " */ value === 'x' ? ' '
64
65
/* fallback */ : ' ' ;
65
-
66
+
66
67
return edit ;
67
68
} ) ;
68
69
} ) ) ;
Original file line number Diff line number Diff line change 25
25
]
26
26
},
27
27
"open-item" : {
28
- "begin" : " ^(?:(\\ [ *\\ ])|(\\ [@\\ ]))[^\\ S\\ n]*(.*(?= |$))" ,
28
+ "begin" : " ^(?:(\\ [ *\\ ])|(\\ [@\\ ])|( \\ [ \\ ? \\ ]) )[^\\ S\\ n]*(.*(?= |$))" ,
29
29
"beginCaptures" : {
30
30
"1" : {
31
31
"name" : " variable.function.xit, markup.other.task.checkbox.open.xit"
34
34
"name" : " storage.type.xit, markup.other.task.checkbox.ongoing.xit"
35
35
},
36
36
"3" : {
37
+ "name" : " entity.name.type.enum.xit, markup.other.task.checkbox.ongoing.xit"
38
+ },
39
+ "4" : {
37
40
"patterns" : [
38
41
{
39
42
"include" : " #item-description"
You can’t perform that action at this time.
0 commit comments