On 09/09/08 14:29, Ron Aaron wrote:
> My sessionoptions is:
>
>       set
> sessionoptions=winsize,winpos,resize,globals,buffers,slash,localoptions,folds,tabpages,unix
>
> I have a buffer with a mapping :
>
>          map<buffer>  ,h :call FlipHeader()<cr>
>
> This is saved to the session as:
>
>           map<buffer>  ,h :call FlipHeader() ^V^M
>
> And when the session file is re-read, the map is:
>
>         map<buffer>  ,h :call FlipHeader()<nl>setlocal keymap=
>
> Note that the "<cr>" became"<nl>", and  then vim read the next line
> of the session file "setlocal keymap=" as if it were part of the
> mapping.
>
> What am I doing wrong here?
> Thanks!

I don't know. Which OS are you on? Here on Linux, I have a number of 
mappings, including some ending in <CR>, they are saved as ^V^M and 
restored correctly.

Oh, an idea: are you using mswin.vim? It remaps Ctrl-V to some pasting 
command. Try removing from your vimrc the line which invokes mswin.vim. 
Of course this will disable the Windows-like mappings to Ctrl-C, Ctrl-X, 
Ctrl-V, Ctrl-Z, etc. The Edit=>Cut, Edit=>Copy, Edit=>Paste, Edit=>Undo 
(etc.) menus will still work, as will the "classical Vim" commands to 
access the clipboard as register plus, to undo by means of the u 
command, etc.

If this is the cause, it may be a bug, but where? Maybe in the fact that 
you use :map (rather than :noremap) and also mswin.vim _and_ mksession.


Best regards,
Tony.
-- 
hundred-and-one symptoms of being an internet addict:
168. You have your own domain name.

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

Raspunde prin e-mail lui