Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support :echowindow #199

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Support :echowindow #199

wants to merge 1 commit into from

Conversation

roryrjb
Copy link

@roryrjb roryrjb commented Aug 13, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant