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

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

Re: .emacs configuration question (easy)


From: Michael Slass
Subject: Re: .emacs configuration question (easy)
Date: Wed, 02 Oct 2002 16:18:13 GMT
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

"Ryan Barnard" <barnarr@cc.wwu.edu> writes:

>Hi,
>
>I'm fairly new to using Emacs, but I see great potential for it.  I've got a
>simple question I was hoping somebody could help me with:
>
>I want to set up emacs to be a little IDE for some C++ work I wish to do.
>Here's the keypresses needed to make it look how I want it:

Slightly off topic - but have you tried M-x compile ?
If you're not using a makefile, just replace the default command (when
you're prompted) with your compilation command, and emacs will
remember it the next time you try.

I use these key bindings:

(add-hook 'c-mode-common-hook
  (lambda ()
    (define-key c-mode-base-map (kbd "<f3>") 'compile)
    (define-key c-mode-base-map (kbd "<f2>") 'next-error)
    (define-key c-mode-base-map (kbd "<f4>") 'gdb)))


So F3 starts compilation.  If there are errors, F2 traverses them, and
F4 starts the debugger.



-- 
Mike Slass


reply via email to

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