LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 09-22-2005, 03:39 AM   #1
phoenix7
Member
 
Registered: Aug 2004
Distribution: Mandrake 10.2(Mandriva), SuSE 9.3, Slackware 9.1, Xandros 3.1, Knoppix 3.9, FreeBSD 5.3, RedHat9
Posts: 122

Rep: Reputation: 15
emacs, code completion


Hi
has emacs any code completion feature?

Thanks,
 
Old 09-22-2005, 04:25 AM   #2
Hko
Senior Member
 
Registered: Aug 2002
Location: Groningen, The Netherlands
Distribution: ubuntu
Posts: 2,530

Rep: Reputation: 108Reputation: 108
Emacs some basic code completion features.
 
Old 09-22-2005, 05:21 AM   #3
phoenix7
Member
 
Registered: Aug 2004
Distribution: Mandrake 10.2(Mandriva), SuSE 9.3, Slackware 9.1, Xandros 3.1, Knoppix 3.9, FreeBSD 5.3, RedHat9
Posts: 122

Original Poster
Rep: Reputation: 15
and how can one use them?
 
Old 09-22-2005, 06:12 AM   #4
Hko
Senior Member
 
Registered: Aug 2002
Location: Groningen, The Netherlands
Distribution: ubuntu
Posts: 2,530

Rep: Reputation: 108Reputation: 108
Quote:
Originally posted by phoenix7
and how can one use them?
M-/ to have emacs complete the currect word (identifier)
There's also more thorough version of this: M-x hippie-expand. From the info-page:
Quote:
`M-x hippie-expand' is a single command providing a variety of
completions and expansions. Called repeatedly, it tries all possible
completions in succession.
[..snip..]
Typically you would bind `hippie-expand' to `M-/' with
`dabbrev-expand', the standard binding of `M-/', providing one of the
expansion possibilities.
When using source code tags (man etags), you can complete from the tags-table with C-x t.

It also posible to define your own abbreviations, and complete code from them. From emacs help (C-h):
Quote:
add-global-abbrev C-x a g : Command: Define global (all modes) abbrev for last word(s) before point.

add-mode-abbrev C-x a l, C-x a C-a, C-x a + : Command: Define mode-specific abbrev for last word(s) before point.

dabbrev-completion C-M-/ : Command: Completion on current word.

[..snip a lot more abbrev-functions..]
 
Old 09-22-2005, 09:08 AM   #5
phoenix7
Member
 
Registered: Aug 2004
Distribution: Mandrake 10.2(Mandriva), SuSE 9.3, Slackware 9.1, Xandros 3.1, Knoppix 3.9, FreeBSD 5.3, RedHat9
Posts: 122

Original Poster
Rep: Reputation: 15
I want to understand all emacs features about programming and development. do you know any good tutorial for me?
 
Old 09-22-2005, 09:51 AM   #6
Hko
Senior Member
 
Registered: Aug 2002
Location: Groningen, The Netherlands
Distribution: ubuntu
Posts: 2,530

Rep: Reputation: 108Reputation: 108
Assuming you already know your way around in emacs:
  • To read about compiling with emacs: C-h, C-f compile
  • To read about debugging with emacs: M-x gdb, <enter>, C-h m

And of course, information about this is easily found with google:
http://jamesthornton.com/emacs/chapter/emacs_25.html
http://www.cs.utah.edu/dept/old/texi.../emacs_26.html
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Kylix 3 Code Completion error J3N7iL Linux - Software 0 11-23-2005 07:19 PM
code completion in KDevelop dvm Programming 1 05-15-2005 06:35 AM
Word completion in emacs tuxombie Programming 2 11-30-2004 04:10 PM
does vim have an option for code completion? sneak Linux - Software 4 07-20-2004 07:05 AM
Anjuta and code completion supermatt Linux - Software 0 06-17-2004 09:41 PM


All times are GMT -5. The time now is 11:34 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration