Configurazione
json
{
"workbench.tree.indent": 16,
"workbench.iconTheme": "material-icon-theme",
}
Creare un profilo di configurazione
Manage > Profile (Default) > New profile
Impostazioni Specifiche per lo spazio di lavoro
Per applicare le impostazioni specificamente questo progetto possiamo farlo all'interno di un "spazio di lavoro" (Workspace). Per farlo basta creare un file settings.json
all'interno della cartella .vscode
del progetto.
json
{
"editor.wordWrap": "wordWrapColumn",
"workbench.tree.indent": 16,
"editor.cursorStyle": "line",// underline
"editor.cursorSmoothCaretAnimation": "on",
"editor.cursorBlinking": "solid", // expand
}
Impostazioni specifiche per un linguaggio
Per impostare delle impostazioni specifiche per un linguaggio possiamo farlo all'interno del file settings.json
del progetto.
json
{
"[markdown]": {
"editor.wordWrap": "wordWrapColumn",
"editor.wordWrapColumn": 80,
"editor.rulers": [
{ "column": 80, "color": "#003cff" },
{ "column": 120, "color": "#ff0000" }
]
}
}
Scorciatoie da tastiera
Per visualizzare le keybinding attualmente definite sull'edito è sufficiente digitare Ctrl+shift+P
e poi cercare "Preferences: Open Keyboard Shortcuts" oppure digitare direttamente Ctrl+K
Ctrl+S
(Keyboard Settings)
Alcune scorciatoie da tastiera sono già definite dall'estensione LaTeX Workshop Nel campo di testo inserire @ext:James-Yu.latex-workshop
.
Commando | Associazione dei tasti |
---|---|
latex-workshop.shortcut.emph | Ctrl+L Ctrl+E |
latex-workshop.shortcut.textbf | Ctrl+L Ctrl+B |
latex-workshop.shortcut.textsc | Ctrl+L Ctrl+C |
latex-workshop.shortcut.textsl | Ctrl+L Ctrl+S |
latex-workshop.shortcut.texttt | Ctrl+L Ctrl+T |
json
[
{
"name":"Insert bold text",
"key": "ctrl+shift+B",
"command": "editor.action.insertSnippet",
"when": "editorLangId == latex && editorTextFocus",
"args": {
"snippet": "\\textbf{${TM_SELECTED_TEXT}}$0"
}
},
{
"name":"Insert emphatized text",
"key": "ctrl+shift+I",
"command": "editor.action.insertSnippet",
"when": "editorLangId == latex && editorTextFocus",
"args": {
"snippet": "\\emph{${TM_SELECTED_TEXT}}$0"
}
},
{
"name":"Insert monofont text",
"key": "ctrl+shift+T",
"command": "editor.action.insertSnippet",
"when": "editorLangId == latex && editorTextFocus",
"args": {
"snippet": "\\texttt{${TM_SELECTED_TEXT}}$0"
}
},
]
Snippets di codice
latex.json
json
{
"empathize": {
"prefix": "em",
"body": [
"\\\\emph{${1}}${0}"
]
},
"bold font": {
"prefix": "bf",
"body": [
"\\\\textbf{${1}}${0}"
]
},
"monofont": {
"prefix": "tt",
"body": [
"\\\\texttt{${1}}${0}"
]
},
}