You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

VS Code中ftp-simple扩展上传时如何设置覆盖快捷键?

Fix ftp-simple Auto-Overwrite with Custom Shortcut in VS Code

I totally get that frustration—having to click "overwrite" every time you upload a file slows down your workflow. Let's set up that Ctrl+Alt+S shortcut to skip the confirmation prompt entirely:

  1. Open Keyboard Shortcuts Settings

    • Press Ctrl+K Ctrl+S (or go to File > Preferences > Keyboard Shortcuts) to open the shortcuts UI.
  2. Edit the JSON Configuration

    • Click the curly braces {} icon in the top-right corner of the shortcuts panel to open your keybindings.json file. This is where we'll add custom shortcut logic.
  3. Add the Auto-Overwrite Shortcut

    • Paste this snippet into the file (make sure it's inside the existing array):
      {
          "key": "ctrl+alt+s",
          "command": "ftp-simple.upload.activeFile",
          "args": { "force": true },
          "when": "editorFocus"
      }
      
    • Let's break this down:
      • key: Sets your desired shortcut (Ctrl+Alt+S).
      • command: Targets the ftp-simple command for uploading the currently active file.
      • args: { "force": true }: This is the magic—telling the extension to overwrite files without asking for confirmation.
      • when: "editorFocus": Ensures the shortcut only works when you're focused on an editor tab (avoids accidental triggers).
  4. Optional: Extend to Folder Uploads

    • If you want a similar shortcut for uploading entire folders, add this too:
      {
          "key": "ctrl+alt+shift+s",
          "command": "ftp-simple.upload.folder",
          "args": { "force": true },
          "when": "explorerFocus"
      }
      
    • Here, when: "explorerFocus" makes it work when you've selected a folder in the sidebar.

Save the keybindings.json file, and you're good to go! Now pressing Ctrl+Alt+S will instantly upload your active file to the FTP server, no more confirmation clicks needed.

内容的提问来源于stack exchange,提问作者Bad Dobby

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.27 06:45:57