Live data from Hacker News

Show HN: Subvim – Vim customized to be like SublimeText

github.com

41–50 of 68 posts

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

#44
post #30

Earlier quoted context omitted.

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…

This would be easily done by recording a macro and replaying it numlines/2-1 times. Possibly if starting on the first line: q,a,j,$,i, odd,esc,j,q,4@a qa // start recording into 'a' register j // move down $ // move last char on line i // insert mode odd // esc // back to command mode j // move down 4@a // replay macro 4 times (if there are 8 more lines)

Yep, using macros are the way to go for a task like this one. I'd use 'A' here to jump into the insert mode at the end of line though (commenting because '$i' part made me realize that I had probably never used '$' for movement at all).

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

#48
post #7

This seems rad, my only 2cents is that using modifier keys is not very vimmy. But altogether really cool. Nice work.

The whole point is for people who want to switch from ST to Vim or for people who used to use VIM, but loves ST. There are still cases that should be handled trough. But I will add an entry to the FAQ, that explains the target user. This is IMO not for everybody.

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

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

Ctrl+cmd+g is cmd+d for all occurrences on the page.

[deleted]

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

#50

Wonder how this compares to SPF13, which I've been using lately. https://github.com/spf13/spf13-vim

OP here. SPF13 itself is really nice. But the main difference here is first I try to emulate ST2, second I'm really picky which plugins are integrated. I also don't use vundle (because It should always have the same feature regardless of the state of plugin), instead of I'm using pathogen (which I like more). With time I will update the plugins myself, but only if they have bugfixes or features that are necessary to be added.

Some of plugins (like ctrlp) is modified in order to use the ctags binary I'm bundling and installing. There is also pre-compiled version of YCM in subvim. Together it means autocompletion and goto features are really working. You really don't install anything.

The plugins settings are modified in order to emulate ST2 like behavior, like accepting autocomplete entry via enter, creating a newline after braces,quotes,etc.., opening a new tabs whenever you call cmd+p (but not if you call cmd+r for using goto), closing the application and starting again brings all you tabs/files again and so on..

They are many things I'm trying to improve, like adding snippet system, more improved installation procedure, multiplatform support (linux and windows). SPF13 is much better on these terms.

I hope with time it will get better :)

Post reply on HN