Meino Christian Cramer wrote:
From: Mikolaj Machowski <[EMAIL PROTECTED]>
Subject: Re: Mapping of keysequences...
Date: Sun, 1 Oct 2006 15:09:56 +0200
Dnia niedziela, 1 października 2006 14:54, Meino Christian Cramer napisał:
Hi,
is it possible to map the sequence of
<C-C><C-F>b
to anything (and how?)?
I tried as a first brute-force experiment
noremap <C-C><C-F>b echo "works"
If you want to print it in the buffer it should be::
noremap <C-C><C-F>b iecho "works"
If you want to echo it in command line::
noremap <C-C><C-F>b :echo "works"
Normal mode mappings begin in Normal mode, not Insert or Command-Line.
m.
Hmmmppff....I got a problem here...
What I want is to insert the string "{\bf }" (TeX!) in a buffer. It
should work in insert mode. I want to press <C-C><C-F>b in insert mode
and it should print "{\bf }" at the place where currently the cursor
is.
I did
inoremap <C-C><C-F>b iecho "{\bf }"
. And guess what happens? It prints "iecho {\bf }" into the buffer!
When using 'noremap' instead of 'inoremap' nothing happens.
:he iecho
gives me simply nothing. Is there any needle in the haystack I can
search for?
Keep hacking!
mcc
If you are already in Insert mode, the right-hand side of the mapping is used
as if you had typed it. To insert left-brace backslash bee eff space
right-brace, use
:inoremap <C-C><C-F>b {\bf }
To do the same from Normal mode, use
:noremap <C-D><C-F>b i{\bf }<Esc>
with i to enter Insert mode and <Esc> to leave it.
Best regards,
Tony.