LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 10-02-2004, 07:51 AM   #1
hylke
Member
 
Registered: Apr 2004
Location: the Netherlands
Distribution: Ubuntu 7.04
Posts: 329

Rep: Reputation: 30
emacs -> automaticly add Tab


Hello
Is it possible to let emacs automaticly use a tap after a {?
So if i would type:
#include <iostream>

using namespace std;

int main()
{
and then press enter it would use a tab, untill a }?
Thanx Hylke
 
Old 10-02-2004, 11:44 AM   #2
foo_bar_foo
Senior Member
 
Registered: Jun 2004
Posts: 2,553

Rep: Reputation: 53
you set the c style with and see the available styles
ESC x c-set-style then push TAB
to see what it looks like
highlight something and do ESC Cntrl \
now with what you said it's not goint to indent the next line until you put the ; at the end
but it will indent it and line it all up for you as you go along.

for your .emacs file
Code:
(add-hook 'c-mode-hook
             '(lambda ()
                (c-set-style "stylename")))
you can make your own style or customize the available ones using lisp but it's not so easy
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Tab stops in emacs regexps King of Men Linux - Software 0 11-07-2005 11:39 AM
FC 4. Modify ALT+TAB behaviour to CTRL+TAB xtracto Linux - Software 1 09-22-2005 02:06 PM
How to set tab in Emacs? Mathsniper Linux - Software 2 06-14-2005 11:05 PM
emacs-like tab in kdevelop s0ggyfish Programming 0 05-26-2003 03:08 AM
a script that go read the users names in a file and automaticly add then with a commo tumemanques211 Programming 2 03-22-2002 02:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:09 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration