使用 Vim 表格插件对齐非连续行上的文本
我想对齐这些代码行:
let cty = -- trace ("new var " ++ (show vname) ++ " " ++ (show exp1))
synthTy ctx vtype
newctx = C.addLocalVar ctx vname cty
ckd = checkExp newctx exp1 cty
像这样:
let cty = -- trace ("new var " ++ (show vname) ++ " " ++ (show exp1))
synthTy ctx vtype
newctx = C.addLocalVar ctx vname cty
ckd = checkExp newctx exp1 cty
使用 vim 的表格插件,如果我突出显示所有行并输入 :Tab /=
,它们会在我输入时对齐第一个案例。我希望他们像第二个案例一样排队。如何让第二行与第二组而不是第一组匹配?我可以作弊并在第二行的单词之前添加一个等号,但我认为必须有更好的方法。
I'd like to align these lines of code:
let cty = -- trace ("new var " ++ (show vname) ++ " " ++ (show exp1))
synthTy ctx vtype
newctx = C.addLocalVar ctx vname cty
ckd = checkExp newctx exp1 cty
like this:
let cty = -- trace ("new var " ++ (show vname) ++ " " ++ (show exp1))
synthTy ctx vtype
newctx = C.addLocalVar ctx vname cty
ckd = checkExp newctx exp1 cty
With the tabular plugin for vim, if I highlight all the lines and type :Tab /=
, they align as I've typed them in the first case. I'd like them to line up like the second case. How can I get the second line to match with the second group instead of the first? I can cheat and add an equals before the words on the 2nd line, but I think there's got to be a better way.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
试试这个:
Try this: