Troydm (?) wrote:

> Well for example one of my plugins includes bash shell emulation
> inside a vim buffer, it's called shellasync.vim and it's source code
> is at https://github.com/troydm/shellasync.vim, it uses InsertEnter to
> check if user went into insert mode while his cursor was on prefix of
> shell e.g. '$' symbol and if it does it just automaticly moves cursor
> on 3rd col instead. For a user of my plugin (atleast for me) this is
> an expected behaviour

You can use the CursorMovedI event instead.  If it's slow you can set a
flag in InsertEnter and only do something in CursorMovedI when it' set.
Hmm, I suppose it doesn't work for the "i" command, the cursor doesn't
move then.  You would have to map it.

-- 
ARTHUR:  No, hang on!  Just answer the five questions ...
GALAHAD: Three questions ...
ARTHUR:  Three questions ...  And we shall watch ... and pray.
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" 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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Raspunde prin e-mail lui