Live data from Hacker News

Show HN: Subvim – Vim customized to be like SublimeText

github.com

11–20 of 68 posts

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

#11
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/

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

#12
post #9

Earlier quoted context omitted.

Just tried C-D on my rarely used Sublime Text, but I'm not sure if I'd personally prefer that over something like `:%s/one/two/gc`.

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 :

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

#13
post #9

Earlier quoted context omitted.

Just tried C-D on my rarely used Sublime Text, but I'm not sure if I'd personally prefer that over something like `:%s/one/two/gc`.

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).

You know crt + H (global find and replace) takes what's highlighted and uses the last thing you looked for it nothing is highlighted.

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

#14
post #9

Earlier quoted context omitted.

Just tried C-D on my rarely used Sublime Text, but I'm not sure if I'd personally prefer that over something like `:%s/one/two/gc`.

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).

That sounds like a lot more work...

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

#15
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!

I love vim but I don't think that block editing mode does what they want to do quite as well. Do you have an example where they excluded a line or lines from block editing?

an example:

   class="item"
   class="item"
   class="item" 
   class="item"
st2 would be able to select the second and fourth line item and be able to change those to "item odd" without touching the first and the third ones. similarly they could do the same and add even to the other two.

   class="item"
   class="item odd"
   class="item" 
   class="item odd"
this blog post shows it in action:

http://www.sublimetext.com/blog/articles/sublime-text-2-0-re...

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

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

No editor wars intended, but for someone interested: multiple cursors for Emacs: https://github.com/emacsmirror/multiple-cursors

Do watch the video linked to on this page!

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

#17
post #6

Earlier quoted context omitted.

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!

I love vim but I don't think that block editing mode does what they want to do quite as well. Do you have an example where they excluded a line or lines from block editing? an example: class="item" class="item" class="item" class="item" st2 would be able to select the second and fourth line item and be able to change those to "item odd" without touching the first and the third ones. similarly they could do the same a…

I'm probably being very defensive but I use macros for this.

qa$i odd^[jjq

and then '4@a' to run it on all the lines. In a simple case like this is it a bit more complicated than something like multiword editing but I've used this technique in cases that are far more complex then what from my understanding, multiline editing can handle.

For example I turned a spreadsheet of data into a complicated dhcpd.conf file using a couple macros.

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

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

Ctrl/Cmd-U is a "soft undo" that undoes your last selection. I agree that Cmd-K,D isn't ideal, but that, combined with Cmd-U works perfectly.

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

#19
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).

That sounds like a lot more work...

No it's not! Plus, you'd get to see the replacement targets while you're holding the keys, so you'd be more confident about the final result.

Just give Ctrl-D a try for a couple of days.. It's a total different user experience compared to the traditional find/replace method.

Post reply on HN