[Feature-request] ex-mode goto line
: enters vim-like ex-mode. In Vim, :32 would jump to line 32.
How would I go about adding this as a command function?
Or would this interfere with the behavior of cmd+l which takes a second argument after cmd+l?
I agree that :32 should be supported. In the meanwhile, you can use 32G or 32gg to do the same. I actually prefer it.
+1 for this
This functionality is available in CodeMirror, LightTable's editor. Try for yourself in this demo. However, LT's current ex-mode only autocompletes to vim LT commands and only processes LT commands.
The latter could be remedied with an ltexec that delegates unknown commands back to CodeMirror:
(ex-command {:name "ltexec"
:func (fn [cm info]
(let [command (-> (.-args info) first keyword)
ex-args (next (.-args info))]
(if (cmd/by-id command)
(apply cmd/exec! command ex-args)
(when-let [ed (pool/last-active)]
(js/CodeMirror.Vim.handleEx (editor/->cm-ed ed)
(clojure.string/join " " ex-args))))})
However, the UI would also have to allow this which it currently doesn't.
Alternatively, we could opt for an optional way to disable LT's ex-command UI but I've tried that and LT still causes CodeMirror's showPrompt to get thrown as an alert box.
I'd love to see the latter solution, appearing the same as the above demo.
@ibdknox Any thoughts?
After thinking about this more, I'm happy with 32G. We don't have enough bandwidth to tackle this but if anyone is passionate about this, happy to discuss a pull request.