* Somtime Emacs have it one life
@ 2007-05-08 6:58 anders
2007-05-08 9:40 ` Peter Dyballa
2007-05-08 11:30 ` Kai Grossjohann
0 siblings, 2 replies; 3+ messages in thread
From: anders @ 2007-05-08 6:58 UTC (permalink / raw)
To: help-gnu-emacs
Nja it is me that don't understand but if someone could help to tell
me way.
I have sett indent, tabs to use tab-char other user have other editors
and the companystandard it to use tab-chars.
Problem 1 - somtime i want to strycture code with tabs tex.
char *aShortStuff = NULL;
char *aLongLongStuff = NULL;
char *aLongLongLongStuff = NULL;
as
char *aShortStuff = NULL;
char *aLongLongStuff = NULL;
char *aLongLongLongStuff = NULL;
This very often Emacs don't like to just sto after 1 tab.
Problem 2 - Emacs stopp using tabchar and start using space
Somtine editing a old function tex
int calc(int x, int y) {
int res=0;
Adding/editing my declaration som times tab stopp woring, indent
change
and emacs start using space.
Any idé is somting set work, och is it some mode/indetcontroll that is
wrong
for what i want to do..
best regards Anders
..
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Somtime Emacs have it one life
2007-05-08 6:58 Somtime Emacs have it one life anders
@ 2007-05-08 9:40 ` Peter Dyballa
2007-05-08 11:30 ` Kai Grossjohann
1 sibling, 0 replies; 3+ messages in thread
From: Peter Dyballa @ 2007-05-08 9:40 UTC (permalink / raw)
To: anders; +Cc: help-gnu-emacs
Am 08.05.2007 um 08:58 schrieb anders:
> Any idé
Don't press TAB – use C-q TAB from time to time. TAB is not tab.
--
Greetings
Pete
"There's no place like 127.0.0.1"
origin unknown
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Somtime Emacs have it one life
2007-05-08 6:58 Somtime Emacs have it one life anders
2007-05-08 9:40 ` Peter Dyballa
@ 2007-05-08 11:30 ` Kai Grossjohann
1 sibling, 0 replies; 3+ messages in thread
From: Kai Grossjohann @ 2007-05-08 11:30 UTC (permalink / raw)
To: help-gnu-emacs
anders <anders.u.persson@gmail.com> writes:
> I have sett indent, tabs to use tab-char other user have other editors
> and the companystandard it to use tab-chars.
>
> Problem 1 - somtime i want to strycture code with tabs tex.
> char *aShortStuff = NULL;
> char *aLongLongStuff = NULL;
> char *aLongLongLongStuff = NULL;
>
> as
>
> char *aShortStuff = NULL;
> char *aLongLongStuff = NULL;
> char *aLongLongLongStuff = NULL;
One idea is to type M-i instead of TAB. (Mnemonic: TAB is C-i.) M-i
advances to the next tab stop. Tab stops are defined in
tab-stop-list -- use C-h v tab-stop-list RET for more information.
Another idea is to use align.el. Mark these three lines and type M-x
align RET. Or perhaps M-x align-regexp RET = RET.
> This very often Emacs don't like to just sto after 1 tab.
>
> Problem 2 - Emacs stopp using tabchar and start using space
>
> Somtine editing a old function tex
> int calc(int x, int y) {
> int res=0;
This is somewhat complicated. The variable c-basic-offset controls
how many columns does Emacs indent in such a case. The variable
indent-tabs-mode controls whether Emacs uses tab characters (plus
spaces) to move to that column, or just space characters. The
variable tab-width controls how wide a tab character is.
Actually, c-basic-offset is a simplification. See the key combination
C-c C-o for more information. (C-h k C-c C-o or try it.)
All of them need to be set up correctly for your environment. In the
above example, c-basic-offset needs to be 4, indent-tabs-mode needs to
be t, and tab-width needs to be 4. Then the "int res=0;" line will be
indented with a single tab character.
Kai
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-05-08 11:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-08 6:58 Somtime Emacs have it one life anders
2007-05-08 9:40 ` Peter Dyballa
2007-05-08 11:30 ` Kai Grossjohann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).