On 10/04/09 17:29, Kenneth R. Beesley wrote: > > You can reference it. > > If you have a keymap file named russian-jcukewin.vim, and you want to > make an alias (e.g. named just 'russ') for it, > create russ.vim (also residing in ~/.vim/keymap/ ) and put the > following line of text in russ.vim > > source<sfile>:p:h/russian-jcukewin.vim > > > Then, from vim, you can invoke either > > :set keymap=russian-jcukewin > or > :set keymap=russ > > with identical results. > > *** > > To make a new keymap that is only a slight variation of another > existing one, > include the 'source' line, as shown above, to indicate the existing > base keymap > then add your changes and/or additions after the source statement. > > Note that in a keymap file, if you indicate a particular > > inputSequence outputSequence > > twice, the second will override the first.
Similarly, if (before the :loadkeymap line but after the :source or :runtime line) you have a new ":let b:keymap_name = <something>", it will override the first, which will allow you to see the difference on the statusline when one or the other is active. You would then have " Keymap foobar (based on foo) " Maintainer: John Doe <john...@example.net> " Last Change: 36 February 3025 runtime keymap/foo.vim let b:keymap_name = "foobar" loadkeymap " add changes and additions here, " in keymap format: {lhs} {rhs} [comment] " {lhs} and {rhs} as in mappings, except that the {lhs} cannot start " with a double-quote, and the {rhs} cannot end in whitespace (in both " cases, unless <> format etc. is used). etc. Best regards, Tony. -- It is too bad that the speed of light hasn't kept pace with the changes in CPU speed and network bandwidth. -- <wie...@porcupine.org> --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---