tag:blogger.com,1999:blog-6637736252081011583.post276367138029667130..comments2023-10-23T11:13:47.199-07:00Comments on Daily Vim: Text Editor Tips, Tricks, Tutorials, and HOWTOs: i_Ctrl-OTravis Whittonhttp://www.blogger.com/profile/14592647486468034166noreply@blogger.comBlogger7125tag:blogger.com,1999:blog-6637736252081011583.post-2818847289096487402009-06-19T14:57:35.685-07:002009-06-19T14:57:35.685-07:00Maybe I'm weird, but I have the opposite probl...Maybe I'm weird, but I have the opposite problem. I want things like arrow keys and mouse clicks to leave insert mode...<br /><br />I've inoremapped Left, Up, Right, Down, LeftMouse, MouseDown, and MouseUp to basically append an escape. Can't post the commands here because of the apparent html...Tomhttps://www.blogger.com/profile/09772812186846224617noreply@blogger.comtag:blogger.com,1999:blog-6637736252081011583.post-6219877435951427292009-04-20T11:59:00.000-07:002009-04-20T11:59:00.000-07:00(From Derek Wyatt - can't remember my blogger pass...(From Derek Wyatt - can't remember my blogger password at the moment)<br /><br />I beg to differ on "i" vs "a" :)<br /><br />Go on to a line with a bunch of words on it. You want to delete the next three words and continue to insert. e.g. you're on the 'l' in 'line':<br /><br />This is a line with some words<br /><br />Now type CTRL-O3dw. You're now on the "w" in words and are inserting. The equivalent of that is using ESC3dwi, not ESC3dwa.<br /><br />The "i" was just to indicate that you went back to insert mode. Whether you would use "a" or "i" is a matter of what you're doing, not an absolute.<br /><br />I feel much better now :)Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6637736252081011583.post-74991087991895643552009-04-16T13:40:00.000-07:002009-04-16T13:40:00.000-07:00Thanks for this. I always hoped to find a method ...Thanks for this. I always hoped to find a method for one-off commands. Now I just have to train my fingers to do it instead of EscAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-6637736252081011583.post-75021674369180253182009-04-15T22:36:00.000-07:002009-04-15T22:36:00.000-07:00> Except that using <Esc>...i
> will m...> Except that using <Esc>...i<br />> will move the cursor.<br />> It should be <Esc>...a instead.<br /><br />Both <Esc>i or <Esc>a can move the cursor when in INSERT mode:<br /><br /><Esc>i moves the cursor backward when not in the first column.<br /><br /><Esc>a moves the cursor forward when in the first column.<br /><br />I tend to use <C-o> in mappings but not so much interactively. For example:<br /><br /> map <F3> :set number!<CR>:set number?<CR><br />imap <F3> <C-O>:set number!<CR><C-O>:set number?<CR>dominikohttp://dominiko.livejournal.comnoreply@blogger.comtag:blogger.com,1999:blog-6637736252081011583.post-76687836220960641042009-04-15T12:15:00.000-07:002009-04-15T12:15:00.000-07:00That's awesome !That's awesome !pyrhohttps://www.blogger.com/profile/12357965451974548247noreply@blogger.comtag:blogger.com,1999:blog-6637736252081011583.post-794175385875180322009-04-15T10:49:00.000-07:002009-04-15T10:49:00.000-07:00Good point... fixing.Good point... fixing.Travis Whittonhttps://www.blogger.com/profile/14592647486468034166noreply@blogger.comtag:blogger.com,1999:blog-6637736252081011583.post-62251293158272418522009-04-15T10:47:00.000-07:002009-04-15T10:47:00.000-07:00Except that using <Esc>...i will move the cu...Except that using <Esc>...i will move the cursor. It should be <Esc>...a instead.graywhhttps://www.blogger.com/profile/14008240961525657558noreply@blogger.com