Well, this is not a Ubuntu specific question but here it is anyway. I'm using Vim 7.2 with Ubuntu 10.04. I installed Vim about a day ago using apt-get so it's not the default version you get with the system. Here's the problem, whenever I type text in to a text file in Vim's insert mode the comma character does not appear. No matter how many times I press the comma button it won't display it or add it to the text file. Is there something wrong with the character mapping in Vim? Any suggestions for fixing this?
3 Answers
Your cinkeys setting is malformed:
set cinkeys=0{,0},:,0#,!,!^F
See :help cinkeys-format
for details, but the ! requires something to follow it, which is interpreted as the comma, rather than being an entry of just "!". Because the ! means not to insert the key, the comma is discarded.
Removing the line from your .vimrc (which uses the default value) or removing the rogue exclamation mark item will work:
set cinkeys=0{,0},:,0#,!^F
-
Yes yes yes, the answer with the "cinkeys" solved this problem! You should delete the "!," two chars from your vimrc. set cinkeys=0{,0},:,0#,<b>!,</b>!^F Case Ubuntu 10.10 you can find it here: /etc/vim/– user9464Jan 23, 2011 at 19:46
Well I think I figured it out.. removing the following line at .vimrc file solved the issue
set cinkeys=0{,0},:,0#,!,!^F
This might help you: https://stackoverflow.com/questions/1242026/vim-comma-is-missing-in-insert-mode
-
Typing CTRL-V just after typing comma will insert a comma, but isn't there a much easier way of typing that? I also have a manually created .vimrc file. Nov 1, 2010 at 3:55
-
I don't know much about this. I just pointed you to a resource. Maybe you should ask this on StackOverflow.– UserNov 1, 2010 at 4:04
-
stackoverflow.com/questions/1165603/vim-comma-key-not-working might help you too.– UserNov 1, 2010 at 4:07
:verbose imap
in a pastebin (see pastebin.com) and link it here?