1

使用 vim 时,我希望在 #define、字符串和使用 '\' 忽略换行符的所有其他情况下插入 '\' 时具有自动识别(在文本宽度位置)功能。

这是示例(文本宽度= 78):

 /* '\' at maximum text-width */
 #define HELLO "I Think this feature already exist but I wasn't able to find \
               it so far.


 /* usual situation */
 #define HELLO \
         "I Think this feature already exist but I wasn't able ..."


 /* what i would like to have (without identing it myself) */
 #define HELLO                                                               \
         "I Think this feature already exist but I wasn't able ..."
4

1 回答 1

0

我没有自动解决方案,但至少您可以使用我的AlignFromCursor 插件快速手动右对齐连续字符,该插件具有<Leader>ri将光标右侧的文本对齐的映射'textwidth'

于 2013-02-27T16:14:27.180 回答