shell - 如何在第 2 列上换行文本

标签 shell vim

我有一个文本文件:

Function        Description

concat          Returns the concatenation of the arguments.

contains        Returns true if the first argument string contains the second argument string; otherwise returns false.

我想将文本换行到第 2 列,结果应该是:

Function        Description

concat          Returns the concatenation
                of the arguments.

contains        Returns true if the first
                argument string contains 
                the second argument
                string; otherwise returns
                false.

如何在 vimshell 中快速完成?感谢您的任何建议。

最佳答案

在 Vim 中使用 indentexpr 选项可以轻松解决该问题。放 它是为第一列指定的字符数,

:set inde=16

然后像往常一样使用 gqgw 系列命令设置文本格式。

关于shell - 如何在第 2 列上换行文本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9971850/

相关文章:

mysql - 如何使用 BASH 和 EOF 修复 MySQL 8 中引号内的双/单引号?

git - Vim 在作为子进程调用时忘记了如何使用左箭头键。怎么修?

javascript - 您如何在 VIM 代码段中将这个词大写?

c - echo $PATH in system() 给我一个错误的输出

linux - 无法统计,没有这样的文件或目录 linux

bash - 如何在 shell 中使用 curl 检查内容类型

ubuntu - 无法替换 docker Ubuntu 镜像中的软件源

vim - 更改光标的保持时间?

vim - 如何将非 ASCII 字符粘贴到 vim 中?

java - 无法从 bouncycaSTLe 和 openssl dgst 获取匹配的 SHA1 摘要