4

I have a chromebook that I've modified to run Arch Linux on. I have a 'search' key just under the tab key that I'd like to map as autocomplete when in insert mode. xev tells me the value of the key is XF86Search. However this doesn't seem to be working:

#.vimrc

inoremap <XF86Search> <c-n> mapmode-i$

How can I make this mapping with an XF86 key?

edit: In fact, using AutoComplPop from this answer proved to be a better solution, but Ingo pointed me in the right direction. This question on superuser discusses remapping keys for vim and/or terminal using xmodmap and that's the way I would have had to go.

Community
  • 1
  • 1
dax
  • 10,779
  • 8
  • 51
  • 86

1 Answers1

2

In insert or command-line mode, try typing the search key (maybe preceded by <C-V> for literal input). If nothing happens / is inserted, you cannot use that key combination directly in Vim. You would have to remap it outside to some unused key (e.g. <F13>) that is supported by Vim. Else, just insert the key literally into your .vimrc mapping definition, without the special <...> key notation.

Ingo Karkat
  • 167,457
  • 16
  • 250
  • 324