Begin forwarded message:
> From: Romeo Van Snick <[email protected]> > Subject: vim cursor movement on InsertLeave > Date: 8 Sep 2011 17:42:51 GMT+02:00 > To: [email protected] > > I use an autocmd to have vim change the cursor of my terminal.app depending > on which mode I'm in. > > eg.: > > autocmd InsertEnter * silent !osascript -e "tell application > \"Terminal\" to set current settings of front window to settings set \"Solid > Colors 2\" > > autocmd InsertLeave * silent !osascript -e "tell application > \"Terminal\" to set current settings of front window to settings set \"Solid > Colors\" > > where Solid Colors and Solid Colors 2 are the Terminal settings set, > respectively with block and with line cursors. > > This seems to work as expected, yet there is one problem: imagine I do the > following sequence of key presses when in normal mode > i <esc> i <esc> i <esc> > one would expect that the one is now in normal mode, and the cursor is still > at the same character it was before. Yet it isn't: it has moved three > characters to the left (as if I had pressed hhh). > > The reason for this is when the InsertEnter auto command triggers, there is > also a cursor movement to the left (h), without me wanting this. > I've tried countering with > autocmd InsertLeave * normal!l > which works for me, but seems like an ugly hack. > > Also the InsertLeave action isn't as snappy when I add the autocmd to it… > > any thoughts? > > I'm working on Lion, yet I had the same problem on Snow Leopard (which, back > then, drove me to MacVim, yet now Terminal supports all colors so I'm giving > it another try). > > I've attached my .vimrc for reference. > > > > greets, > Romeo
-- 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
|
.vimrc
Description: Binary data
