vicoapp / vico

Mac Programmers Text Editor
http://www.vicoapp.com/
658 stars 89 forks source link

Custom keymap file #59

Closed peteschaffner closed 11 years ago

peteschaffner commented 11 years ago

This is more of a feature request than an issue, but it would be nice for Vico to honor a user's keys.nu file located in the app support directory. For example, having something like

(let

(nmap setKey:"U" toAction:"vim_redo:")

)

in ~/Application Support/Vico/keys.nu would create a new mapping for vim_redo, and override an existing binding to U if it exists.

Perhaps this is already implemented, but I couldn't find any documentation on it.

What do you think?

Shadowfiend commented 11 years ago

You should actually be able to drop a vico.nu file there, and it will work exactly as you want :) Let me know if that's not the case and I will investigate.

peteschaffner commented 11 years ago

Hmm no luck :( I have the above keybinding set in ~/Application Support/Vico/vico.nu but it doesn't seem to work.

Shadowfiend commented 11 years ago

My bad. Try site.nu.

peteschaffner commented 11 years ago

Still no luck. I wonder if my syntax is off :\

peteschaffner commented 11 years ago

Is this correct? Sorry I'm completely new to nu haha.

(let

(nmap setKey:"U" toAction:"vim_redo:")

)
Shadowfiend commented 11 years ago

I guess I should have read a little more ;) You'll want something more like:

(let (nmap (ViMap normalMap))
  (nmap setKey:"U" toAction:"vim_redo:"))
peteschaffner commented 11 years ago

Perfect! I was going off what I saw in keys.nu ... whoops.

Thanks so much for your help! I'm getting pretty excited about this editor :)

peteschaffner commented 11 years ago

Oops. I guess if I would have looked a little closer I would have seen that is exactly what was happening in keys.nu ;)

Shadowfiend commented 11 years ago

Hehe yes indeed :) Glad to hear it! Going to go ahead and close this issue unless you have any other problems.

peteschaffner commented 11 years ago

Nope I am good! Thanks again for the help.

Shadowfiend commented 11 years ago

Cool, no probs.