0

//mapping1

tnoremap <Esc> <C-\\> <C-n>

// mapping2

let localleader = "\\"

tnoremap <Esc> C<localleader> <C-n>

I tried to modify the above mapping by replacing '\' by a localleader;

But it just prints C\ ^N in the terminal. Can anyone help me to find the mistake?

Amit Kumar
  • 43
  • 2
  • 7

1 Answers1

2

According to VIM's documentation accessed by the command :help localleader, you should assign the "\\" to a maplocalleader variable, such as:

let maplocalleader = "\\"

tnoremap <Esc> C<LocalLeader> <C-n>
Atalajaka
  • 125
  • 1
  • 2
  • 14