Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
i found emacs indentation went strange way when editing cpp file with it, below is what it did:
Code:
int Foo()
{
int a;
int b
int c;
int d;
}
as you can see first line within {} emacs indent two spaces and so did the second line, but if I omit the semicolon after b the third line will go four spaces instead, why ???
and, how can i make emacs indent 4 spaces not 2 here ?
because i like distance of 4 spaces so far, strictly speaking, i prefer 4 spaces tab not spaces at all, unfortunately emacs really inserting spaces not tab when i pressed Tab key. how can i fix that please ?
i found emacs indentation went strange way when editing cpp file with it, below is what it did:
Code:
int Foo()
{
int a;
int b
int c;
int d;
}
as you can see first line within {} emacs indent two spaces and so did the second line, but if I omit the semicolon after b the third line will go four spaces instead, why ???
and, how can i make emacs indent 4 spaces not 2 here ?
thanx~
hi there,
from the top of my head now...
can confirm later. hope some lisp guru can help.
it didnt help, i add it to the top of .emacs file but nothing changed, my .emacs file is something like this:
Code:
(setq indent-tabs-mode 2)
(custom-set-variables
;; custom-set-variables was added by Custom -- don't edit or cut/paste it!
;; Your init file should contain only one such instance.
'(case-fold-search t)
...
Originally posted by black it didnt help, i add it to the top of .emacs file but nothing changed, my .emacs file is something like this:
Code:
(setq indent-tabs-mode 2)
(custom-set-variables
;; custom-set-variables was added by Custom -- don't edit or cut/paste it!
;; Your init file should contain only one such instance.
'(case-fold-search t)
...
to use the tab stop list you need to switch indent tab modes also in your .emacs file:
(setq-default indent-tabs-mode 1)
i think you can find all these informations at emacswiki.
hope it helps.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.