I have this in my vimrc:
let g:mapleader = "," nnoremap # ,
so I use , as my leader, and want to use # for backwards search after f,t...But my # mapping does not work, so something is amiss
To set your leader key, you must use
let mapleader = "," not
let g:mapleader = ",".
*<Leader>* *mapleader* To define a mapping which uses the "mapleader" variable, the special string "<Leader>" can be used. It is replaced with the string value of "mapleader". If "mapleader" is not set or empty, a backslash is used instead. Example: > :map <Leader>A oanother line<Esc> Works like: > :map \A oanother line<Esc> But after: > :let mapleader = "," It works like: > :map ,A oanother line<Esc>
As for using
nnoremap <something> <leader> like you did, this causes no issues for me. Make sure you don't have some other mapping by running the command:
nnoremap ,. It should print
No mapping found.