vim

For discussion on all things (neo)vim.
martinklepsch 2021-04-21T14:45:52.066900Z

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?

martinklepsch 2021-04-22T09:31:17.068300Z

That works @dave! Thanks so much!

🎉 2
martinklepsch 2021-04-22T09:31:45.068500Z

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

Olical 2021-04-21T14:47:54.067Z

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

Olical 2021-04-21T14:50:54.067200Z

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

martinklepsch 2021-04-21T14:52:30.067400Z

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

dave 2021-04-21T17:11:58.067800Z

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.

dave 2021-04-21T17:12:25.068Z

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