vim

frankitox 2023-06-05T14:32:06.803639Z

Anyone knows how to prepopulate the ex mode programatically?

✅ 1
frankitox 2023-06-07T13:42:06.207389Z

Right, I've been learning a lot of fennel thanks to Conjure's source code! The thing is I usually have different shadow-cljs build names, so I rather prepopulate ex mode with :ConjureShadowSelect

frankitox 2023-06-05T14:32:36.305289Z

I have something like this in neovim/fennel:

(defn shadow-select []
  (some-async-fn
    (fn []
      ;; prepopulate ex mode with something like "ConjureShadowSelect "
      )))

(noremap :n :<localleader>sc ":shadow-select<CR>")

frankitox 2023-06-05T14:40:43.736819Z

Looks like https://neovim.io/doc/user/builtin.html#feedkeys() is helpful here

Olical 2023-06-06T17:56:06.570789Z

Yep, was gonna suggest just feeding keys into the editor too 😄

Olical 2023-06-06T17:57:37.283969Z

Also you can create mappings in lua (fennel) to lua functions directly. I'm out right now so can't link, but you'll find it in conjures source code under the mappings.fnl module I think