Fork me on GitHub
#vim
<
2021-04-21
>
martinklepsch14:04:52

I’m trying to create a command that reloads the buffer, evaluates it and then evaluates a specific mark (using #conjure)

nnoremap <Leader>x :edit <CR> <localleader>eb
It looks like the <localleader>eb thing isn’t triggered, anyone have a pointer why that is?

Olical14:04:54

And if you substitute <localleader> with your actual local leader key?

Olical14:04:54

I can't remember how the substitution of that <localleader> placeholder works 😅

martinklepsch14:04:30

I did try that but didn’t see any indication that the \eb was actually run

dave17:04:58

You might want to try nmap instead of nnoremap. I think the difference is that nmap is like pressing those keys verbatim, which takes into account things like plugins you have installed and other mappings that you've created. Whereas nnoremap is like pressing those keys on a fresh vim install with no config. Or something to that effect.

dave17:04:25

In general, nnoremap is preferable, but in this case, I think you probably want nmap because <localleader>eb means something specific to your config.

martinklepsch09:04:17

That works @U0AHJUHJN! Thanks so much!

🎉 5
martinklepsch09:04:45

Didn’t understand the difference between nmap and nnoremap but now that you said it it makes perfect sense!