skip to Main Content

I love how vscode always asks me "are you sure that you want to paste content of multiple line into terminal", and gives me the option of pasting into single line (see graph for example). But today I got a litte tipsy and clicked on "don’t ask me again" when I saw the dialog. Now I don’t know how to paste contents of multiple lines as a single line into terminal…

Yes, I can paste it into a seperated txt and remove the lines but is there any way to bring back the dialog, or is there a shortcut to paste into single line?
pic 1

I want to bring back the dialog, but am clueless so far as to what I can do…

2

Answers


  1. To restore the dialog for pasting multi-line content as a single line in Visual Studio Code, you can:

    1. Reset Terminal Settings:

    • Open the Command Palette (Ctrl+Shift+P or Cmd+Shift+P on macOS).
    • Search for and select Preferences: Open Settings (JSON).
    • Look for terminal-related settings (e.g., terminal.integrated.pasteMultiline) and reset or remove them.

    2. Clear VS Code Cache:

    • Close VS Code.
    • Delete cached data:
    Windows: %APPDATA%CodeCache and %APPDATA%CodeCachedData
    macOS: ~/Library/Application Support/Code/Cache and ~/Library/Application Support/Code/CachedData
    Linux: ~/.config/Code/Cache and ~/.config/Code/CachedData
    
    • Reopen VS Code.
    Login or Signup to reply.
  2. Look in your settings.json and delete or comment this setting (which is probably near the end of the file):

    "terminal.integrated.enableMultiLinePasteWarning": false,
    

    The relevant setting is

    Terminal > Integrated: Enable Multi Line Paste Warning
    

    so usually you could just go there and reset it to auto (the default) but there seems to be a bug that prevents doing that in this case. So remove the setting in your settings.json instead.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search