zoukankan      html  css  js  c++  java
  • Configure VSCode

    更换 vscode terminal 为 Cygwin

    https://code.visualstudio.com/docs/editor/integrated-terminal
    
    Can I use Cygwin's shell with the terminal on Windows?
    Yes, to use the Cygwin shell, you will first need to install the chere package and then add the following settings to your settings.json file:
    
    "terminal.integrated.shell.windows": "C:\Windows\System32\cmd.exe",
    "terminal.integrated.shellArgs.windows": ["/k", "C:\cygwin64\Cygwin.bat"]
     
    note: /K shouldn't be ignored , this arg will tell cmd to stay in Cygwin after Cygwin executed instead of quit imidiatly

    in short

    Setp 1: well install and config your cygwin application

    Step 2: open settings,json from VSCode by accessing file > preferences > setting   or open setting by type  Ctl +`

                 after setting page opened, searching by key word shell , you will see a hyperlink "Edit in Settings.json"

                 click on the hyper link to open the settings.json

                 put the following configuration in the file, save and restart VSCode

    "terminal.integrated.shell.windows": "C:\Windows\System32\cmd.exe",
    "terminal.integrated.shellArgs.windows": ["/k", "C:\cygwin64\Cygwin.bat"]

    Step 3: open VSCode , open a terminal by type a shortcut  Ctl+shif +or by accessing to the main menu terminal > New Terminal

    Step 4: update shortcut for terminal

                navigate to keybindings setting by type shortcut ctrl+shift+p search by keyboard, cick on Keyboard Shortcuts Reference and click on {} on the right up corner

               and after keybinding.json presented, then add the following shortcut into keybingding.json

                

    // Place your key bindings in this file to override the defaults
    [
        {
            "key": "ctrl+tab",
            "command": "workbench.action.terminal.focusNext", // 切换到下一个终端 
            "when": "terminalFocus"
        },
        {
            "key": "ctrl+t",
            "command": "workbench.action.terminal.new", // 打开新的终端
            "when": "terminalFocus"
        },
        {
            "key": "ctrl+1",
            "command": "workbench.action.terminal.focusAtIndex1", // 打开终端1
            "when": "terminalFocus"
        },
        {
            "key": "ctrl+2",
            "command": "workbench.action.terminal.focusAtIndex2",
            "when": "terminalFocus"
        },
        {
            "key": "ctrl+3",
            "command": "workbench.action.terminal.focusAtIndex3",
            "when": "terminalFocus"
        },
        {
            "key": "ctrl+4",
            "command": "workbench.action.terminal.focusAtIndex4",
            "when": "terminalFocus"
        },
        {
            "key": "ctrl+alt+m",
            "command": "workbench.action.toggleMaximizedPanel"
        },

    {
            "key": "ctrl+f5",
            "command": "workbench.action.reloadWindow",
            "when": "editorTextFocus"
        }
    
    
    ]

     Step 5: configure VSCode to show special characters

                 add the following settings to settings.json and reload setting.json    

    "editor.renderControlCharacters": true,
    "editor.renderWhitespace": "all"

    step 6:  change column select to Alt+{mouse select}  refer to this page

    reference document

    https://code.visualstudio.com/docs/editor/integrated-terminal

    https://www.cnblogs.com/fayin/p/10185447.html

    https://www.itnota.com/reassign-shortcut-key-column-selection-visual-studio-code/

    转载请注明出处, 更多博文请访问https://www.cnblogs.com/guoapeng/
  • 相关阅读:
    嵌入式工程师为何不用学习C++语言?
    汽车电子基础知识
    为什么寄存器比存储器快?
    数字信号和模拟信号
    JLink和JTag的区别
    C++中static关键字作用总结
    所谓高情商,就是会说话
    汽车电子缩略语及术语
    卷积
    算法整理
  • 原文地址:https://www.cnblogs.com/guoapeng/p/11039082.html
Copyright © 2011-2022 走看看