On Sun, Aug 5, 2012 at 9:12 AM, Asis Hallab <asis.hallab@gmail.com> wrote:
> Dear Vimers,
>
> I just watched a screencast about Submile Text 2, a much buzzed about new
> text editor.
> It has a very neat feature called multiple cursors, where the user just
> selects different positions in the current buffer and every editing done is
> applied to those multiple cursor positions.
> http://www.youtube.com/watch?v=o5bPRhFHEz0
>
> In some cases I am convinced this feature is easier and quicker to use than
> macros.
> In a way the visual block mode does what multiple cursors do. Only they do
> more..
>
> I have to say, there is already an emacs plugin for multiple cursor support:
> https://github.com/emacsmirror/multiple-cursors
>
> So now my question:
> Could this be implemented as a plugin for vim?
> Could that be written in VimL or needed to be compiled into Vim itself?
>
> Looking forward to your ideas.
>
> Cheers!
> Asis
As you can imagine, this doesn't exist already. I can envision a
plugin that can do this, though, for the most part. A few questions:
1. Is one of those marked locations considered the primary one (you
can only type in that one and have it copy) or are all of those open
for editing with mirroring?
2. What happens if you start typing on another line that's not part of
the marked cursors? Do the cursor lines move down as you press enter,
etc., or do they get reset if you start typing elsewhere?
3. Is the entire line considered "cursored" or is it specific to the
actual column? For example, line 3, column 2 and line 10, column 5 or
just lines 3 and 10, in their entirety?
To get a plugin:
1. Need a way to mark multiple locations in the file as "cursor"
locations; I envision the use of placed signs to indicate this.
2. One can either map all keys that change the buffer in insert mode
and apply changes to all the other marked spots with each keypress
(non-trivial) or, instead, observe that insert mode was entered on one
of the marked lines and then wait until exit and then go to each of
the other cursor locations just repeat (the equivalent of hitting .).
3. From what I understand, Sublime and Emacs are, compared to Vim,
modeless: in Vim, you could enter insert mode by typing R, s, i, a,
cw, etc. That'd be pretty hard to pick up on and duplicate, unless you
go with the "wait till end and then just hit . on the marked
locations" bit.
Just a quick think; I'm sure there are many facets I'm missing here.
--
سلمان حلیم
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
Sunday, August 5, 2012
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment