(no subject)

Date: 2009-05-11 04:13 pm (UTC)
lnr: Halloween 2023 (Default)
From: [personal profile] lnr
I use the tab *key* for indent, but emacs converts it into the right number of spaces for me (usually) and incidentally makes it easier to spot when I've got the code wrong.

(no subject)

Date: 2009-05-11 04:15 pm (UTC)
From: [identity profile] hoiho.livejournal.com
That's the Right Way to do it!

(no subject)

Date: 2009-05-11 08:05 pm (UTC)
ext_8103: (Default)
From: [identity profile] ewx.livejournal.com
You can customize indent-tabs-mode to nil to avoid it inserting actual tab characters. But you won't thank me for this if ever you edit the few file formats that require tabs (and that Emacs doesn't have any kind of exception for which I think includes makefiles); in that case your best bet is probably to set it locally from mode hooks.

(no subject)

Date: 2009-05-12 11:28 am (UTC)
lnr: Halloween 2023 (Default)
From: [personal profile] lnr
I've not found I had to do anything to make it correctly indent code when I've been writing Perl, perhaps that's the default for perl-mode? I only find it gets it wrong if I have a regexp containing some sort of unmatched quote or opening bracket, in which case I end up having to append a comment closing it again or it refuses to line up properly :)

(no subject)

Date: 2009-05-12 11:36 am (UTC)
ext_8103: (Default)
From: [identity profile] ewx.livejournal.com
Oh, it should certainly correctly indent by default. indent-tabs-mode determines whether it will insert only spaces or whether it will use tab characters (i.e. ASCII 0x09) to replace runs of spaces - which makes the file smaller but also makes the layout ambiguous (and I find can make navigation trickier as the cursor likes to go to one end of the tab or the other rather than in the middle).

February 2025

S M T W T F S
      1
2345678
9101112131415
16171819202122
232425262728 

Most Popular Tags

Expand Cut Tags

No cut tags