No such thing as a small change | |
PerlMonks |
Re^8: How would you indent this?by LanX (Saint) |
on Mar 19, 2021 at 12:48 UTC ( [id://11129960]=note: print w/replies, xml ) | Need Help?? |
Hi M-C-\ is supposed to run indent-region resp. cperl-indent-region right? (Running C-h k will show the function bound to a key-combi) Guess what, I can't even activate this key-combination on my laptop with Windows + German keyboard with remapped CTRL.° (I'm too lazy to figure out why) I'm using emacs since university, it's only a few years I'm even actively using indent-region (and only since I remapped a closing curly } to run it automatically on the Perl block) Now if you take 100 average emacs hackers, how many will know indent-region ? I bet all will know TAB . indent-region is not even in the menus of emacs, cperl-mode is adding it's own version when activated. That's why I couldn't replicate your problem at first. Now from the docs of indent-region (all demos with 'emacs27 -Q')
from here on you can click on the links and navigate back with l (last)
as you can see the default behavior is supposed to be that of TAB in a single line. Cperl-mode extended regional indentation with line-breaks for {blocks} And that feature is biting you with nested hashes. > The cperl-mode is the default supplied with the above. you are contradicting yourself since your recipe says M-x cperl-mode Emacs default is still perl-mode
Cheers Rolf °) And here we are at the very heart why many vimmers hate emacs - byzantine hotkeys. Which gets even worse with non US keyboards. A problem shared by Perl's sigils.
In Section
Seekers of Perl Wisdom
|
|