Live data from Hacker News

Emacs and Vim

martinklepsch.org

171–180 of 277 posts

Re: Emacs and Vim

#171
post #129
post #9

Earlier quoted context omitted.

Usually the strong defenders of emacs tell you that you must use c-n c-p c-b c-f to move because those are better and you will adapt in a short time. Then the strongest defenders of emacs tell you that you must use whatever you want because the purpose of emacs is that the editor must adapt to you and not the opposite.

Actually I think the strongest defenders of emacs say you use C-s and the like for most navigation. Moving character-by-character is slow and inefficient, so the argument about whether C-n C-p etc. are better or worse than hjkl is irrelevant. I have my own code editor which is more like vi than emacs, but I'm using interactive search in it.

I have my own code editor...

That's the best line I've heard to finish an emacs-vs-vi argument!

Re: Emacs and Vim

#172
post #144

Is anybody besides me still having the problem with Emacs on Mavericks where the OS X distnoted process gradually eats up gigabytes of RAM? It seems to have to do with running multiple instances of Emacs.

http://emacsformacosx.com/builds

The latest nightlies and pretest (the ones marked "Multi") have this fixed. It's a super frustrating bug.

Re: Emacs and Vim

#173
post #17

Emacs+Evil is the next Vim. And yes, CtrlP is probably the thing you'll miss most. But all the other things I got from switching from Vim to Emacs+Evil easily outweigh the missing CtrlP. Vim was great, until I wanted to customize it heavily. It is simply not made to facilitate things like: child processes, SSH, understanding my code, a visual interface for Git.

>Emacs+Evil is the next Vim.

Actually, Vim is the next Vim--it only seems to get better and better.

After switching to Vim full-time about two years ago, I recently tackled exporting the text from a 10-year old PDF to markup it up using AsciiDoc[1] so I can output HTML and ePub.

It’s over 37,000 words but I was amazed how easily I was able to jump anywhere on the screen with just a few keystrokes fix all of the little things that need to be fixed in a text file.

And because editing paragraphs of text is somewhat different than what I normally do (writing HTML and CSS), it was pretty cool being able to leverage the composability[2] of Vim and how seamlessly that knowledge works in new contexts.

[1]: http://www.methods.co.nz/asciidoc/index.html [2]: https://medium.com/@mkozlows/why-atom-cant-replace-vim-43385...

Re: Emacs and Vim

#174
post #120

Wanna have fun with emacs? Try to integrate evil mode nicely in different plugins. Especially if you use totally different key bindings in vi (non qwerty layout for example). It was very painful experience for me. Yes, vim is far from ideal, yes neo-vim is looking like to be next iteration in vim evolution, yes no parallel tasks execution is pain. But at the same time there is vimproc. For clojure integration there i…

You have exactly the same problem with a non-standard key-binding/layout and vim. For instance, the default file browsing plugin netrw hardcodes its shortcuts…

Re: Emacs and Vim

#175
post #110

Earlier quoted context omitted.

Emacs does a great job at that, too. (In fact, it contains a complete Javascript parser, which is invaluable to me since that's the language around which my professional life revolves.) It also does a great job managing child processes and SSHing. (Or FTPing, or speaking whatever other protocol you need to use to access remote files.) I can't speak to it as a visual Git interface, but I don't doubt it's at least reas…

It's great to aspire to more, and that's why my system has more than one binary in $PATH. If a project wants to release an awesome $thing_doer in addition to their main tool's function, it should be a separate tool. That way I can use esshhelper and egitbrowser and eftp separately from emacs (yes, I know the names are contrived).

Do you consider the shell an overly-featured program because you use it to copy/delete/create/link files, install packages, etc? No, because it's a tool which loads up other tools for your use, providing some conveniences like job control in the process.

Emacs provides a lisp implementation. People have used this lisp implementation to write ftp clients, web browsers, and yes even text editing functionality; you then use emacs to load some of that lisp code and execute it. I don't say the Bourne shell fails at "doing one thing well" since people write shell scripts and run them from within the shell.

Re: Emacs and Vim

#176
post #158

> I completely do not understand how anyone can use Emacs’ default keybindings. I completely do not understand how switching modes is a good idea in an editor. It just doesn't fit in my brain somehow. I start typing and randomly end up pasting and cutting. I want to paste and cut it randomly types my commands in insert mode. Emacs cords are pretty intuitive to me. I don't know many: just moving, saving, creating 2 wi…

Anyone who thinks Emacs isn't modal hasn't opened a buffer on a directory.

Re: Emacs and Vim

#178

So many Emacs articles the recent days... please tell me: Should I really switch to Emacs as a web developer? Is it really superior to SublimeText and Brackets for a web dev?

I'm a web dev who has switched to Emacs a few years ago. In the first year I went from throwing profanities at it to writing some basic elisp code to refresh the active browser tab after saving the file, before watch tasks for nodejs were even a thing.

I can't say that you should switch, or that it's superior to anything, but I think you could at least give it a try. And by this I mean: use it as your only text editor for as long as you can invest (a week, maybe a month). Start with the built-in tutorial, install: ido, web-mode, js2-mode, maybe add yas-mode. Install a nice color theme. Learn the key bindings in web-mode to efficiently navigate HTML documents. Try to perform some tasks using macros. While editing try to forget you even have a mouse. Discover the little things, like "undo" being able to be narrowed to the selected lines instead of global linear history, or the kill-ring (you can paste form previous "cut" operations, not just the recent one).

There's some un-learning and re-learning of everyday tings like the shortcuts for copy/paste or the concept of selection vs. region, but for me it was a good investment. I can't say it'll be good for you, but I encourage you to try - if you won't switch you'll at least get a better understanding of what you like about your current editors.

Re: Emacs and Vim

#179
Another option for "modal" editing in emacs is god-mode(1). It lets you use emacs commands without modifier keys. I have it set to change my mode-line color when it's activated, it's great if you want a little taste of vim but not the problem of trying to shoehorn vim key-bindings into emacs.

1. https://github.com/chrisdone/god-mode

Re: Emacs and Vim

#180
post #70

Whether it's vim or emacs, I've always been amazed how these tools can become an extension of the brain like an instrument whose purpose is to materialize a thought process. Framed that way, the editor wars look like a pianist debating with a violinist of the superiority of their respective instruments to convey human emotion. Watching a seasoned vim or emacs user create, mold, shape, reformat text like it was a piec…

What's wrong with flute players?

They steal your children if you don't pay them.
Post reply on HN