Bram Moolenaar wrote:

>Charles Campbell wrote:
>
>  
>
>>I'd like to do
>>
>>   imap ... = ...=<c-o>:something<cr>
>>
>>however, "." no longer repeats the small change.   For example:
>>
>> imap = =<c-o>:echo "hello!"<cr>
>>
>>work with the following file contents:
>>
>>abc;
>>def;
>>
>>Place cursor on the semicolon with "abc;" -- insert
>>  =2
>>
>>Now put the cursor on the semicolon with "def;" and press "." .
>>All you get is
>>
>>def 2;
>>
>>Now, if there was a dotjoin:
>>
>>imap = =<c-o>:dotjoin<bar>echo "hello!"<cr>
>>
>>just might work!
>>    
>>
>
>How about using CTRL-G CTRL-O for going to Normal mode without breaking
>the current Insert in two?  It would only work when the cursor didn't
>move and the text isn't changed.
>
>  
>
Antony Scriven suggested using ctrl-r=   and that seemed to do the trick 
for me.  My application
is my AutoAlign plugin; the first insert of =something doesn't change 
the text any (AutoAlign
does save the position, however, to align subsequent lines against).  
However, when I am simply
inserting things (often =0 or =NULL to declarations), the call to 
AutoAlign, even though it wasn't
changing the text, meant that the "." change wasn't working.  (I now 
have AutoAlign returning
an empty string).

So, unless I find a problem with ctrl-r= the ctrl-g ctrl-o combo will be 
academic for me.  Still, it does
seem like there should be something to do that, so I still think its a 
Good Idea!

Regards,
Chip Campbell



--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui