Hi Nate,
2008/10/7 Nate <[EMAIL PROTECTED]>:
>
> Is there a way that I can map <D-s> to go to normal mode before or
> after MacVim saves the file?
>
> This would save a trip to the ESC key, and would be very handy.
>
> I looked into $VIM/gvimrc for some kind of way to customize the
> mapping for File.Save, but just specifies key=<D-s>
>
> macm File.Save key=<D-s>
I managed to get this working by remapping File.Save in insert mode
only. You can do this by adding the following two lines to your
.gvimrc (make sure there are no linebreaks in that second line):
iunmenu File.Save
imenu <silent> File.Save <Esc>:if expand("%") == ""<Bar>browse confirm
w<Bar>else<Bar>confirm w<Bar>endif<CR>
That did the trick for me.
I'm curious though: why do you need to go into normal mode when you
save the file?
Björn
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_mac" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---