ターミナル
control+shift+@カーソル
上に空白追加comand+shift+enter
カーソルが途中でも下に行追加
comand+enter
選択
1行選択範囲追加comand+L
移動
その行の内容を移動させるoption+矢印
削除
行削除shift+command+K
直前の単語削除
option+backspace
コメントアウト
command+/選択範囲の置換
選択するcomand+f
三をクリック
選択中の語句をファイルから全て選択する
comand+shift+Lフォーマット(形を整える)
option+shift+L設定
code>基本設定>設定で検索「フォーマット」でformat on typeなどテェックを入れる.エンコード
右下をクリック>文字コード>エンコード付きで再度開く>shift-jis型のテェック
javascriptのファイルの先頭に// @ts-checkを追加
もしくは, settings.jsonで"js/ts.implicitProjectConfig.checkJs": true,
エラー無視
jabascriptの場合は, // @ts-ignorenode.jsのインストール
https://nodejs.org/ja/thpescript
npm install -g typescriptrun selected text
エディターで選択されているテキストのコマンドを実行できる.シェルの設定windows
setttings.jsonに書く"terminal.integrated.shell.windows": "C:\\Windows"\\System32\\bash.exe"
ターミナル
ターミナルはエディタと別に設定できる.設定でterminal.integratedを探すと良い.
デフォルトのフォルダ
ターミナルは現在のエクスプローラで開かれているフォルダをカレントにして起動します."terminal.integrated.cwd": "\home\user"
などとすると, デフォルトのフォルダで開ける.
変数の定義に移動
F12括弧の相方に移動
command+shift+\シンボル名変更
変数の名前を変えたい場合がある.F2を使う
python
anacondaは数値計算ようのパッケージpythonのインタプリター変更
python: select Interpreter command to serchリンター
conda install --name myenv pylint -y
フォーマッター
conda install --name myenv autopep8 -y
マクロ
{"key": "ctrl+t",
"command": "workbench.action.terminal.sendSequence",
"args": {
"text": "cd ${fileDirname}\n platex ${fileBasenameNoExtension}.tex \n dvipdfmx ${fileBasenameNoExtension}.dvi \n open ${fileBasenameNoExtension}.pdf \n"
}
}
ファイル
/home/your-username/your-project/folder/file.ext フォルダ
/home/your-username/your-project
${workspaceFolder} - /home/your-username/your-project
${workspaceFolderBasename} - your-project
${file} - /home/your-username/your-project/folder/file.ext
${fileWorkspaceFolder} - /home/your-username/your-project
${relativeFile} - folder/file.ext
${relativeFileDirname} - folder
${fileBasename} - file.ext
${fileBasenameNoExtension} - file
${fileDirname} - /home/your-username/your-project/folder
${fileExtname} - .ext
${lineNumber} - line number of the cursor
${selectedText} - text selected in your code editor
${execPath} - location of Code.exe
${pathSeparator} - / on macOS or linux, \\ on Windows
latex
"alt+cmd+x"をすると, 編集しやすい画面が出てくる.
brew install latexindent
//LaTeX
"latex-workshop.latex.recipes": [
{
"name": "lualatex",
"tools": [
"lualatex",
]
},
{
"name": "lualatex twice compile",
"tools": [
"lualatex",
"lualatex",
]
},
],
"latex-workshop.latex.tools": [
{
"name": "lualatex",
"command": "lualatex",
"args": [
"--cmdx",
"-file-line-error",
"-synctex=1",
"-interaction=nonstopmode",
"-halt-on-error",
"%DOC%",
],
},
],
"latex-workshop.latex.autoClean.run": "onBuilt",
"latex-workshop.latex.autoBuild.run": "onFileChange",
"latex-workshop.latex.autoBuild.interval": 0,
"latex-workshop.view.pdf.viewer": "tab",
