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.
Is there a minor mode for emacs, that makes the same behavior available, as smart code snippets in TextMate? (macromates.com I'm new here so I can't make it clickable, eclipse also has this functionality. If not is it possible to program?.
Iterator iter = list.iterator();
while (iter.hasNext()){
type element = (type)iter.next();
}
You can then jump from field to field, and if you change one field, all the
fields with the same name will change at the same time.
I'm not looking for a mode what prompt me for every variable in the snippet, it has to be unobtrusive.
The TextMate editor is really nice, but its not cross platform, and i like using the same editor everywhere.
- Sune Simonsen
Last edited by Sune Simonsen; 05-29-2005 at 04:26 PM.
I don't know TextMate, but ELSE may do what you're looking
for ... if you find it too interactive you can easily tame it by
editing its underlying lse files.
If you have tried ELSE, I would really like you to comment on how it's working.
I seen the website before, but i was a little skeptical about it, because it looked
rather complicated, or say ambitious.
Technically, you can tame emacs to do just about anything under the sun if you really want to spend the time to code it. For example, you probably could create a list of things you type a lot, override the 'tab' button to search through that list, looking for the first three or so characters which match the characters that you just typed in the current buffer, and then Insert whatever text is at that matching element of the list. However, that would be pretty static. I'm not entirely sure how hard it would be to make it learn...but it would probably be really tricky, probably messy and inefficient, and would involve reading/writing to some sort of save file each time you open/close a buffer with whatever type of code you're writing if you wanted the snippets to be at all persistent.
Folding, which I also saw touted on the TextMate webpage, is something that emacs ain't so good with. It'll p'bly do it, but it's not quite as nice as it is in say, Vim.
So the short answer is Yes, you could certainly program emacs to do that, if you wanted to spend a lot of time learning the Emacs brand of Lisp. Emacs is a great editor and does some really nifty stuff - you never ever need to touch the mouse once you've opened it, it's fantastic - but it isn't and probably won't ever be an IDE. That's just not what it's supposed to be :-/
(And to create a link, click the "http://" button when you create a post/reply, or use [url="http://www.stuff.com"][/url] tags).
Yep macros is nice, but not quite what I was looking for.
I know I didn't explained my self very well at first, but i updated the
question, so it should be clearer was I'm looking for now.
By the way thanks for the answers, the answers came faster than I expected.
rose_bud4201 thank for the answer.
I don't want to make emacs a IDE, what I'm talking about is not that
code sensitive, it's just abbreviation on druks, and it's really useful.
If you go outside the the snippet, it losses it's information. So emacs "only"
has to keep track of the positions of the variables in the current snippet.
The snippets will be created in the .emacs file or in the hook for different
major modes.
I think you are right, of cause i can be done.
(I know about how you make a URL, but they restricted the system, so you can't
before you have made 5 posts, to prevent spamming)
Originally posted by Sune Simonsen If you have tried ELSE, I would really like you to comment on how it's working.
I seen the website before, but i was a little skeptical about it, because it looked
rather complicated, or say ambitious.
- Sune Simonsen
I actually quite like it, even though the C++ definitions
are a bit lacking ... it makes C code a breeze, but it's
most suitable for writing a new program.
Haven't looked at the other lingos, and don't do much coding
these days. In terms of completeness the ADA stuff should
be the best since Peter actually codes in ADA.
I've installed ELSE, but i think it's is a little weird,
but I will definitely give it a change. I think TextMate
and eclipse way is more intuitive, but i might be harder to
program.
I've have implemented this feature in jedit, if anybody is interrested in trying it. You can download it from det plugin manager under the name SuperAbbrevs.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.