简体   繁体   English

如何调整qw //的cperl模式缩进?

[英]How do I adjust cperl mode indentation of qw//?

Following on from this question , here's another bugbear. 此问题之后 ,这是另一个错误。

I am getting 我正进入(状态

my @browsers = qw/
                     Firefox
                     MSIE
/;

but I want 但我想要

my @browsers = qw/
    Firefox
    MSIE
/;

What setting in cperl mode in Emacs might I use to achieve that? 我可以使用Emacs中的cperl模式下的哪些设置来实现这一目标?

There isn't one. 没有一个。 x// is handled as a special case, and the information about the indent of the line that starts the statement is not available: x //被作为特殊情况处理,并且有关开始该语句的行的缩进的信息不可用:

http://github.com/jrockway/cperl-mode/blob/mx-declare/cperl-mode.el#L3074 http://github.com/jrockway/cperl-mode/blob/mx-declare/cperl-mode.el#L3074

This can be fixed with a bit of munging in cperl-sniff-for-indent and cperl-calculate-indent . 可以通过在cperl-sniff-for-indentcperl-calculate-indent Patch welcome! 欢迎补丁!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM