Live data from Hacker News

Emacs 26.3

lists.gnu.org

101–110 of 165 posts

Re: Emacs 26.3

#101
post #28

I recently tried to seriously use Emacs over my usual Vim. Mainly because I've got so used to the GNU readline emacs shortcuts in the terminal and quite like the idea of not having to switch between command and insert mode, but damn after looking into some configuration options it really is a massively complicated piece of software, I mean not to start using it, it's probably easier than Vim but just looking at all t…

> I've got so used to the GNU readline emacs shortcuts in the terminal If you happen to be using bash, "set -o vi" was a godsend for me.

You should also check out the relatively new setting that lets you visually track your mode.

    bind 'set show-mode-in-prompt on'

Re: Emacs 26.3

#102
post #70

I tried vscode the other day to see what it's about and it's nice, but I found plugin development convoluted and very limiting compared to emacs. No chance of quickly writing a script to automate something in the editor, because it takes so much time that it's not worth it for quick editor code snippets. Other editor users simply have no concept of how easy it is to whip up some quick script to perform some task in e…

Could you do the work in a plug-in to allow easy creation of scripts as a solution? Or is there an execution sandbox preventing that?

Also I never really thought of writing scripts for editing in emacs thanks for the brain shift that clicked for me.

Re: Emacs 26.3

#103

Great job a very good example of programmable editor. Emacs had been my work horse since 2002 and never disappointed. In the meantime tried many ide only vim and emacs stayed with me. Sometimes do use nano and sublime text but then back to either emacs or vi. All those shiny IDE based on electron, Java or C++ are just too slow to be productive be it VScode, atom or eclipse or visual studio or kdevelop. I am forced to…

The one thing that keeps me from moving lightweight editors like vim or emacs from the bloated IDE stuff if the ability to easily find definitions, etc. If I have hundreds or thousands of source files and I want to find the definition of say a struct or function, being able to right click->go to definition or similar is a godsend. Maybe emacs or vim have similar features via plugins though? I'm not sure.

This functionality is provided by `xref-find-definition`[1]. For many languages this defaults to using keywords from a generated tags index file, but many modes have a language server or some other more specific facility to provide this functionality at runtime. I'm not familiar with what provides that functionality for C/C++, but Ruby has `robe`, python has `jedi`, clojure has `cider`, rust has `racer`, etc. It generally requires a some setup for each language you use, but there is broad support for this functionality (and it often provides some form of symbol auto-completion as well).

Some modes also support limited refactoring tools[2], but that's not quite as common.

[1] https://www.gnu.org/software/emacs/manual/html_node/emacs/Xr...

[2] https://github.com/clojure-emacs/clj-refactor.el, https://github.com/Wilfred/emacs-refactor, https://www.emacswiki.org/emacs/SemanticRefactor

Re: Emacs 26.3

#104

Earlier quoted context omitted.

I don't know if it would, but I can imagine that replacing the aging Elisp interpreter would improve the situation on all systems.

Yeah but does guile even work on windows? Last time I checked it was still very much confined to *nix systems.

Guile probably would, but Guile Emacs is not ready (yet?).

Re: Emacs 26.3

#105

Great job a very good example of programmable editor. Emacs had been my work horse since 2002 and never disappointed. In the meantime tried many ide only vim and emacs stayed with me. Sometimes do use nano and sublime text but then back to either emacs or vi. All those shiny IDE based on electron, Java or C++ are just too slow to be productive be it VScode, atom or eclipse or visual studio or kdevelop. I am forced to…

The one thing that keeps me from moving lightweight editors like vim or emacs from the bloated IDE stuff if the ability to easily find definitions, etc. If I have hundreds or thousands of source files and I want to find the definition of say a struct or function, being able to right click->go to definition or similar is a godsend. Maybe emacs or vim have similar features via plugins though? I'm not sure.

[deleted]

Re: Emacs 26.3

#106

Earlier quoted context omitted.

The one thing that keeps me from moving lightweight editors like vim or emacs from the bloated IDE stuff if the ability to easily find definitions, etc. If I have hundreds or thousands of source files and I want to find the definition of say a struct or function, being able to right click->go to definition or similar is a godsend. Maybe emacs or vim have similar features via plugins though? I'm not sure.

My package dumb-jump might be what you want: https://github.com/jacktasia/dumb-jump

It's easily the best zero-configuration, nigh any language symbol locator, for _any_ editor or IDE.

Re: Emacs 26.3

#107
post #70

I tried vscode the other day to see what it's about and it's nice, but I found plugin development convoluted and very limiting compared to emacs. No chance of quickly writing a script to automate something in the editor, because it takes so much time that it's not worth it for quick editor code snippets. Other editor users simply have no concept of how easy it is to whip up some quick script to perform some task in e…

Could you do the work in a plug-in to allow easy creation of scripts as a solution? Or is there an execution sandbox preventing that? Also I never really thought of writing scripts for editing in emacs thanks for the brain shift that clicked for me.

If you want to write a new command for vscode then you have to register it in contribution points in the editor which is done in a json file. I don't know if you can do that dynamically and if you can't then you can't create a quick throwaway editing command either.

I very often write few lines of temporary commands if I have to do some mass editing which can be automated.

With vscode I'd have to do it in python or something outside of the editor which is much less convenient than an emacs script which can work on a file as a buffer.

Re: Emacs 26.3

#108

Great job a very good example of programmable editor. Emacs had been my work horse since 2002 and never disappointed. In the meantime tried many ide only vim and emacs stayed with me. Sometimes do use nano and sublime text but then back to either emacs or vi. All those shiny IDE based on electron, Java or C++ are just too slow to be productive be it VScode, atom or eclipse or visual studio or kdevelop. I am forced to…

The one thing that keeps me from moving lightweight editors like vim or emacs from the bloated IDE stuff if the ability to easily find definitions, etc. If I have hundreds or thousands of source files and I want to find the definition of say a struct or function, being able to right click->go to definition or similar is a godsend. Maybe emacs or vim have similar features via plugins though? I'm not sure.

There's a bunch of "plugins" for Emacs (and vim, I guess, that provide that, but I wouldn't know). xcscope largely does what I want and I've successfully used it on very large codebases (think Linux kernel + vendor-supplied HAL + a very large amount of userspace code).

It's hard to beat an IDE on a large, disorganised codebase though, I'd lie if I said I only use Emacs and never reach out for an IDE.

Re: Emacs 26.3

#109
post #70

I tried vscode the other day to see what it's about and it's nice, but I found plugin development convoluted and very limiting compared to emacs. No chance of quickly writing a script to automate something in the editor, because it takes so much time that it's not worth it for quick editor code snippets. Other editor users simply have no concept of how easy it is to whip up some quick script to perform some task in e…

> Other editor users simply have no concept of how easy it is to whip up some quick script to perform some task in emacs. I don't want to start a flamewar, but I moved most things I was doing in Emacs to Textadept a while back because I found Textadept more convenient. That's not to say TA does everything you can do in Emacs, but it replaced all of the scripting I was doing with Emacs. You have the full power of Lua…

Of course I meant editors which I know and tried like vscode. I don't know Textadept, so it may be easy to write quick scripts in it.

As for your C-d example, it's a trivial function in emacs which I too wrote many years ago and bound to C-d, so it's not a compelling example, because it can be added trivially in emacs too.

Re: Emacs 26.3

#110
post #28

I recently tried to seriously use Emacs over my usual Vim. Mainly because I've got so used to the GNU readline emacs shortcuts in the terminal and quite like the idea of not having to switch between command and insert mode, but damn after looking into some configuration options it really is a massively complicated piece of software, I mean not to start using it, it's probably easier than Vim but just looking at all t…

Might I suggest GNU Nano? It has many of the same Readline shortcuts, but it's a lot simpler. It's what I've settled on. (Seriously.)
Post reply on HN