mirror of
https://github.com/James-Yu/LaTeX-Workshop.git
synced 2024-10-04 15:17:59 +03:00
Autocomplete for \left command
Signed-off-by: Joao C. Monteiro <jcmonteiro@poli.ufrj.br>
This commit is contained in:
parent
a34eb07ed5
commit
b0ceb7ff68
@ -4,6 +4,21 @@
|
||||
"snippet":"begin{${1:env}}\n\t$2\n\\\\end{${1:env}}",
|
||||
"detail":"begin a new environment"
|
||||
},
|
||||
"lrparen":{
|
||||
"command":"left(",
|
||||
"snippet":"left(${1}\\right)${0}",
|
||||
"detail":"\\left( ... \\right)"
|
||||
},
|
||||
"lrbrack":{
|
||||
"command":"left[",
|
||||
"snippet":"left[${1}\\right]${0}",
|
||||
"detail":"\\left[ ... \\right]"
|
||||
},
|
||||
"lrcurly":{
|
||||
"command":"left\\{",
|
||||
"snippet":"left\\{${1}\\right\\\\}${0}",
|
||||
"detail":"\\left\\{ ... \\right\\}"
|
||||
},
|
||||
"latexinlinemath":{
|
||||
"command":"(",
|
||||
"snippet":"(${1}\\)${0}",
|
||||
|
@ -48,7 +48,7 @@ export class Command {
|
||||
command.insertText = new vscode.SnippetString(item.snippet)
|
||||
this.defaultCommands[key] = command
|
||||
})
|
||||
const bracketCommands = {'latexinlinemath': '(', 'latexdisplaymath': '[', 'curlybrackets': '{'}
|
||||
const bracketCommands = {'latexinlinemath': '(', 'latexdisplaymath': '[', 'curlybrackets': '{', 'lrparen': 'left(', 'lrbrack': 'left[', 'lrcurly': 'left\\{'}
|
||||
this.specialBrackets = Object.keys(this.defaultCommands)
|
||||
.filter(key => bracketCommands.hasOwnProperty(key))
|
||||
.reduce((obj, key) => {
|
||||
|
Loading…
Reference in New Issue
Block a user