Live data from Hacker News

Show HN: Subvim – Vim customized to be like SublimeText

github.com

31–40 of 68 posts

Re: Show HN: Subvim – Vim customized to be like SublimeText

#31
post #6
post #4

The most awesome feature of SublimeText for me is multiple-cursor editing (Ctrl-D on a word). It only bothers me when I can't skip next occurrences easily (It's possible, but it's hard) It surprises me how users of other major editors don't use multiple cursors in their day to day editing tasks. It'd be awesome if subvim included the best solution vim community has to offer in this regard.

Vim has block editing mode (ctrl v - select, shift i, write text, esc) and the ability to record macros. With those two features you can do everything multiple cursors does and more!

have a look at https://github.com/paradigm/vim-multicursor

Re: Show HN: Subvim – Vim customized to be like SublimeText

#32

Seriously why do we need this?

Because we can do it.

I understand the saying "just because you can do something, doesn't mean you should", but really, we do anything because it can be done (or someone said it couldn't be and we had to prove them wrong). Within sane limits, it's amusing, without sane limits...

Meanwhile, I'm enjoying my life living away from a cave thanks to this same delightful aspect of human nature.

Re: Show HN: Subvim – Vim customized to be like SublimeText

#33

I have got to ask the obvious here, why not just switch?

Because i love Vim :) Then there was Sublime that really changed the way of editing in some way. I first tried vintage and make it vim-like. However it was slow and not much was I wanted. Thus finally creates this project. For Vim users who like Sublime.

Re: Show HN: Subvim – Vim customized to be like SublimeText

#35
post #9

Earlier quoted context omitted.

I rarely use global find and replace nowadays (just for complex regex replaces). I hold Ctrl-D until all occurrences are selected and type the replacement string (assuming occurrences are low in quantity, which they usually are in most cases).

visual selection replacement is good too. :' s/this/to that/g I think vim does that automatically when you have a selection active and hit :

Note that this will replace over the entirely lines even if it's a blockwise selection.

So you might consider using :'s/\%Vthis/to that/g

Re: Show HN: Subvim – Vim customized to be like SublimeText

#37
post #4

The most awesome feature of SublimeText for me is multiple-cursor editing (Ctrl-D on a word). It only bothers me when I can't skip next occurrences easily (It's possible, but it's hard) It surprises me how users of other major editors don't use multiple cursors in their day to day editing tasks. It'd be awesome if subvim included the best solution vim community has to offer in this regard.

Multiple-cursors are just a syntactic sugar for macros. s/syntactic/visual/

Multiple cursors simulate not just macros, but also setting lots of marks and iterating the macros through them. It’s relatively easy to write an equivalent macro if you’re just placing a cursor every three lines or at every occurence of some string; you can have the macro move three lines down when it’s done, or search for the next occurence of some regex. But if you’re actually clicking on places in the code that only a human can identify need changing, then it’s much harder to write an equivalent macro.

Re: Show HN: Subvim – Vim customized to be like SublimeText

#38
post #5
post #4

The most awesome feature of SublimeText for me is multiple-cursor editing (Ctrl-D on a word). It only bothers me when I can't skip next occurrences easily (It's possible, but it's hard) It surprises me how users of other major editors don't use multiple cursors in their day to day editing tasks. It'd be awesome if subvim included the best solution vim community has to offer in this regard.

Pressing Ctrl-K,D to skip an entry is quite cumbersome, especially if you missed an entry and there is no way of undoing the last selection.

Cloud9 have a nice solution for that, ctrl-alt-left/right to select next previous and same with shift to not keep last added selection. This way you can even skip some words in the middle. I've tried to make a plugin for this, but sublime doesn't keep the order in which ranges were added.

Re: Show HN: Subvim – Vim customized to be like SublimeText

#40
post #4

The most awesome feature of SublimeText for me is multiple-cursor editing (Ctrl-D on a word). It only bothers me when I can't skip next occurrences easily (It's possible, but it's hard) It surprises me how users of other major editors don't use multiple cursors in their day to day editing tasks. It'd be awesome if subvim included the best solution vim community has to offer in this regard.

Command + K skips the most recently highlighted occurrence. Usually works for me.
Post reply on HN