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

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

indenting


From: Billy N. Patton
Subject: indenting
Date: Tue, 26 Oct 2004 09:53:43 -0500
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040623

I'm new to emacs. Started last Monday with XEmacs and switched this monday to gnu emacs.
I've been a 10+ year vim/gvim user.

Here the problem:

I like to line up my variables, = and values in a pretty form that makes it more pleasent to the eyes. ex:

int   i1            = 0;
int   another_one   = 1;
char* cp            = '\0';

I do not want tab characters.  done
I want to be able to hit the tab key after I type int and i1. but the int indents and follows the tab. What I end up with is
             int i1 = 0;
THis is no more readable than having everything shifted to the left.

How can I stop this behavior?

I like the auto indenting then I add the { } and the lines afterward.
But I like to line up my code so that it is nice an neat, not a jumbled mess.

Any help would be appreciated

my current .emcas file

;;; XEmacs backwards compatibility file
(setq user-init-file
      (expand-file-name "init.el"
                        (expand-file-name ".xemacs" "~")))
(setq custom-file
      (expand-file-name "custom.el"
                        (expand-file-name ".xemacs" "~")))

(load-file user-init-file)
(load-file custom-file)

(add-hook 'c++-mode-hook '(lambda () (setq indent-tabs-mode nil)))
(setq-default indent-tabs-mode nil)
;(setq c-tab-always-indent t)
(setq c-tab-always-indent nil)

--
   ___  _ ____       ___       __  __
  / _ )(_) / /_ __  / _ \___ _/ /_/ /____  ___
 / _  / / / / // / / ___/ _ `/ __/ __/ _ \/ _ \
/____/_/_/_/\_, / /_/   \_,_/\__/\__/\___/_//_/
           /___/
Texas Instruments ASIC Circuit Design Methodology Group
Dallas, Texas, 214-480-4455,  b-patton@ti.com


reply via email to

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