File tree Expand file tree Collapse file tree 2 files changed +15
-3
lines changed Expand file tree Collapse file tree 2 files changed +15
-3
lines changed Original file line number Diff line number Diff line change 50
50
" ${input:name}" ,
51
51
" ${input:categoryQuery}"
52
52
],
53
+ "options" : {
54
+ "env" : {
55
+ "EDITOR" : " code -r" ,
56
+ }
57
+ },
53
58
"presentation" : {
54
59
"reveal" : " never" ,
55
60
"close" : true
67
72
" ${input:name}" ,
68
73
" ${input:categoryLibrary}"
69
74
],
75
+ "options" : {
76
+ "env" : {
77
+ "EDITOR" : " code -r"
78
+ }
79
+ },
70
80
"presentation" : {
71
81
"reveal" : " never" ,
72
82
"close" : true
Original file line number Diff line number Diff line change 1
1
#!/usr/bin/env python3
2
2
3
- # Creates a change note and opens it in VSCode for editing.
3
+ # Creates a change note and opens it in $EDITOR (or VSCode if the environment
4
+ # variable is not set) for editing.
4
5
5
6
# Expects to receive the following arguments:
6
7
# - What language the change note is for
51
52
with open (change_note_file , "w" ) as f :
52
53
f .write (change_note )
53
54
54
- # Open the change note file in VSCode, reusing the existing window if possible
55
- os .system (f"code -r { change_note_file } " )
55
+ editor = os .environ .get ('EDITOR' , 'code -r' )
56
+
57
+ os .system (f"{ editor } { change_note_file } " )
You can’t perform that action at this time.
0 commit comments