On Aug 15, 1:30 pm, Tony Mechelynck <[email protected]> wrote: > > In Latin1, a-acute is 225, not 255; a-tilde is 227, not 277; other than > that: > > - as Ben said, Vim comments start with a double-quote, not a # mark, and > shouldn't be put after a mapping with whitespace betwwen > - again as Ben said, if the 'fileencoding' of your vimrc is different > from the 'encoding' used by Vim, it should have a :scriptencoding > statement near the top, see :help :scriptencoding > - to represent characters in a mapping by their decimal value, use > <Char-nnn> notation, see :help <Char> > > So either of the following ought to work, assuming that (if needed) the > appropriate :scriptencoding statement is present earlier (maybe much > earlier): > > " ; o to o > imap ;<Char-225>o <Char-231><Char-227>o > > or even just > imap ; o o >
I assume the problem with your second imap is just that weird google groups email interface encoding issue that keeps popping up, and it directly maps the special characters. I want to be sure I understand the <Char> notation. Here's how I think it works: • <Char> notation specifies the character by its numeric value in the current 'encoding', as in nr2char() • Thus, using the <Char> notation in a mapping allows you to map specific charaters in the 'encoding' even if the .vimrc is saved with a different 'fileencoding' • Thus, if using <Char>, no :scriptencoding statement is required • However, if using the direct mapping you give as an alternative, either the 'fileencoding' of the .vimrc must equal the 'encoding' of Vim, or :scriptencoding must be used to specify the proper 'fileencoding' Is this all correct? Am I missing some subtlety? -- 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
