一个简单的 VS Code 扩展,用于快速复制文件名或路径。
A simple VS Code extension for quickly copying file names or paths.
- 复制文件名 | Copy file name
- 复制完整路径 | Copy full path
- 支持多种命名格式 | Support multiple naming formats
- 原始格式 (Original)
- 驼峰式 (camelCase)
- 短横线式 (kebab-case)
- 下划线式 (snake_case)
-
在文件资源管理器中右键点击文件 Right-click on a file in the explorer
-
选择以下选项之一: Choose one of the following options:
Copy File Name: 复制文件名 | Copy file nameCopy Full Path: 复制完整路径 | Copy full path
此扩展提供以下设置: This extension contributes the following settings:
-
copyname.includeExtension: 是否包含文件扩展名 | Whether to include file extensiontrue: 包含扩展名 (example.txt)false: 不包含扩展名 (example)
-
copyname.caseStyle: 文件名格式化样式 | File name formatting styleoriginal: 保持原始文件名 | Keep original namecamelCase: 驼峰式 (exampleFileName)kebab-case: 短横线式 (example-file-name)snake_case: 下划线式 (example_file_name)
在 settings.json 中添加: Add to settings.json:
{
"copyname.includeExtension": true,
"copyname.caseStyle": "camelCase"
}-
安装扩展后重启 VS Code Restart VS Code after installation
-
右键点击任何文件 Right-click on any file
-
在上下文菜单中查找 "Copy File Name" 或 "Copy Full Path" Look for "Copy File Name" or "Copy Full Path" in the context menu
暂无已知问题。 No known issues.
- 初始发布 | Initial release
- 支持复制文件名和完整路径 | Support copying file name and full path
- 支持多种命名格式 | Support multiple naming formats