gpt4 book ai didi

linux - vim linux 列格式化 -- 处理字符串文字

转载 作者:太空宇宙 更新时间:2023-11-04 10:51:20 24 4
gpt4 key购买 nike

在 VIM 中进行一些编程 我想自动将一些内容排列在列中。做 :!column -t 大部分工作,但它不知道字符串文字的概念,所以那些也被修改了。有没有什么捷径可以让它将字符串文字视为列的单个单元格?

* 编辑 *

例如,如果我当前有行

stringType short "Short string" plusSome
otherStringType longStringName "Intentionally do a longer string" plusSomeMore

我希望它被格式化为

stringType      short          "Short string"                     plusSome
otherStringType longStringName "Intentionally do a longer string" plusSomeMore

代替

stringType      short          "Short         string" plusSome
otherStringType longStringName "Intentionally do a longer string" plusSomeMore

最佳答案

看看 tabular插件,它可以做你想做的,还有更多。参见 this screencast快速介绍。

关于linux - vim linux 列格式化 -- 处理字符串文字,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30893964/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com