Skip to content

Add VS Code Dark+ theme, Chinese IME, autocomplete, and video post-processing - #11

Open
syk1411119 wants to merge 1 commit into
ExploreMaths:mainfrom
syk1411119:feature/vscode-dark-plus-ime
Open

syk1411119 wants to merge 1 commit into
ExploreMaths:mainfrom
syk1411119:feature/vscode-dark-plus-ime

Conversation

@syk1411119

Copy link
Copy Markdown

概述

本 PR 为 CodeVideoRenderer 增加一组新功能,让代码动画更贴近真实编码体验:

1. VS Code Dark+ 语法高亮

新增 vscode-dark-plus Pygments 样式与 Python 词法器,逐 token 对齐 VS Code Dark+ 配色
(关键字 #569CD6/#C586C0、字符串 #CE9178、函数 #DCDCAA、类 #4EC9B0、注释 #6A9955、数字 #B5CEA8),并设为默认 formatter_style。

2. VS Code 风格自动补全

触发 def/import/class/if/return 等关键词时弹出 IntelliSense 风格补全框:彩色 Codicon 风格图标(方法 ƒ、类 ▣、关键字 ⚿、片段 ➤ 等)、标签、灰色类型说明与蓝色选中行高亮。

3. 中文拼音输入法模拟

新增 chinese_ime 参数,输入中文时弹出拼音候选框,多字词拼音用横杠分隔(世界 → shi-jie)。

4. 退格式代码删除

新增 clear_code / clear_code_mode='backspace',打完代码后像按退格键一样逐字符删除(速度可调),删除前自动回拉镜头保持画面稳定。

5. 视频后处理助手

新增 postprocess.py:去/加字幕、混背景音乐、拼接、画质/分辨率/fps 设置、加水印、片头、封面、提取/移除音频、裁剪、变速。

其他

  • 新增 chinese_ime / ime_wait_time 参数
  • formatter_style 默认值改为 vscode-dark-plus
  • 依赖新增 pypinyin>=0.49.0,版本号升至 1.5.0
  • README 补充文档,测试增至 29 个且全部通过

…ocessing

- New `vscode-dark-plus` Pygments style + Python lexer matching VS Code Dark+ colors
- VS Code-style autocomplete popup with colored Codicon-style icons, details and selection highlight
- Chinese IME simulation: hyphen-separated pinyin + candidate box when typing CJK
- Backspace-style code deletion (`clear_code` / `clear_code_mode`) with camera reframe
- Video post-processing helpers: subtitles, background music, concat, quality/resolution/fps, watermark, title card, cover
- New `chinese_ime` / `ime_wait_time` parameters; default `formatter_style` is now `vscode-dark-plus`
- Add `pypinyin` dependency; document new features in README; add tests

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant