Live data from Hacker News

Vim 8.0 is coming

github.com

321–330 of 420 posts

Re: Vim 8.0 is coming

#321
post #245

Earlier quoted context omitted.

Because the experience is so much better. The power of command line is intoxicating, and going to GUI tools files like programming with hands tied behind your back and being blindfolded.

I apologise in advance if this sounds dismissive, but: I've tried to use both Vim and Emacs and Neovim and Spacemacs, and every time my pain point is that they're designed for use on the command line rather than as an environment I can switch in and out of. I know this isn't strictly true as both editors can be run as separate applications that you don't quit for weeks, but their roots have persisted into how they're…

The problems you've described make sense. They're not problems I have because I generally don't exit Emacs (and I don't use it on the command line, but in server mode with GUI clients), but if I did, I'd want to come back to the same environment I left. Changes you know you want to keep, you can add to your initialization code so that they're reapplied on the next startup, but that's not the same, and it doesn't cover ephemera at all.

Which editor are you used to using that does, though? I ask because I'd like to experiment with it a little and see what it does and, to the extent possible, how it does so, because that seems like a useful capability for Emacs to have, and one of the nice things about Emacs is that it offers a programming environment flexible enough to support most other editors' "hey, neat" capabilities - the Sublime minimap, for instance.

Re: Vim 8.0 is coming

#322
post #229

Earlier quoted context omitted.

I see. Can you give me an example of a function you wrote in that way?

Here are three of mine: (defun tom/insert-sterling-symbol () (interactive) (insert "£")) (defun tom/set-buffer-modified () (interactive) (set-buffer-modified-p 't)) (defun tom/unix () "Set buffer to unix line endings" (interactive) (set-buffer-file-coding-system 'unix)) The last one exists only because I could never remember the right command to select Unix-style line endings. So rather than train myself to learn it,…

Incidentally, C-x 8 is by default bound to a keymap that includes a lot of glyphs not often found on keyboards. You can insert £ with C-x 8 L, which might be more convenient than M-x tom/insert-sterling-symbol RET.

Re: Vim 8.0 is coming

#323

Earlier quoted context omitted.

Let's hope not.

Hey, why the downvote? I respect the good work that has been put into emacs and vim over the decades, and the good kick-in-the-but that spacemacs and neovim provide too. That said, programing via editing text is a completely primitive method, and I hope things like http://unisonweb.org/ will replace it. Even if one is not on-board the structured editing concept, with so much changing about the way we use computers an…

I use these editors for so much more than programming. I'll often have a buffer open just for scratch notes and org-mode for my todo lists. I've written papers for school using LaTeX in emacs too.

If you're editing a lisp in emacs, you can already get halfway there with plugins like paredit or smartparens. You are pretty much editing the AST at that point.

Re: Vim 8.0 is coming

#324
post #5

By the way, I have a question: what is the best learning material for intermediate/advanced Vim users? I know quite a lot of Vim features but apart from vimtutorial, I never learned them in any organized way - it was more of a bunch of tricks I found via googling. It would be nice if there was a book (preferably free) on this editor.

The user manual is great, although admittedly not a very pleasant reading.

Practical Vim is a great book for intermediate/advanced users. I've been a Vim user for at least 15 years and I enjoyed it a lot.

Re: Vim 8.0 is coming

#325
post #12
post #5

By the way, I have a question: what is the best learning material for intermediate/advanced Vim users? I know quite a lot of Vim features but apart from vimtutorial, I never learned them in any organized way - it was more of a bunch of tricks I found via googling. It would be nice if there was a book (preferably free) on this editor.

I make a list for things I know would be faster if I knew them and go on. example of my vimimprove.md: - 5 deleting word while curser is in the middle of that word - 2 insert parantesis around the word im on .... when something reaches 10, I google it and write it on a note. Then the first thing I do in the morning is doing that thing 10 times. Before I leave work, I do it again. And of coarse if you use it while wor…

> deleting word while curser is in the middle of that word

:help text-objects

Text Objects are really the best thing about vim after the command grammar itself.

> insert parantesis around the word im on

Install surround.vim and add the following to your .vimrc (I think s duplicates c too closely for the prime keyboard position. Therefore, s is for surround):

    nmap s      ysi
    nmap S      ysa
    nmap s$     ys$
    nmap sv     gvs
You can then surround whatever text object you want. Surround the current word with `sw(`, surround the current braces with `s{(`, etc. The `sv` prefix lets you surround the thing you just surrounded: `sw"sv(` turns `wo|rd` -> `("wo|rd")`.

Re: Vim 8.0 is coming

#326
post #236
post #16

Earlier quoted context omitted.

Xcode is 13 years old. Visual Studio is 19 years old. Why would people use them? Because they have evolved, just like Vim & Emacs.

> Xcode is 13 years old. 27 if you count before Apple bought it (NeXTSTEP Project Builder / Interface Builder).

True. I think VS is also based on Microsoft's earlier language specific IDEs, making it probably at least 25 years old as well.

Re: Vim 8.0 is coming

#327
post #10

Earlier quoted context omitted.

I became an heavy Emacs user as I could not find the comfort of Borland IDEs in UNIX, as I started to use it. Since I moved away from C++ into Java and .NET land, never felt the need to use them any longer. And nowadays, with Qt Creator, Clion, xCode, AppCode and VS, I also don't feel the need of them when I need to go back to C++. It is very good to know the basics from plain Vi, because there are still commercial U…

The fact that I can customize VIM to suit my needs with modern methods and plugins that bring same kind of functionality found in more modern editors/development envs to the powerhouse that is VIM. For example, these are some of my favorites: https://valloric.github.io/YouCompleteMe/ - Code completion for C/C++ and other languages https://github.com/ctrlpvim/ctrlp.vim - TextMate style ctrl+p fuzzy file finder https:/…

One of the things that keeps me in VS (with VsVim) versus actual Vim for C# is that, for strictly typed languages, the autocomplete can't be beat. AFAIK, Vim autocomplete solutions use a relatively dumb autocomplete, while VS knows the types of everything and shows you all of the things you can access and nothing you can't, including changes that haven't actually been compiled yet.

I also think that interactive debugging of any kind is much faster than printing debug messages most of the time. Even if it's just something like Ruby Pry, where you have a command line REPL while stopped on the breakpoint, it feels like a huge time saver when you can be stopped at a particular point and are free to check any variable and step whenever you want. Granted for some cases, like production web sites, there's no alternative to writing debug messages and trying to figure out what happened through them.

Re: Vim 8.0 is coming

#328
post #273

Earlier quoted context omitted.

Yes it was. And now Vim is getting those features as well.

Are they merging code from neovim, or is it a parallel implementation?

Parallel. Bram (Vim maintainer) doesn't seem to like Thiago (Neovim lead dev).

Re: Vim 8.0 is coming

#329

I'm quite a noob at 'nix, so I tend to use nano whenever I need to edit something. Not sure if this is the right place, but could somebody explain the added benefit of spending the time to learn to use vim/emacs? I've tried vim, but it seems very complicated.

I learned vim 15 years ago because I saw its history and realized that if I learned vim, I'd never need to learn another editor's key commands. If you're not going to be programming, spending 20ish hours learning the intricacies of a text editor probably won't get you a return on your time investment.
Post reply on HN