Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vim comma key not working

Tags:

vim

This is driving me batty. Using Vim 7.2.182 on Gentoo. In insert mode, my comma key does nothing. There's nothing in .vimrc that includes the comma key. :map shows no mapping that includes a comma. It's not a keyboard or similar issue: the comma key works fine in all other applications and in Vim in command mode, etc. But when I go into Insert mode, pressing the key does nothing at all. I've even tried explicitly mapping the comma key to a comma but that appears to have no effect. Google searches have proved fruitless. Any clues?

like image 709
user142865 Avatar asked Jul 22 '09 14:07

user142865


2 Answers

Solved. Somehow or another, I had:

set cinkeys=0{,0},:,!,0#,!^F

in my .vimrc. Removing the !, fixed the issue.

like image 102
user142865 Avatar answered Nov 10 '22 05:11

user142865


One helpful pointer for similar problems:

Starting vim like this

vim -u NONE

disables the reading of the .vimrc, environment variables and plugins. See :help -u

This way you can make sure that no configuration of your own is the problem.

Afterwards try with an empty .vimrc file. If the problem persists, it should be in a plugin. If not, it's in your .vimrc. So try a "binary search" in the .vimrc file by commenting out the first half of it. If the problem appears, it's in the first half of your .vimrc, otherwise in the second half. Continue with commenting out half of the "harmful" half and so on ...

like image 4
Blixtor Avatar answered Nov 10 '22 05:11

Blixtor