前言一位在读博士跟我说他每天的科研工作横跨 6 个工具——Zotero 看文献、Word 写论文、MATLAB 跑实验、Overleaf 排版、有道翻译查词、微信传文件。每次切换都是一次上下文中断严重影响深度工作状态。其实这一切都可以在 VS Code 里完成。本文手把手带你把 VS Code 改造成一套专为科研设计的沉浸式工作环境从文献阅读到论文发表一个窗口搞定。一、整体架构VS Code 学术工作流 ├── 文献阅读 PDF Viewer Continue AI 解读 ├── 论文写作 Markdown LaTeX 公式 BibTeX 引用 ├── AI 辅助 Continue 本地 OllamaQwen3/Gemma4 ├── 实验记录 Jupyter Notebook内置支持 ├── 版本管理 Git Source Control 面板 └── 文献管理 Zotero Better BibTeX二、核心插件安装15 分钟完成打开 VS Code按CtrlShiftX进入扩展商店搜索安装以下插件插件名用途重要程度WSL连接到 Ubuntu 环境⭐⭐⭐ 必装Continue接入本地 AI 模型⭐⭐⭐ 必装Markdown All in OneMarkdown 增强快捷键/目录/公式⭐⭐⭐ 必装Markdown Preview EnhancedLaTeX 公式渲染⭐⭐⭐ 必装PDF ViewerVS Code 内直接阅读 PDF⭐⭐⭐ 必装Pandoc CiterBibTeX 引用自动补全⭐⭐ 推荐Word Count实时字数统计⭐⭐ 推荐Code Spell Checker拼写检查支持学术词典⭐⭐ 推荐三、配置 Continue 接入本地模型3.1 基础配置安装 Continue 后按CtrlShiftL打开侧边栏点击 ⚙️ 图标编辑配置文件~/.continue/config.json{ models: [ { title: Qwen3-8B中文解读/翻译, provider: ollama, model: qwen3:8b, apiBase: http://localhost:11434, systemMessage: 你是一位专业的学术助手专注于计算机科学和工程领域。解释时保留英文术语并附中文注释回答简洁专业。 }, { title: Gemma4-12B英文润色, provider: ollama, model: gemma4:12b, apiBase: http://localhost:11434, systemMessage: You are an academic English editor specializing in CS papers. Be precise and concise. } ], slashCommands: [ { name: proofread, description: 学术润色, prompt: Proofread the following academic text. Fix grammar, tense, and style only. Return only the corrected text:\n\n{{{ input }}} }, { name: explain, description: 中文解释, prompt: 请用中文解释以下学术内容保留英文术语并在括号内注释含义语言简洁\n\n{{{ input }}} }, { name: abstract, description: 生成摘要, prompt: 请用3-5句中文概括以下段落的核心贡献和主要结论\n\n{{{ input }}} } ] }3.2 实战案例阅读论文时用 AI 实时解读场景阅读一篇关于 Diffusion Model 的论文遇到这段难懂的数学描述The forward process gradually adds Gaussian noise to the data according to a variance schedule β₁,...,βT, such that q(x_t|x_{t-1}) N(x_t; √(1-βt)x_{t-1}, βtI).操作步骤1. 在 PDF Viewer 中打开论文VS Code 内直接双击 PDF 文件2. 用鼠标选中这段文字复制3. 切换到.md笔记文件粘贴4. 选中该段按CtrlShiftL→ 输入/explainAI 输出前向过程Forward Process逐步向数据 x₀ 添加高斯噪声Gaussian Noise。 其中 - β₁,...,βT 是方差调度表Variance Schedule控制每步添加噪声的强度 - q(x_t|x_{t-1}) 表示从第 t-1 步到第 t 步的条件概率 - √(1-βt)x_{t-1} 是均值βtI 是方差 - 直觉理解每一步都是对上一步的图像做轻微的模糊处理经过 T 步后变成纯噪声30 秒内理解了本需要查阅 3 篇辅助材料才能搞懂的公式。✅四、Markdown 写论文工作流4.1 文件结构规范my_paper/ ├── main.md # 论文正文 ├── references.bib # BibTeX 参考文献库 ├── figures/ # 图表 │ ├── fig1_framework.png │ └── fig2_results.png ├── notes/ # 阅读笔记 │ ├── 2024_attention.md │ └── 2024_diffusion.md └── .vscode/ └── settings.json # 工作区配置4.2 工作区配置.vscode/settings.json{ markdown.math.enabled: true, editor.wordWrap: on, editor.lineHeight: 1.8, cSpell.language: en, cSpell.userWords: [GNN, LSTM, Transformer, softmax, backpropagation], pandoc-citer.rootFile: main.md, wordcount.activateToFileGlob: **/*.md }4.3 实战案例BibTeX 引用自动补全步骤一在references.bib中添加可从 Google Scholar 直接导出inproceedings{vaswani2017attention, title{Attention is all you need}, author{Vaswani, Ashish and others}, booktitle{NeurIPS}, year{2017} }步骤二在main.md中写作时输入自动弹出补全菜单The Transformer architecture [vaswani2017attention] has become the dominant paradigm in sequence modeling tasks.步骤三用 Pandoc 生成带格式参考文献的 PDFsudo apt install pandoc texlive-xetex pandoc main.md \ --bibliography references.bib \ --csl ieee.csl \ --pdf-enginexelatex \ -o paper_draft.pdf4.4 实战案例LaTeX 公式实时预览写公式时按CtrlK V打开预览面板左侧写 Markdown右侧实时渲染本文的目标函数定义如下 $$ \mathcal{L}(\theta) \mathbb{E}_{(s,a,r,s) \sim \mathcal{D}} \left[ \left( r \gamma \max_{a} Q_{\theta^-}(s, a) - Q_\theta(s, a) \right)^2 \right] $$ 其中 $\gamma \in (0,1]$ 为折扣因子$\mathcal{D}$ 为经验回放缓冲区。五、实验记录工作流5.1 实战案例在 VS Code 中记录一次完整实验新建experiments/exp_2025_05_26.ipynb记录超参数、指标和结论# Cell 1实验配置 config { model: GraphSAGE, dataset: Cora, hidden_dim: 256, num_layers: 3, dropout: 0.5, lr: 0.001, epochs: 200 } print(实验配置, config)# Cell 2训练结果 results {val_acc: 0.842, test_acc: 0.831, best_epoch: 167} print(f验证集准确率{results[val_acc]:.3f}) print(f测试集准确率{results[test_acc]:.3f})5.2 用 Git 管理实验历史git add experiments/exp_2025_05_26.ipynb git commit -m exp: GraphSAGE baseline, test_acc0.831 # 回溯历史实验 git log --oneline # a3f2c1d exp: GraphSAGE GAT comparison # 8b1e9d2 exp: GraphSAGE baseline, test_acc0.831六、自定义快捷键在keybindings.json中添加[ { key: ctrlshiftl, command: continue.focusContinueInput, comment: 打开 AI 助手 }, { key: ctrlk v, command: markdown.showPreviewToSide, comment: 侧边预览 Markdown } ]七、总结一天的科研工作流时间任务使用工具上午阅读新论文PDF Viewer Continue(/explain)上午整理阅读笔记Markdown Git 提交下午写论文方法节Markdown LaTeX 公式预览下午润色段落Continue(/proofread) Gemma4傍晚跑对比实验Jupyter Notebook傍晚记录实验结果Notebook Git一个窗口零切换全流程覆盖。配置参考VS Code 1.92Continue 扩展 0.9Ollama 0.6.xWSL2 Ubuntu 22.04。
导师不会教你的科研神器:用 VS Code 搭建沉浸式学术工作流
前言一位在读博士跟我说他每天的科研工作横跨 6 个工具——Zotero 看文献、Word 写论文、MATLAB 跑实验、Overleaf 排版、有道翻译查词、微信传文件。每次切换都是一次上下文中断严重影响深度工作状态。其实这一切都可以在 VS Code 里完成。本文手把手带你把 VS Code 改造成一套专为科研设计的沉浸式工作环境从文献阅读到论文发表一个窗口搞定。一、整体架构VS Code 学术工作流 ├── 文献阅读 PDF Viewer Continue AI 解读 ├── 论文写作 Markdown LaTeX 公式 BibTeX 引用 ├── AI 辅助 Continue 本地 OllamaQwen3/Gemma4 ├── 实验记录 Jupyter Notebook内置支持 ├── 版本管理 Git Source Control 面板 └── 文献管理 Zotero Better BibTeX二、核心插件安装15 分钟完成打开 VS Code按CtrlShiftX进入扩展商店搜索安装以下插件插件名用途重要程度WSL连接到 Ubuntu 环境⭐⭐⭐ 必装Continue接入本地 AI 模型⭐⭐⭐ 必装Markdown All in OneMarkdown 增强快捷键/目录/公式⭐⭐⭐ 必装Markdown Preview EnhancedLaTeX 公式渲染⭐⭐⭐ 必装PDF ViewerVS Code 内直接阅读 PDF⭐⭐⭐ 必装Pandoc CiterBibTeX 引用自动补全⭐⭐ 推荐Word Count实时字数统计⭐⭐ 推荐Code Spell Checker拼写检查支持学术词典⭐⭐ 推荐三、配置 Continue 接入本地模型3.1 基础配置安装 Continue 后按CtrlShiftL打开侧边栏点击 ⚙️ 图标编辑配置文件~/.continue/config.json{ models: [ { title: Qwen3-8B中文解读/翻译, provider: ollama, model: qwen3:8b, apiBase: http://localhost:11434, systemMessage: 你是一位专业的学术助手专注于计算机科学和工程领域。解释时保留英文术语并附中文注释回答简洁专业。 }, { title: Gemma4-12B英文润色, provider: ollama, model: gemma4:12b, apiBase: http://localhost:11434, systemMessage: You are an academic English editor specializing in CS papers. Be precise and concise. } ], slashCommands: [ { name: proofread, description: 学术润色, prompt: Proofread the following academic text. Fix grammar, tense, and style only. Return only the corrected text:\n\n{{{ input }}} }, { name: explain, description: 中文解释, prompt: 请用中文解释以下学术内容保留英文术语并在括号内注释含义语言简洁\n\n{{{ input }}} }, { name: abstract, description: 生成摘要, prompt: 请用3-5句中文概括以下段落的核心贡献和主要结论\n\n{{{ input }}} } ] }3.2 实战案例阅读论文时用 AI 实时解读场景阅读一篇关于 Diffusion Model 的论文遇到这段难懂的数学描述The forward process gradually adds Gaussian noise to the data according to a variance schedule β₁,...,βT, such that q(x_t|x_{t-1}) N(x_t; √(1-βt)x_{t-1}, βtI).操作步骤1. 在 PDF Viewer 中打开论文VS Code 内直接双击 PDF 文件2. 用鼠标选中这段文字复制3. 切换到.md笔记文件粘贴4. 选中该段按CtrlShiftL→ 输入/explainAI 输出前向过程Forward Process逐步向数据 x₀ 添加高斯噪声Gaussian Noise。 其中 - β₁,...,βT 是方差调度表Variance Schedule控制每步添加噪声的强度 - q(x_t|x_{t-1}) 表示从第 t-1 步到第 t 步的条件概率 - √(1-βt)x_{t-1} 是均值βtI 是方差 - 直觉理解每一步都是对上一步的图像做轻微的模糊处理经过 T 步后变成纯噪声30 秒内理解了本需要查阅 3 篇辅助材料才能搞懂的公式。✅四、Markdown 写论文工作流4.1 文件结构规范my_paper/ ├── main.md # 论文正文 ├── references.bib # BibTeX 参考文献库 ├── figures/ # 图表 │ ├── fig1_framework.png │ └── fig2_results.png ├── notes/ # 阅读笔记 │ ├── 2024_attention.md │ └── 2024_diffusion.md └── .vscode/ └── settings.json # 工作区配置4.2 工作区配置.vscode/settings.json{ markdown.math.enabled: true, editor.wordWrap: on, editor.lineHeight: 1.8, cSpell.language: en, cSpell.userWords: [GNN, LSTM, Transformer, softmax, backpropagation], pandoc-citer.rootFile: main.md, wordcount.activateToFileGlob: **/*.md }4.3 实战案例BibTeX 引用自动补全步骤一在references.bib中添加可从 Google Scholar 直接导出inproceedings{vaswani2017attention, title{Attention is all you need}, author{Vaswani, Ashish and others}, booktitle{NeurIPS}, year{2017} }步骤二在main.md中写作时输入自动弹出补全菜单The Transformer architecture [vaswani2017attention] has become the dominant paradigm in sequence modeling tasks.步骤三用 Pandoc 生成带格式参考文献的 PDFsudo apt install pandoc texlive-xetex pandoc main.md \ --bibliography references.bib \ --csl ieee.csl \ --pdf-enginexelatex \ -o paper_draft.pdf4.4 实战案例LaTeX 公式实时预览写公式时按CtrlK V打开预览面板左侧写 Markdown右侧实时渲染本文的目标函数定义如下 $$ \mathcal{L}(\theta) \mathbb{E}_{(s,a,r,s) \sim \mathcal{D}} \left[ \left( r \gamma \max_{a} Q_{\theta^-}(s, a) - Q_\theta(s, a) \right)^2 \right] $$ 其中 $\gamma \in (0,1]$ 为折扣因子$\mathcal{D}$ 为经验回放缓冲区。五、实验记录工作流5.1 实战案例在 VS Code 中记录一次完整实验新建experiments/exp_2025_05_26.ipynb记录超参数、指标和结论# Cell 1实验配置 config { model: GraphSAGE, dataset: Cora, hidden_dim: 256, num_layers: 3, dropout: 0.5, lr: 0.001, epochs: 200 } print(实验配置, config)# Cell 2训练结果 results {val_acc: 0.842, test_acc: 0.831, best_epoch: 167} print(f验证集准确率{results[val_acc]:.3f}) print(f测试集准确率{results[test_acc]:.3f})5.2 用 Git 管理实验历史git add experiments/exp_2025_05_26.ipynb git commit -m exp: GraphSAGE baseline, test_acc0.831 # 回溯历史实验 git log --oneline # a3f2c1d exp: GraphSAGE GAT comparison # 8b1e9d2 exp: GraphSAGE baseline, test_acc0.831六、自定义快捷键在keybindings.json中添加[ { key: ctrlshiftl, command: continue.focusContinueInput, comment: 打开 AI 助手 }, { key: ctrlk v, command: markdown.showPreviewToSide, comment: 侧边预览 Markdown } ]七、总结一天的科研工作流时间任务使用工具上午阅读新论文PDF Viewer Continue(/explain)上午整理阅读笔记Markdown Git 提交下午写论文方法节Markdown LaTeX 公式预览下午润色段落Continue(/proofread) Gemma4傍晚跑对比实验Jupyter Notebook傍晚记录实验结果Notebook Git一个窗口零切换全流程覆盖。配置参考VS Code 1.92Continue 扩展 0.9Ollama 0.6.xWSL2 Ubuntu 22.04。