0

It seems like running the Goyo command (a distraction free editing plugin) on loading a pandoc document should be really simple, but

execute "Goyo"

in .config/nvim/ftplugin/pandoc.vim leads the shell to produce the error

“nvim test.md” terminated by signal SIGSEGV (Address boundary error)

The filetype is correctly detected (echo 'hello' works), but for some reason it doesn't like executing Goyo. I think the problem is that Goyo is being executed before the buffer is fully loaded, but I'm not sure.

Any ideas?

  • Couple of tips: (1) you don’t need execute—Goyo alone will do the trick; (2) consider checking the command exists before calling it; (3) consider putting your script in ~/.vim/after/ftplugin/pandoc.vim so you don’t override the vim runtime files. But I can’t tell you why that particular command is failing; have you searched the issue tracker on their github for similar problems?? – D. Ben Knoble Dec 10 '18 at 4:42
  • 1
    Segfault errors should be reported to the neovim repository along with a procedure on how to reproduce them and ideally a stacktrace. Make sure to test with the latest release and verify it still happens. – Christian Brabandt Dec 10 '18 at 7:05
1

Thanks to D. Ben Knoble above. Moving the file from ~/.config/nvim/ftplugins/pandoc.vim to ~/.config/nvim/after/ftplugins/pandoc.vim made it work. Not that it explains why it didn't work before.

  • Please don't add "thank you" as an answer. Instead, accept the answer that you found most helpful. - From Review – jamessan Dec 10 '18 at 13:18
  • 1
    @jamessan in this case, there was no other answer... I suggested a tip, not a solution—it happened to work for the OP, so they self-answered with their discovered solution. – D. Ben Knoble Dec 10 '18 at 17:12

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

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