Pan Ruochen
Pan Ruochen

Reputation: 2070

what does <C-\>^] mean in vim mapping?

Says in the gtags tutorials: Suggested map:

    map <C-\>^] :GtagsCursor<CR>

Though the mapping of :GtagsCursor to ^] seems suitable, it will bring an
inconvenience in the help screen. 

I guess ^] should mean CTRL-], but cannot find explicit descriptions about it in the chapter "key-mapping". Another question is if ^] is CTRL-], why use ^] here?

Upvotes: 0

Views: 3297

Answers (1)

Ingo Karkat
Ingo Karkat

Reputation: 172510

This is indeed inconsistent, and would be more understandable as :map <C-\><C-]>. In Vim (as well as in terminals), the combination of [ + Key stands for the single <C-Key>. You'd enter this via <C-V><C-]>, not as the two characters ^ and ].

The mapping suggests the combination of Ctrl with two keys because <C-]> by itself is already taken for keyword jumps.

Upvotes: 1

Related Questions