【问题标题】:Wrap comments like Vim's gq command in VS Code在 VS Code 中包装 Vim 的 gq 命令之类的注释
【发布时间】:2016-07-02 06:42:08
【问题描述】:

对于某些项目,我使用Visual Studio Code。困扰我的一件事是我无法像 Vim 的 gq 命令那样快速格式化注释块。

对于那些不了解 Vim 的人,gq 命令可以在您选择/突出显示一行或多行的地方使用:

// This is a really really long line right here

它是这样的

// this is a really
// really long line
// right here

根据您的标尺设置(我的是 80,因此它会包裹在超过 80 的任何单词上。

【问题讨论】:

    标签: editor visual-studio-code


    【解决方案1】:

    【讨论】:

      【解决方案2】:

      已得到VSCodeVim的支持。

      详情请见https://github.com/VSCodeVim/Vim#-vscodevim-tricks

      您还可以在使用gq by vim.textwidth 时将宽度设置为自动换行。可以在https://github.com/VSCodeVim/Vim#vim-settings找到。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2020-12-12
        • 2021-08-28
        • 1970-01-01
        • 1970-01-01
        • 2021-02-23
        • 1970-01-01
        • 1970-01-01
        • 2018-10-08
        相关资源
        最近更新 更多