Search code examples
vimvim-plugin

Remapping Ctrl-l in vim works in my personal setup, but not my work setup. How do I make it work in my work environment?


In my personal configuration files I have the following mapping:

nnoremap <silent> <C-l> :nohlsearch<CR><C-l>

See the actual content here.

This setup works fine in my personal setup, but not my work environment. My personal systems have version 8.0+, but my work systems have 7.4. I can't show my work environment, but it's a file copy with all the cruft and unusable mappings removed. Other mappings are working fine.

I got this idea from a previous StackOverflow question, and it's been a minimum of 6 years, so I don't think it's a version issue. But I can't think of what else it might be.

How can I track this down and fix it?


Solution

  • When having this kind of trouble, the first thing you should do is check the output of ':map '.

    In this case there was a later mapping. Remapping my setup made things work as expected.