Re: Cursor position insert mode

2010-07-16 Thread d4567
col(".") works ok, but you must stay in Insert mode when checking it. Thank you very much for pointing this out! This was indeed the error. Now, I was able to finally get VIM to paste the clipboard as I like it, pasting always at the cursor position, and leaving always the cursor after the pa

Cursor position insert mode

2010-07-16 Thread d4567
Hello, in my script which is called while the user is in insert mode, I'd like to detect if the cursor is after the last character on the current line. I tried col(".") but it returns the same number regardless of whether the insert-mode-cursor is before or after the last character on the lin

Re: Shortcuts for Save File

2010-07-08 Thread d4567
use imap :w Thank you very much, that did the trick! Best regards, MD. -- 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

Re: Shortcuts for Save File

2010-07-08 Thread d4567
I never used gvim. But imap :wi doesn't work? It moves the cursor one character to the left after the save. On save, this doesn't matter that much, but when I try to define a paste shortcut like imap "+gpi then it works well in the middle of the line, but when pasting at the end of a l

Shortcuts for Save File

2010-07-08 Thread d4567
Hello, I face trouble at the moment defining a proper shortcut to save my file. I use: imap :wa map :w which does save the file, but it also moves the cursor as a side effect. This is especially annoying when I want to define shortcuts for copy n paste, too. How can I define a shortcut th