howl-editor / howl

The Howl Editor
http://howl.io
Other
712 stars 68 forks source link

Unable to set vi-on as default at startup #582

Closed rsolvang closed 4 years ago

rsolvang commented 4 years ago

I have tried what is mentioned in the documentation, but it still does not work and I get no errors. I have used save-config to make other changes persistent, which I can observe in my config.lua file. It feels like the init.moon is not read/loaded at all during startup.

Am I doing something wrong or is there some change that is not yet documented?

nilnor commented 4 years ago

No, that should work. Here's what I have in my file:

howl.signal.connect 'app-ready', ->
  howl.command.vi_on!
  bundles.vi.maps.command.editor.ctrl_o = 'view-next'
  bundles.vi.maps.command.editor.ctrl_i = 'editor-indent'

Where is your init.moon located?

rsolvang commented 4 years ago

Ah, thanks for the pointer, I found out what I did wrong. The init.moon was located in the ~/.howl/system/ directory, while it should have been placed directly in into ~/.howl/. I see know that this is mentioned earlier in the documentation. I think my mistake was that I created the init.moon file quite early while skimming trough the documentation, and then I wrongly assumed that it should be placed together with the config.lua. No wonder nothing I wrote had any effect!