Closed tbelaire closed 8 years ago
Thanks, this is great! I didn't know about <buffer>
and <localleader>
. How do you set the <localleader>
?
let maplocalleader = ","
is the way. You usually set it in your vimrc. I guess that should be mentioned in the instructions.
I switched to using nnoremap, and only defining the commands for the current buffer.
Since ftplugins are only run once you know that the filetype is tex, go ahead an define the mappings unconditionally, but use
<buffer>
so that they only get loaded for the current (tex) buffer, not all open buffers.Also, this is a filetype specific command, so it makes sense to use
<localleader>
(which I have mapped to,
anyways), so now people who remap local leader are happy too.Also, I split the commands up by line, that should make it easier to see what's going on. It also highlights some of the redundancy, perhaps there should be a function defined?
This branch also includes the exists check I fixed earlier, since I couldn't load the plugin at all with that constantly crashing. Maybe resolve that pull request first.