新工具的使用

一、基础步骤

  1. 下载cursor,https://cursor.com/cn/download
  2. 下载cursor-free-vip,git clone https://github.com/yeongpin/cursor-free-vip.git
  3. 执行irm D:/GitFiles/cursor-free-vip/scripts/install.ps1 | iex,之后会下载CursorFreeVIP.exe并执行
  4. 配置目录在E:\文档\.cursor-free-vip\config.ini
  5. 修改配置文件中cursor_path

二、Cursor的快捷键和配置

  1. Ctrl+B,左边栏的隐藏和显示
  2. 当到期后,重新打开CursorFreeVIP,并选择重置机器ID即可
  3. Ctrl+L,选中代码,chat对话
  4. Ctrl+K,chat对话,代码补全
  5. Ctrl+D,选中单词,多次点击跳转至下一单词
  6. Ctrl+/,双斜杠注释
  7. Ctrl+Shift+J,打开Cursor专属设置界面
  8. 活动栏变垂直,打开设置,搜索workbench.activityBar.orientation,并设置为vertical
  9. 使用curosr打开页面,使用cursor .打开当前文件夹
  10. @实现快速访问上下文信息,比如@file或@floder实现引用此内容
  11. Ctrl+Shift+,新建一个终端并打开,Ctrl+,打开已有终端
  12. 设置中搜索windows zoom可以将整体的界面变大,我的配置1.2
  13. 设置中搜索font size可以修改文件的字体大小、终端的字体大小,我的配置17

三、配置wsl和ssh

  1. 打开控制面板,选择程序与功能,点击启动或关闭windows系统,选择Hyper-V和适用于Linux的Windows子系统
  2. 打开终端,输入wsl.exe --updatewsl --set-default-version 2,之后输入wsl --install -d Ubuntu之后设置用户名和密码
  3. 登录Ubuntu,打开SSH,sudo apt update&sudo apt install openssh-server
  4. 设置允许密码和root登录,sudo nano /etc/ssh/sshd_config,修改PermitRootLogin yesPort 22以及PasswordAuthentication yes
  5. service ssh restart重启ssh服务
  6. 设置开机自启动,sudo systemctl enable ssh
  7. 卸载linux系统,wsl --unregister Ubuntu
  8. 使用root登录,wsl.exe --user root
  9. Linux访问Windows目录,使用/mnt/c/
  10. WSL2设置代理-完全使用宿主机的配置,创建C:/User/.wslconfig文件,并填入
[experimental]

autoMemoryReclaim=gradual

networkingMode=mirrored

dnsTunneling=true

firewall=true

autoProxy=true

之后重启WSL即可,这样WSL完全使用宿主机的代理环境

四、使用vscode+clangd

  1. sudo apt-get install bear clangd安装bear和clangd
  2. vscode安装插件clangd,禁止掉Microsoft C/C++
  3. 修改clangd的设置,添加参数如下--compile-commands-dir=${workspaceFolder} --background-index --completion-style=detailed --header-insertion=never --log=info
  4. 对于使用Makefile的工程, 使用make clean; bear -- make进行编译,在Makefile的同级目录下会产生文件compile_commands.json

五、使用cursor续杯的方法

  1. 登出cursor账户
  2. 使用cursor-free-vip重置机器ID
  3. 重新登录cursor,使用2925无限邮箱
  4. 使用临时手机号,地址https://temp-number.com/注意最前边是区号
  5. 检测到非真人,可以挂上***试试

六、claudecode安装

  1. 安装nodejs,https://nodejs.org/en/download/
  2. 安装git-for-windows,https://git-scm.com/install/windows
  3. 安装npm install -g @anthropic-ai/claude-code,使用claude --version确认安装完成
  4. 安装npm install -g @musistudio/claude-code-router
  5. 运行ccr ui添加API,最终会保存在user目录下的.claude-code-router/seetings.json,
  6. 可以添加有的modelscope和智谱
  7. 或可以使用智谱的付费方式,网站有具体操作文档可以参考
  8. 更新claude-code,npm update -g @anthropic-ai/claude-code
  9. 安装document-skills,输入/plugin,之后输入https://github.com/anthropics/skills,再安装document-skills即可

七、claudecode的命令

  1. /init读取项目文件并生成CLAUDE.md,形成claude的上下文
  2. /compact压缩上下文,保留自己想让它保留的
  3. /clear清除对话记录,保证开启新任务的干净的上下文
  4. /thinkthink hardthink harder以及ultrathink控制模型的思考长度
  5. ! 对话窗口临时切换为命令行
  6. # 记录模式,形成长期上下文,项目级别or用户级别,保存到markdown里边
  7. /ide打开装有claudecode插件的IDE,claudecode可以感知到ide选中的代码,claudecode和ide形成交互
  8. claude -p ""临时claudecode对话
  9. shift+tab切换成计划模式,先设计划,再动代码
posted @ 2025-12-17 17:49  gramming  阅读(56)  评论(0)    收藏  举报