Live data from Hacker News

Neovim's Next Feature Poll

neovim.org

71–80 of 105 posts

Re: Neovim's Next Feature Poll

#71
post #49

Earlier quoted context omitted.

Vim doesn't need multiple cursor support. Train yourself to think in Vim—you're editing text and words, not moving a cursor. Macros and global replace already do what you want.

Macros and global replace are substitutes, sure, but they're not at all the same thing . And while I'm no vim wizard, I have used it as my main editor for 4+ years, and have a 1500 line vimrc and plenty of plugins (including my own), so you don't get to assume I don't grok the vim way of thinking :) I've heard the "macros is the same" sentiment many times, and usually it's from people who have never had much experien…

> [I] have a 1500 line vimrc and plenty of plugins (including my own), so you don't get to assume I don't grok the vim way of thinking :)

This may only show that you grok VimScript way of thinking, not Vim way of thinking.

You need not re-record a macro, a macro is stored in a register. Just edit the register, and you're good to go with you new, (supposedly) improved macro.

In Vim, you edit in Normal mode, and insert in insert mode. Multiple cursors is a means of moving editing into insert mode, and thus in spite of the Vim way. I am an Emacs user * and there is a multiple-cursors mode for Emacs, which quite useful as Emacs is modeless.

* If we're doing SLOC porn here, I've a ~400 SLOC vimrc with nice gems in it, and is nicely and extensively commented. I've switched to Emacs for my love of Lisp and newfangled dislike of some parts of Unix.

Re: Neovim's Next Feature Poll

#73
post #54

Earlier quoted context omitted.

Simple (very common example): .some-css-rule { padding-left:50px; padding-right:50px; } Say I want to edit those two numbers. With multi-cursors, it's as simple as select one number, hitting a button that causes the other number to be selected, then writing the new value. Now, after I wrote it, I realize I forgot to put a space after the colon, and want to change the formatting. No problem - I just make the change to…

If you do this kind of editing daily, then executing the following commands would become second nature :s/50/60/g :s/:/: /g No need to touch the mouse or use macros. Many use-cases for multiple cursors are satisfied by the core functionality of vim, however they may not be immediately obvious.

Trivial counter-example:

  .some-css-rule { padding-left:50px; padding-right:50px; margin:50px; } 
Pretend you want to avoid changing the margin.

Re: Neovim's Next Feature Poll

#74
post #73

Earlier quoted context omitted.

If you do this kind of editing daily, then executing the following commands would become second nature :s/50/60/g :s/:/: /g No need to touch the mouse or use macros. Many use-cases for multiple cursors are satisfied by the core functionality of vim, however they may not be immediately obvious.

Trivial counter-example: .some-css-rule { padding-left:50px; padding-right:50px; margin:50px; } Pretend you want to avoid changing the margin.

:s/50/60/g @:

or even just /50r6n.

if there's any new feature I'd like to see in neovim it would be one key that will repeat an ex command like period does for normal/visual mode

Re: Neovim's Next Feature Poll

#76
post #73

Earlier quoted context omitted.

If you do this kind of editing daily, then executing the following commands would become second nature :s/50/60/g :s/:/: /g No need to touch the mouse or use macros. Many use-cases for multiple cursors are satisfied by the core functionality of vim, however they may not be immediately obvious.

Trivial counter-example: .some-css-rule { padding-left:50px; padding-right:50px; margin:50px; } Pretend you want to avoid changing the margin.

Glib response:

:s/t:50/t:60/g

More serious response: I think after many years of training ones brain to use the features available to it some of those features become second nature and subconscious. This is great for editing and it's the reason I immediately saw that you left me a really easy way to do it, but it can make seeing the value of new features more difficult.

Re: Neovim's Next Feature Poll

#78
Thiago claims that one of Vim's biggest problems is its lack of testing infrastructure. It is difficult to refactor or make changes without the chance of introducing some possibly obscure regression. This is probably a big part of Bram's reluctance to merge large changesets from other developers.

I honestly thing if he can successfully pull off this "msgpack UI" and get a solid set of tests written (which the community seems eager to start work on) this project will be a huge success.

Here is his quote from the mailing list:

"This may not be so obvious, but vim's biggest problem has nothing to do with the lack of the above features. It's something much more basic: poor testing infrastructure.

While vim has some automated tests(about 200 counting with the ~100 tests embedded in test 49) those only catch the 'biggest' bugs, with many small ones being introduced by patches and only detected at a later time. It's a true maintenance hell, and here's a post on reddit that illustrates the problem(even though the author himself disagrees with neovim): http://www.reddit.com/r/programming/comments/1yjzez/neovim_a...

The problem is that in it's current state, vim cannot grow because there's no easy way to write automated tests for it. The current test suite is very hard to understand and those that submit patches probably won't write tests because it's too complicated. But patches need to be tested, especially bug fixes which must acompany a regression to ensure they won't be reintroduced. So it's easy to see why Bram is skeptical about merging patches, especially new features: He has no way of knowing if those patches will break existing code. In the example given by the reddit comment, Bram 'solved' the problem by simply picking the lesser of two evils.

This is one of the firsts issues neovim aims to fix: By writing a msgpack 'UI', we'll be able to write well-documented functional tests in a high-level language. Contributors reporting bugs will be able to reproduce them with a test cases and new features will be properly tested. As the test suite covers more code, neovim will be more 'protected' since there will be a bigger chance of catching bugs the minute a PR is sent(with travis). People need to understand that before posting issues regarding new features or new ideas, as neovim must be properly 'secured' against bugs first."

Re: Neovim's Next Feature Poll

#79
post #55
post #42

Earlier quoted context omitted.

you can get multiple cursors with this plugin (works better than I expected) https://github.com/terryma/vim-multiple-cursors

It works, and definitely better than other tries, but it's not even close to Sublime Text's caliber. Through no fault of the author, I assure you, as someone who's tried his hand at creating a similar plugin for vim and found many limitations of vim. One easy limitation comes to mind - you can't copy-paste different cursors, then paste them as unique items. E.g., given a list "a, b, c", I want to be able to multi-cur…

Do you have any links to a description of how they should work or should I just use Sublime Text to see a canonical example?

That doesn't sound hard to implement iff you plan for those features from the beginning. I have my own editor hobby project and during my reading I got convinced multiple cursors are great for the reasons you described in your other comment.

I hadn't thought about multi cursor copy/paste so I'm wondering what else I've missed.

Post reply on HN