2

I am using syntax highlighting on my Cypher scripts from https://github.com/memgraph/cypher.vim. (I would open an issue there but the project and its predecessor haven't been touched in 3 years.) Works fine except when I create or load a .cypher file, or even switch to a .cypher buffer, the status bar gives

    commenstring=//%s
    commenstring=//%s
Press ENTER or type command to continue. 

which interrupts my workflow, especially since I change buffers a lot. As far as I can tell, comments are defined properly in the syntax file since they highlight correctly. But then again, I don't even know what this message is trying to tell me in order for me to know where to fix it. It's hardly an error, just a speedbump requiring an extra keypress.

3
  • Welcome to Vi and Vim!
    – D. Ben Knoble
    Commented May 21 at 16:23
  • 3 years is nothing: sometimes projects are more or less stable (e.g., github.com/benknoble/vim-mips). I highly recommend following up on GitHub, even if only to fork and update your new version (submitting the PR is even better).
    – D. Ben Knoble
    Commented May 21 at 16:24
  • @D.BenKnoble PR submitted!
    – kjekk
    Commented Jun 9 at 23:21

1 Answer 1

4

But then again, I don't even know what this message is trying to tell me in order for me to know where to fix it

This line in ftplugin/cypher.vim is responsible for this:

let b:undo_ftplugin = 'setlocal commentstring'

https://github.com/memgraph/cypher.vim/blob/34280717f4a4bbc6adf09f3abd54a3e9f142adb3/ftplugin/cypher.vim#L14

Basically, undo_ftplugin should undo settings that filetype plugin sets when filetype is changed, to "be a good vim citizen". However in this case it has an error, instead of undoing commentstring it just calls an incomplete option local set, which effectively prints current option value.

It should be let b:undo_ftplugin = 'setlocal commentstring<'.

See :h undo_ftplugin

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.