On latex
VScode
basic setting
- LaTeX Workshop 的自动补全与代码段
- latex---vscode编辑器配置及快捷键(snnipets)设置
- Visual Studio Code (vscode)配置LaTeX
- @委员长长毛鸣
1. ii $ $ 快速创建使用 $$ 包裹的行内公式
2. II \( \) 快速创建使用 \(\) 包裹的行内公式
3. dd $$ $$ 快速创建使用 $$$$ 包裹的行间公式
4. DD \[ \] 快速创建使用 \[\] 包裹的行间公式
5. oo \infty
6. bb \mathbb
7. bbR \mathbb{R}
8. bbQ \mathbb{Q}
For more, see math-snippets.
An alternative: hypersnips.
shortcuts
- vscode正反向搜索:option cmd j (ctrl+alt+ j) 与 double click
- latex加粗等快捷键: 设置->控制面板, 搜索并打开keybinding.json (这里还可以查看和定义更多快捷键, 搜索关键词open keyborad shortcuts(json)), 添加如下代码即可:
{
"key": "ctrl+b",
"command": "latex-workshop.shortcut.textbf",
"when": "editorTextFocus && !editorReadonly && editorLangId == 'latex'"
},
control width of code
- To completely disable the wrapping:
Settings > Editor: Word Wrap > Off - To set the wrapping to the 160th column:
Settings > Editor: Word Wrap > wordWrapColumn
Settings > Editor: Word Wrap Column > 160 - Or add the following to your settings.json:
"editor.wordWrap": "wordWrapColumn", "editor.wordWrapColumn": 160
Edit snippet for latex
Method 1: edit in "snip-code'' file directly.
Method 2: steps:
- Press shif+cmd+p to open a search box;
- Type: configure user snippets , and click it;
- Search and select latex language;
- Edit the code.
Also see here.
color for pdf viewer
- Changing the Background Color for VSCode PDF Reviewer
- Open settings in vscode, search: workshop.view.pdf.
- noctis
Latex
OCR
Double columns contents (双栏目录)
\documentclass[UTF8]{ctexart}
\usepackage[toc]{multitoc}%多栏目录,默认两栏
\usepackage{blindtext}
%\renewcommand\multicolumntoc{3}可以修改为三栏
\begin{document}
\tableofcontents
\Blinddocument
\end{document}
table for latex
Icons
\documentclass{standalone}
\usepackage{fontawesome5}
\begin{document}
\faCat
\end{document}
Github 同步 (OpenAI)
To connect Visual Studio Code (VSCode) to GitHub and synchronize your code across different devices, follow these steps:
-
Step 1: Install Git
First, ensure that Git is installed on your machine. You can download Git from git-scm.com. -
Step 2: Install the GitHub Extension for VSCode
Open VSCode.
Go to the Extensions view by clicking on the Extensions icon in the Activity Bar on the side of the window or by pressing Ctrl+Shift+X.
Search for "GitHub" and install the "GitHub Pull Requests and Issues" extension. -
Step 3: Clone a GitHub Repository
Open the Command Palette by pressing Ctrl+Shift+P.
Type Git: Clone and select it.
Enter the URL of your GitHub repository and press Enter.
Choose a directory to clone the repository to your local machine. -
Step 4: Configure Git in VSCode
Open the Command Palette by pressing Ctrl+Shift+P.
Type Git: Initialize Repository if you haven't already initialized your local repository.
Set your Git username and email by running the following commands in the integrated terminal (accessible via Ctrl+):
bash
复制代码
git config --global user.name "Your Name"
git config --global user.email "youremail@example.com"
-
Step 5: Connect to GitHub
Open the Command Palette by pressing Ctrl+Shift+P.
Type GitHub: Sign in and select it.
Follow the prompts to authenticate with your GitHub account. -
Step 6: Synchronize Changes
Pull Changes
To pull changes from the remote repository:
Open the Command Palette by pressing Ctrl+Shift+P.
Type Git: Pull and select it.
The latest changes from the remote repository will be pulled to your local machine.
Push Changes
To push your local changes to the remote repository:
Make your changes in VSCode.
Stage your changes by clicking the + icon next to the files in the Source Control view (accessible via Ctrl+Shift+G).
Commit your changes by entering a commit message and clicking the checkmark icon.
Push your changes by clicking on the ellipsis (...) in the Source Control view and selecting Push.
- Step 7: Enable Auto-Sync
To enable auto-sync for your repository, you can use the GitHub extension settings:
Open the Command Palette by pressing Ctrl+Shift+P.
Type Preferences: Open Settings (UI) and select it.
In the Settings view, search for Git: Auto Fetch.
Enable the Git: Auto Fetch setting to automatically fetch changes from the remote repository.
By following these steps, you can set up VSCode to connect to GitHub and synchronize your code across different devices easily.
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 分享一个免费、快速、无限量使用的满血 DeepSeek R1 模型,支持深度思考和联网搜索!
· 基于 Docker 搭建 FRP 内网穿透开源项目(很简单哒)
· ollama系列01:轻松3步本地部署deepseek,普通电脑可用
· 25岁的心里话
· 按钮权限的设计及实现