mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-22 11:47:52 +00:00
Changed shortcut to CTRL + /, fixed icon
This commit is contained in:
@@ -115,10 +115,10 @@ module.exports = [
|
||||
},
|
||||
{
|
||||
name : 'Add Comment',
|
||||
icon : 'fas fa-comment-code', /* might need to be fa-solid fa-comment-code --not sure, Gazook */
|
||||
icon : 'fas fa-code', /* might need to be fa-solid fa-comment-code --not sure, Gazook */
|
||||
gen : dedent`\n
|
||||
<!-- Add a comment to your code here. Hotkey Ctrl/Cmd \\ -->
|
||||
\n`
|
||||
<!-- This is a comment that will not be rendered into your brew. Hotkey (Ctrl/Cmd + /). -->
|
||||
`
|
||||
},
|
||||
]
|
||||
},
|
||||
|
||||
@@ -102,11 +102,9 @@ module.exports = [
|
||||
},
|
||||
{
|
||||
name : 'Add Comment',
|
||||
icon : 'fas fa-comment-code', /* might need to be fa-solid fa-comment-code --not sure, Gazook */
|
||||
gen : dedent`\n
|
||||
<!-- Add a comment to your code here. Hotkey Ctrl/Cmd \\ -->
|
||||
\n`
|
||||
},
|
||||
icon : 'fas fa-code',
|
||||
gen : `\n<!-- This is a comment that will not be rendered into your brew. Hotkey (Ctrl/Cmd + /). -->\n\n`
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
|
||||
@@ -59,8 +59,8 @@ const CodeEditor = createClass({
|
||||
'Cmd-I' : this.makeItalic,
|
||||
'Ctrl-M' : this.makeSpan,
|
||||
'Cmd-M' : this.makeSpan,
|
||||
'Ctrl-\\' : this.makeComment,
|
||||
'Cmd-\\' : this.makeComment,
|
||||
'Ctrl-/' : this.makeComment,
|
||||
'Cmd-/' : this.makeComment,
|
||||
}
|
||||
});
|
||||
|
||||
@@ -101,7 +101,7 @@ const CodeEditor = createClass({
|
||||
this.codeMirror.replaceSelection(t ? selection.slice(4, -3) : `<!-- ${selection} -->`, 'around');
|
||||
if(selection.length === 0){
|
||||
const cursor = this.codeMirror.getCursor();
|
||||
this.codeMirror.setCursor({ line: cursor.line, ch: cursor.ch - 3 });
|
||||
this.codeMirror.setCursor({ line: cursor.line, ch: cursor.ch - 4 });
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user