Buffered local mappings in Vim: <buffer> vs. <localleader>
One thing interests me. If it was necessary to display a mapping specific to a buffer, you can go anyway a) do it with
nnoremap <buffer> d dd b) or with
nnoremap <localleader>d dd which will be effective because localleader is specific to this buffer, make this mapping specific to this buffer.
This is in some ways similar to the two coinciding ways of doing the same thing. Is there a reason to use one path instead of another? Maybe some way that can be used differently?
As far as I can tell, maplocalleader is split between buffers. This means that your second card will not be buffer specific.
Indeed, if you define a buffer-specific map (for example, a map refers only to a certain type of file), I believe that the convention should use both <buffer> and <localleader> . If you define a non-buffer map, you should simply use <leader> .