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

狂风中的少年 提交于 2019-12-10 13:26:09

问题


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

has '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',
);

?


回答1:


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

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


来源:https://stackoverflow.com/questions/3155468/how-do-i-adjust-cperl-mode-indentation-in-emacs-to-match-moose-examples

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!