Live data from Hacker News

Emacs and Vim

martinklepsch.org

131–140 of 277 posts

Re: Emacs and Vim

#131
post #55

Earlier quoted context omitted.

What key do you press in Vim more often than any other? Esc! Not on the home row (although I'm sure you'll say you remap it to tab).

If you remap Esc to jk you don't even have to lift your fingers.

Im too lazy to move two fingers for that, instead mine is mapped to jj. =P

Re: Emacs and Vim

#132
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…

I tried evil-mode myself and came to a similar conclusion re integration.

And for package management there's vundle, neobundle, and pathogen. And after my recent discovery of vimproc, I'm now motivated to resume writing plugins!

Re: Emacs and Vim

#133
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.

Fuzzy file finder was a thing I missed the most. Fuzzy-other-things-finders like ido and helm are there and work very well, but fuzzy file finding is either slow or incomplete with most solutions. So I found one plugin I liked - https://github.com/justinweiss/fuzzy-find-in-project - rewrote most of it and now I use it exclusively: https://github.com/piotrklibert/ffip

It's documented in the code - more or less - and I'm very happy with it, especially with having multiple directory sets I can change between (which I implemented recently) and how fast it is (aside from initial caching done by the ruby backend).

I actually never thought about releasing it publicly, so the readme is non-existent and the Ruby script is hacked with hardcoded ignores, fonts are not customizable, and it's even possible that I hacked the Ruby gem source at one point. I could clean it up a bit if there was some interest in it.

Re: Emacs and Vim

#134
post #40

Earlier quoted context omitted.

It's the vim defenders who will claim that the home key navigation is a must. Emacs advocates don't much care from what I've seen. Some of them will be roused to suggest that you learn to use searching better.

Vim defenders will also tell you to use search. Also, why would even Emacs fans recommended corded combos over single keypresses? Give my pinky a break man!

Because it means you don't have to jump in and out of different modes. The biggest thing that kept me from using vim was _constantly_ typing in normal mode and trying to issue commands in insert mode.

Is constantly hitting the Escape key (even remapped to Caps Lock, or using ^[) really any better on your pinky?

Re: Emacs and Vim

#135
post #100
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.

Do one thing well. My text editor shouldn't be managing child processes or SSHing or trying to be a visual Git interface, and Vim does a great job displaying my code so I can understand it.

> Do one thing well.

For example, be an outstanding VM, IDE and a thriving ecosystem of libraries for development in a quite nice (and becoming better with each version) Lisp dialect.

Anyway, that's really a matter of preference. It's ok if you want to tell the world about yours, but try to word it in a way which isn't confrontational for people who have different preferences.

Re: Emacs and Vim

#136
post #19

Earlier quoted context omitted.

> Until it goes wrong Why? Emacs reports errors fine in my experience and if not it includes a debugger. > or you have to delve into elisp What's the problem with elisp? I guess its a matter of preference, but in my opinion elisp is easier to understand than vim script. Emacs includes extensive(!) documentation for it in it's base distribution. Granted, it's a dated language nowadays, but 3rd party libraries - easily…

>What's the problem with elisp? So I was trying to make Emacs not drop its stupid temp files next to the opened file and found this piece of incomprehensible code: (setq backup-directory-alist `((".*" . ,temporary-file-directory))) While in Vim: set backupdir=~/.vim/backups Oh, and it seems I'm missing line numbers, let's google on how to enable them and found this page http://www.emacswiki.org/emacs/LineNumbers I st…

That's because EmacsWiki is old, poorly organized and not always up to date. It's to be expected when the area to cover is this huge. "Meanwhile", in recent Emacsen, what you want is

    linum-mode
You can also customize this with

    M-x customize-group RET linum
where you can set font, format for numbers and enable/disable line numbers globally.

Re: Emacs and Vim

#137
post #16

Earlier quoted context omitted.

I use C-{n,p,f,b} all the time, though admittedly their placement is more convenient with Dvorak. Though I also tend to use M-f and M-b a lot to navigate by words instead of characters. I also often navigate by incremental search.

Speaking of incremental search: try ace-jump-mode, it's really good. Here is a video that shows it at work: http://emacsrocks.com/e10.html

Also iy-goto-char

Re: Emacs and Vim

#138
post #41

Earlier quoted context omitted.

Generally you have emacs do the remoting. I use emacs in a work environment that is primarily Vim and where we end up logging in to a lot of machines to do development on, and the two things that turn heads in my emacs setups are my fluent and flexible use of multiple windows and frames, and the fact that I'm always using my local emacs and I use Tramp to remote in to the machines, so I don't have to screw around wit…

It sounds like it's only practical when you know you want to edit things in the first place, as opposed to "it doesn't work, let's restart the service in my existing SSH session and have have a look of the log" sysadmin-style-workflow.

No, Emacs/Tramp supports remote shells too.

Re: Emacs and Vim

#139
post #100
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.

Do one thing well. My text editor shouldn't be managing child processes or SSHing or trying to be a visual Git interface, and Vim does a great job displaying my code so I can understand it.

Programs that "do one thing well" are utterly useless unless you can compose them. Emacs is a tool that composes programs that do one thing well, like Bash or X.

Emacs, as has been said time and again, is not a text editor. It is, if anything, a development shell. It contains a text editing program (the default program), and that program does not manage child processes or SSH or Git.

You could also take the stance that Emacs _is_ a program that "does one thing well:" develop programs. That's the actual task of importance. Text editing is a secondary, ancillary task that owes its importance entirely to the archaic practice of representing complex interrelationships between data and operations on those data as a static linear stream of ASCII-encoded bytes.

Unfortunately, almost all programming languages are like this (hence, "languages"), but if you ever use Emacs to edit Lisp, you'll find that it's far less like text editing than it is like directly manipulating the abstract structure of the program. It does a reasonable job trying to replicate this experience in other languages, but when you have utterly inane constructions like seventeen-precedence-level infix notation, there's only so much you can do.

Re: Emacs and Vim

#140

Earlier quoted context omitted.

They take a while to master, but once you get there no other editor on the planet can compete. Not by a long shot. And then you keep on learning. They also can run in a remote console which for me is reason alone not to use another editor.

"They also can run in a remote console which for me is reason alone not to use another editor." As a developer, that makes no sense to me. Do you really need a powerful remote editor? What do you need a remote editor for, other than checking that a config file was set up correctly, or reading a log file?

Hm, I work with Embedded systems and each product has a different virtual machine that's hosted somewhere.

I have nothing in my work machine but a linux shell. I just vi everyplace in the world, edit things there and compile there and then scp to the product. My work is 100% remote.

Post reply on HN