Show HN: Subvim – Vim customized to be like SublimeText
21–30 of 68 posts
Re: Show HN: Subvim – Vim customized to be like SublimeText
#22Earlier 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…
/item (search for 'item')
cwitem odd^C (replace with the new text)
nn.nn.nn. (next occurrence, next occurrence, repeat last command)Re: Show HN: Subvim – Vim customized to be like SublimeText
#23Earlier 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…
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 usi…
Re: Show HN: Subvim – Vim customized to be like SublimeText
#24Earlier 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…
Re: Show HN: Subvim – Vim customized to be like SublimeText
#25Earlier 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...
Re: Show HN: Subvim – Vim customized to be like SublimeText
#26Earlier 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…
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 usi…
Re: Show HN: Subvim – Vim customized to be like SublimeText
#27slightly off topic, but I think a thing that is sorely needed is a kind of libvim that provides proper vim functionality, which can then be linke
Re: Show HN: Subvim – Vim customized to be like SublimeText
#28Re: Show HN: Subvim – Vim customized to be like SublimeText
#29Earlier 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).
Re: Show HN: Subvim – Vim customized to be like SublimeText
#30Earlier 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…
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)