help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to change Perl mode indentation to two spaces and no tabs?


From: Kenneth Wolcott
Subject: Re: How to change Perl mode indentation to two spaces and no tabs?
Date: Mon, 15 Jun 2015 12:17:53 -0700

On Mon, Jun 15, 2015 at 11:27 AM, Emanuel Berg <embe8573@student.uu.se> wrote:
> Kenneth Wolcott <kennethwolcott@gmail.com> writes:
>
>> I'd like to change the default indentation of the
>> Emacs Perl mode from four spaces (and tabs?) to be
>> two spaces and no tabs. How do I do this?
>>
>> I'd also like to do this for my bash (bourne?)
>> shell scripts.
>
> I agree tabs shouldn't be used in source - except for
> Makefiles, because there it won't work otherwise.
>
> Try this:
>
>     (setq-default tab-width 2)
>     (setq-default indent-tabs-mode nil)
>
> --
> underground experts united
> http://user.it.uu.se/~embe8573

Hi Emanuel;

  Thank you for your response!

  However, it looks like bash mode and perl mode seem to overrule
these two lines when I place them in my ~/.emacs file as I see the
same four space indentation when typing in new text in new files.

  So, either I placed these lines in the wrong file or these lines
need to be within the context of the mode (or both).

  I like the syntax highlighting and the formatting (in general) of
the perl mode, I just want multiples of two spaces for indentation
rather than multiples of  four.

Thanks,
Ken Wolcott



reply via email to

[Prev in Thread] Current Thread [Next in Thread]