I'm having problems with using the backtick ` character to move to
marks. If I do ma to set a mark into 'a' and then do 'a (a single
quote not a backtick) everything works and the cursor is moved to the
first non-blank on the marked line. However if I try `a I get an error
saying "E78: Unknown mark". What am I missing?
Thanks,
Martin
Hmm. Usually you get 'E20: Mark not set' when a mark is not set, and
your error message if you use some character which actually cannot be a
mark. So that suggests you are not actually typing a after the backtick,
but somehow typing some other letter/symbol. Have you accidentally
neglected to release a shift key, or is your keyboard layout treating `
as a dead key and producing an accented character or something?
Ben.
I do think that's the problem. But I have no idea how to solve it. CCing the
mailing list again so somebody else can help.
It would probably help to know a bit more about your setup (operating system,
windo manager, etc.).
Ben.
Ben Schmidt wrote:
> On 13/04/11 8:50 PM, Martin Lundberg wrote:
>> On Wed, Apr 13, 2011 at 9:24 AM, Ben Schmidt
>> <mail_ben...@yahoo.com.au> wrote:
>>>
>>> Hmm. Usually you get 'E20: Mark not set' when a mark is not set, and
>>> your error message if you use some character which actually cannot be a
>>> mark. So that suggests you are not actually typing a after the backtick,
>>> but somehow typing some other letter/symbol. Have you accidentally
>>> neglected to release a shift key, or is your keyboard layout treating `
>>> as a dead key and producing an accented character or something?
>>>
>>> Ben.
>>
>> When I type ` it waits for me to enter another key for example a to
>> create �. So maybe when I hit ` vim waits for another key and when I
>> hit a it gets � which is not a valid mark. If so is the case, how
>> would I solve it?
>
> I do think that's the problem. But I have no idea how to solve it. CCing the
> mailing list again so somebody else can help.
maybe a simple solution is enough
:nmap � `a
:nmap � `e
:nmap � `i
:nmap � `o
:nmap � `u
Regards,
J�rgen
--
Sometimes I think the surest sign that intelligent life exists elsewhere
in the universe is that none of it has tried to contact us. (Calvin)
If Vim received the single � character (SMALL LATIN LETTER A WITH GRAVE)
it wouldn't even know that a mark was asked for. The fact that the error
is about a mark shows that Vim received either an apostrophe or a
backtick; it's what comes just after that which wasn't the "name" of a
mark. If you are on a unix-like OS, are backticks recognized when Vim
sends them to the shell? For instance
:!ls -l `which vim`
should display the directory entry for your Vim executable.
Or, in Insert mode, do you know how to type `a as two characters
(backtick followed by lowercase latin a) with nothing in between? If you
do, the exact same keystrokes in Normal mode ought to bring you to mark a.
On my Belgian keyboard, the key I use to produce a backtick (AltGr with
�) is also a dead key: nothing is displayed immediately, if I type o
immediately afterwards I get �, if I want a backtick instead I have to
use AltGr-� followed by space (or followed by itself but that's slower).
Best regards,
Tony.
--
hundred-and-one symptoms of being an internet addict:
54. You start tilting your head sideways to smile.
Maybe; but not if you happen to use Vim to type French, Italian,
Catalan, or any language using grave-accented Latin letters as a matter
of course.
Best regards,
Tony.
--
The church is near but the road is icy; the bar is far away but I will
walk carefully.
-- Russian Proverb
Of course, this is unlikely to go wrong, since, as far as I know, there
is no w grave character.
I guess that thought gives something else to test in Vim. Do marks with
non-vowels work after the backtick. If so, that is perhaps further
evidence that this is indeed the problem.
(Like Tony, I think it's a bit odd that typing `a would produce
something like `� which is somewhat what I suggested earlier, as it does
appear Vim is receiving the backquote. But I think the fact that `a
produces � is enough to strongly suggest the problem is related to
this.)
Ben.
I don't think you would regularly use those characters in normal mode,
would you, even if using those languages? I certainly don't when I type
French!
Ben.
oops, sorry, :nmap -- and yet I know that "Vim is a modal editor"!
You're right.
Best regards,
Tony.
--
It has just been discovered that research causes cancer in rats.
If hitting the dead-key twice produces the backtick, then inadvertently
hitting it three times, or long enough to trigger the keyboard repeat
mechanism, might produce `� when followed by a. So maybe the OP should
just be extra careful to release the ` dead key quickly after each
press? Or hit ` <Space> rather than ` ` in order to produce the
spacing-grave (backtick) character?
Best regards,
Tony.
--
hundred-and-one symptoms of being an internet addict:
55. You ask your doctor to implant a gig in your brain.