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

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

Re: About Emacs features


From: Emanuel Berg
Subject: Re: About Emacs features
Date: Mon, 13 Jan 2014 22:40:15 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Alejandro Zamora Fonseca <terefv@ltu.sld.cu> writes:

> Hello! I'm a Emacs new user and I have a question.
> How I can auto-complete words and create 'macros'
> (code snipets rapid generation) like in Notepad++?

For "auto-complete", you can use abbrev, as mentioned,
but I don't know if there is a "dynamic" auto-complete
feature like in some of those M$ IDEs where you define
a variable (or create a button, with old-school
Hungarian notation to keep track of one zillion
objects) and then just type the beginning of the name
to get suggestions, and then hit enter to complete. I
don't like that, because it is disruptive, and besides
short names and typing (finger habits/muscle memory)
will more than account for it (as I see it), but if you
want it, I never saw any abbrev except for the static
one that you manually put up in a file (or with
interactive calls). Most likely, someone else on this
list can tell you if such a feature exists.

As for keyboard macros, there are those (not to be
confused with Lisp macros), as in poor man's
programming (like xmacroplay in X) but as you describe
it, I'd say you don't want (keyboard) macros, but a
template facility. Check out those URLs:

http://www.emacswiki.org/emacs/CategoryTemplates
http://unix.stackexchange.com/a/71623

As an example, this is what aptitude tells me about
'yasnippet':

Description: A template system for Emacs

YASnippet (yet another snippet extension for Emacs) is
a template system for Emacs. It allows you to type an
abbreviation and automatically expand the abbreviation
into function templates.
 
Bundled language templates includes: C, C++, C#, Perl,
Python, Ruby, SQL, LaTeX, HTML, CSS and more.

Homepage: http://code.google.com/p/yasnippet/

-- 
underground experts united:
http://user.it.uu.se/~embe8573


reply via email to

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