[Top][All Lists]

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

Emulating autoindent shiftwidth=4 tabstop=8 from vi

From: Pierre Sarrazin
Subject: Emulating autoindent shiftwidth=4 tabstop=8 from vi
Date: Tue, 30 Oct 2001 15:35:11 -0500
User-agent: Mutt/1.2.5i

I am trying to migrate from vi to GNU Emacs.  I don't wish to use
viper, but I would like to avoid using Emacs modes for C, C++, etc.

How can I configure Emacs to have the following behavior?

- Always operate in Text mode, whatever the file extension (i.e.,
  no c-mode or cc-mode, etc).

- Use 4 columns for indentation.

- Automatically indent.

- One of the following:

    - The Tab key inserts a physical TAB character, and two other keys
      are used to indent and unindent (like Ctrl-D and Ctrl-T in vi).

    - The Tab key indents and backspace unindents.

- In the editor as well as in the files, indentations are represented
  with as many TAB characters as possible.  For example, a 12 column
  indentation will be one TAB followed by four spaces.

In other words, I am trying to reproduce the behavior of the
following vi settings:

    set autoindent shiftwidth=4 tabstop=8

My Emacs version is 20.5.1.

I am muched used to vi (vim 5.6), but I have been trying to get
used to Emacs for about ten years.  I like the concept of Emacs,
but I would just like to configure the indentation and tab commands
to conform to my deeply entrenched habits.

If somebody could get me started, I think I might very much enjoy
using the power of Emacs.  Thanks.

Pierre Sarrazin <sarrazip at sympatico dot ca>

reply via email to

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