Closed teoljungberg closed 12 years ago
What exactly do you mean? Key bindings, commands, or what?
The movement keys, i.e
noremap H ^
noremap L g_
Basicly to create a .vimrc
-like file that lets you create custom keys, commands and whatnot
Gotcha. You can do this right now, but you have to use Nu:
(let (map (ViMap normalMap))
(map map:"H" to:"^")
(map map:"L" to:"g_))
Notably, g_ isn't implemented, so you'll have to implement it. You can also map to Nu expressions:
((ViMap normalMap) map:"g_" toExpression:(do ()
; code for what to do on g_
))
Lastly, you can map recursively:
((ViMap normalMap) map:"H" to:"^" recursively:t scope:nil)
I can look into exposing these maps via actual map commands, however.
Actually I think you can define the command(s) yourself using ExMap:
((ExMap defaultMap) define:"map" syntax:"E" as:(do (command)
(let (partsArray ((command arg) componentsSeparatedByString:" "))
(if (= (partsArray length) 2)
(let (partsList (partsArray list))
((ViMap normalMap) map:(head partsList) to:(head (tail partsList))))
(else
; throw an exception or something
))))
Warning: not tested hehe. But that should more or less do it.
Great thanks! I'll look into that
This would be a featurekiller for me atleast