Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Your NotesNew to Visual Studio Code? Get it now.
Your Notes

Your Notes

buuug7

|
1 install
| (0) | Free
Capture and organize your notes from within VS Code with Markdown support
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

📝 Your Notes

一款 VS Code 扩展,用来收录用户的笔记,可以从 VS Code 编辑器中选择内容一键收录笔记,或者手动输入。

⚠️ 注意:本扩展需要配合后端服务 your-notes-server 一起使用。

主要功能

  • 🔐 用户注册登录 — JWT 认证,密码使用 bcryptjs 加密存储
  • 📂 新建编辑笔记分类 — 支持颜色标签分类管理笔记
  • 💾 笔记数据保存到 SQLite — 通过后端服务存储,隐私安全
  • 📝 Markdown 渲染 — 完整支持 GFM (表格、代码块、列表等)
  • 🔍 全文搜索 — 基于 SQLite FTS5 的快速全文搜索
  • 🎨 UI 参考 GitHub Copilot Modernization 风格 — 侧边栏 Webview 面板,跟随 VS Code 主题
  • ⚡ 一键收录 — 选中代码/文本 → 右键 → "Add Selection to Your Notes"

快捷键

操作 快捷键
添加选中内容到笔记 Ctrl+Shift+N (Mac: Cmd+Shift+N)
打开笔记面板 命令面板: Your Notes: Open Notes Panel
搜索笔记 命令面板: Your Notes: Search Notes

使用

1. 启动后端服务

cd your-notes-server
npm install && npm run build && npm start

2. 启动 VS Code 扩展

在 your-notes 目录下按 F5 启动 Extension Development Host。

3. 开始使用

  1. 点击左侧活动栏的 📝 图标打开笔记面板
  2. 注册 新账户或 登录 已有账户
  3. 点击底部 "+ New Note" 创建笔记
  4. 在编辑器中选中文本 → 右键 → "Add Selection to Your Notes"
  5. 使用顶部的 搜索栏 快速查找笔记
  6. 点击 Categories 旁的 "+" 添加分类

开发

# 安装依赖
npm install

# 构建
npm run build

# 监听模式(自动重新构建)
npm run watch

# 按 F5 启动 Extension Development Host

项目结构

src/
├── extension.ts                 # 入口:激活/停用
├── api/
│   └── client.ts               # HTTP API 客户端 (封装后端 REST 调用)
├── types.ts                     # 共享 TypeScript 接口
├── constants.ts                 # 命令 ID、配置常量
├── providers/
│   └── NotesViewProvider.ts    # Webview 提供者 (Extension ↔ UI 通信)
├── commands/                    # VS Code 命令注册
└── webview/                     # React UI (侧边栏面板)
    ├── index.tsx               # React 入口
    ├── App.tsx                 # 根组件 (认证门控 + 布局)
    ├── hooks/                  # 自定义 Hooks
    ├── components/             # UI 组件
    │   ├── Auth/               # 登录/注册
    │   ├── Layout/             # 头部、搜索、空状态
    │   ├── Notes/              # 笔记列表、查看、编辑
    │   ├── Categories/         # 分类管理
    │   └── common/             # 通用组件 (Modal, Button, Spinner)
    └── styles/global.css       # 主题感知样式

技术栈

  • 扩展宿主: TypeScript、VS Code API、Node.js
  • UI: React 18、react-markdown、remark-gfm
  • 通信: REST API + JWT (通过 ApiClient)
  • 构建: esbuild

架构

VS Code Extension  ←── HTTP/REST (JWT) ──→  your-notes-server
                                               ├── Express.js
                                               ├── better-sqlite3 (SQLite)
                                               └── bcryptjs + jsonwebtoken

系统要求

  • VS Code 1.85.0 或更高
  • Node.js 18+

配置

设置 说明
your-notes.serverUrl 后端服务地址(默认 http://localhost:3721)
your-notes.autoSaveNoteOnSelection 选中文本触发添加时是否自动打开编辑器

License

MIT

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft