3 ms·
> [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 th
by gkya 13y ago
> [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.
- bdamm 13y agoMy .vimrc used to be large, but now has dwindled down to a handful of simple commands. I've simply adapted to be maximally productive in a nearly pure vim environment. Does this make me less of a vim user?
- gkya 13y agoIt rather makes you more of a vim user. My vimrc file contains mostly leader mappings and option settings, added mostly with a craze of customising.
- edanm 13y ago"This may only show that you grok VimScript way of thinking, not Vim way of thinking." True enough that it doesn't prove anything. "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." I know. And if you think this process is easier, faster, or saves keystrokes over using multiple cursors, then I think you're wrong. "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." No no no! That's the beauty of using multiple cursors in vim. You can have (potentially) multiple cursors in Normal Mode, and use all the normal vim commands. That's what makes it so sad that it doesn't have multiple cursors, because if you can merge the power of multiple cursors with the power of vim, you get something amazing. Imagine having the following: <pre> <div>some text</div> <div>Some other text</div> <div>Third</div> </pre> Then imagine you want to, for some reason, copy-paste the contents of the different divs into (say) another buffer. With multiple cursors, you can select the three lines, use the vim commands to yank the text object that's in between the divs (yit), and then paste it elsewhere. This is not possible in Sublime Text, since it has no way of saying "select text between divs". Or even, doesn't have vim's "f" command so one could jump to the "<" character opening the second div.
- gkya 13y agoWell, I can copy the divs over, then run ":'<'>s/<\/\?div>//g". Or, if the divs were aligned nicely, I'd copy the divs except for the opening tags via block selection, then on the result of pasting, I'd run ":'<'>s/.\{6\}$//". The difference with the multiple-cursors way and the Vim way is that, the above regexps can be used, without modification, on ranges of variable amounts of lines, whereas, the multiple-cursor way is not as flexible to get adapted to handle variable amount of lines as far as I can imagine. Vim poses a way to edit text; Sublime, Emacs and other modeless editors pose another. One enables neat tricks via a very nuanced and powerful editing language, that is Vim verbs, text objects et cetera, and the rest do not provide such mechanism, in favour of simplicity and ease of use (it is easier to start typing in Emacs than Vim, whereas it is easier to do editing in Vim than Emacs, but only for the knowledgeable user). Do not get me wrong, I am not thinking multiple-cursor-editing is useless; in fact, I use it quite a lot in Emacs[1], and I like how it indeed helps me do my multi-line editing with instant feedback. My argument is that such editing has little to offer to a user that has spent a month-or-so to master Vim. [1]: https://github.com/magnars/multiple-cursors.el https://github.com/magnars/multiple-cursors.el