Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
Could you put both your .vimrc and the output of :verbose imap in a pastebin (see and link it here? – frabjous Nov 1 '10 at 4:30 - .vimrc – Dananjaya Nov 1 '10 at 12:23
:verbose imap - No mapping found – Dananjaya Nov 1 '10 at 12:27
Could you please include that pastebin content in the question? We want questions to not depend on external pastes that will inevitably die. – Roger Pate Nov 1 '10 at 16:03
up vote 6 down vote accepted

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
share|improve this answer
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/ – user9464 Jan 23 '11 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
share|improve this answer

This might help you:

share|improve this answer
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. – Dananjaya Nov 1 '10 at 3:55
I don't know much about this. I just pointed you to a resource. Maybe you should ask this on StackOverflow. – User Nov 1 '10 at 4:04 might help you too. – User Nov 1 '10 at 4:07
Thank you for your pointers.. – Dananjaya Nov 1 '10 at 12:17

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.