gpt4 book ai didi

Vim: "And"行的 cucumber 缩进

转载 作者:行者123 更新时间:2023-12-01 01:30:05 25 4
gpt4 key购买 nike

在 Cucumber 的 Gherkin 语言中,允许缩进 And 行,如下所示:

Scenario:
Given there is a user named Chris
And I am logged in as Chris
When I go to the home page
Then I should see "hi Chris"
And I should not see "log in"

我喜欢这种缩进样式比同样缩进的样式要好得多,但是使用 Tim 的 Cucumber scripts for Vim , 我必须手动缩进 And 行并手动缩进以下行,有时 Vim 会自动缩进行,结果全错了。

在 Vim 中使用缩进 And 行的最佳方式是什么?还是放弃它最容易?

最佳答案

我想你可以定制 indent/cucumber.vim (online here) 增加以 ^\s*And 开头的行的缩进.

关于Vim: "And"行的 cucumber 缩进,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5364861/

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