On 11/03/10 09:20, Jorge Timón wrote:
I'm sorry, I think I've typed it wrong.
' ` ´
# 1 Tim's house
# 2 vou à praza (portuguese)
# 3 configuración (spanish)

Then I think it should be:

:nnoremap ´ {
:nnoremap ç }

For now I'll just replace keys that are useless in vim.
Thank you all

The above is a good solution for Normal mode; but if you do some programming in C, C++, CSS, or any other language that uses braces, you'll need to type the { } characters into the text (in Insert mode), and there, of course, you cannot afford to lose non-ASCII characters that may have to be typed, in, for instance, comments to the same code, or even plaintext in a different file.

See :help :map-<buffer> about defining maps for one file only (you would use that in a filetype-plugin or in an autocommand, or at the keyboard); or else, for mappings that may have to exist in all modes I recommend using the Fn and Shift-Fn keys (with the exception of F1 = Help and possibly F10 = Menu) as the {lhs}. Ctrl-Fn keystrokes aren't as portable across platforms, they may perhaps be used on Windows but they aren't a good choice for Linux or even for double-boot, because there they won't always reach Vim. As for Alt-Fn, IIRC even Windows snatches it for "window management" and other actions without passing them to the application.

If you need really many mappings you can start using multikey {lhs}es, where the initial key would be a kind of "prefix" and the rest can even be keys that Vim uses -- when the prefix key isn't before them. You could for instance use

        :map!   ç(      {
        :map!   ç)      }

for Insert and Command-line modes (and without the exclamation mark for Normal, Visual and Operator-Pending), and ç will still be a c-cedilla when followed by, for instance, a vowel (but you won't see it appear in your text until you type the next letter, or until 'timeoutlen' (q.v.) milliseconds if you don't type anything after the ç key). You can even map! çç to ç if you're impatient. ;-)


Best regards,
Tony.
--
"Honesty is the best policy, but insanity is a better defense"

--
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

To unsubscribe, reply using "remove me" as the subject.

Reply via email to