preservim / vimux

easily interact with tmux from vim
MIT License
2.2k stars 159 forks source link

Double semi-colons not escaped correctly #88

Closed libanp closed 3 years ago

libanp commented 10 years ago

I'm trying to use vimux with OCaml, so I make heavy use of double semi-colons (;;) at the end of lines.

Initially one of the semi-colons would get dropped. I edited

call VimuxSendKeys('"'.escape(a:text, '"').'"')

To

call VimuxSendKeys('"'.escape(a:text, '";`').'"')

However now ;; comes out as \;;

So I'm stuck getting either a single ; or \;; which OCaml won't accept.

libanp commented 10 years ago

Ok, I've got a fairly ugly fix, if you want I can submit a pull request:

Changed call VimuxSendKeys('"'.escape(a:text, '"').'"')

to call VimuxSendKeys('"'.escape(substitute(a:text, ";$", ";;", ""), '"').'"')`

I also added ` to the escaped characters because they would cause errors.

alerque commented 3 years ago

This should be resolved in 46377b8.