Thursday, February 22, 2018

making custom key names for mappings

leader and localleader are the standard, so one might
have conflicts between scripts because
all of them use leader and localleader.

how would you define, say
<coolleader>, which you set to the
leader by default,
but can be changed to any key
sequence (including c-v derived).

==
ideally, I would have a command mkKeyName with which to define
<coolleader> such as

:mkKeyName -default=leader coolleader

and might set it to anything such as
se mapcoolleader=^[
se mapcoolleader=
se mapcoolleader!
se mapcoolleader!=<Space>

(this implies that one would also able to use
:setlocal mapcoolleader ??

and use it in your mappings
as in
nnoremap <coolleader>B :call MyCoolFunction()<CR>

thanks again,


--
Renato Fabbri
GNU/Linux User #479299

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment