vim-vimlparser
vim-vimlparser copied to clipboard
Support :echowindow
Hello!
I went down a bit of a rabbit hole this morning. I was working on some autoload functions and decided that echowindow was a good logging solution. Anyway I'm using vim-ale with vint and I got the following error message:
E492: Not an editor command: echow 'PluginSync: ' . a:msg (see vim-jp/vim-vimlparser)
...so I took a look at this project (for the first time, so I am generally unfamiliar) and could see definitions for echo, echomsg, echoconsole and so on but echowindow missing. This changeset adds support for echowindow.
but...
In the meantime I was checking using the actual parser:
let s:VP = vimlparser#import()
let code = [
\ 'echowindow "hello"'
\]
let r = s:VP.StringReader.new(code)
let p = s:VP.VimLParser.new()
let c = s:VP.Compiler.new()
echo join(c.compile(p.parse(r)), "\n")
The above will output (excmd "echowindow \"hello\"") which seems reasonable (and wouldn't expect the E492: Not an editor command error) but considering how other echo commands are parsed I would expect (echowindow "hello"). I also cloned vint and installed it from the master branch and this error disappeared, perhaps the version I previously had from PyPI is outdated.
This is all to say, this isn't really blocking me but in case this addition is useful please consider merging it in.