开发者

How do I adjust cperl mode indentation in Emacs to match Moose examples?

开发者 https://www.devze.com 2023-01-05 20:38 出处:网络
How can I set up cperl mode in Emacs so that the indentation after brackets, e.g. ha开发者_StackOverflow中文版s \'name\'=> (

How can I set up cperl mode in Emacs so that the indentation after brackets, e.g.

ha开发者_StackOverflow中文版s 'name'    => (
                  is       => 'rw',
                  isa      => 'Str',
                  required => 1,
              );

(default indentation) becomes more like that seen in, for example, the Moose manual, e.g.

has 'password' => (
    is  => 'rw',
    isa => 'Str',
);

?


I found the answer on the Emacs Wiki. Add the following to .emacs:

(custom-set-variables
     '(cperl-indent-parens-as-block t))
0

精彩评论

暂无评论...
验证码 换一张
取 消