简体   繁体   中英

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?

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:

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 . Patch welcome!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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