[colug-432] syntastic for vim

Rick Hornsby richardjhornsby at gmail.com
Thu Jun 2 23:22:18 EDT 2016


I’ve been trying to come up with ways to configure vim to do automatic syntax checking, sort of like what ‘visudo’ does.  I found syntastic[1], but I’m having a bit of a hard time with it.  Other than really, really basic stuff like set ts=4 or whatever, I've never tried to customize vim.

I got Syntastic working, sort of, but it seems to be taking more effort than it should.  For example, one of the filetypes I’m targeting is yaml.  I ended up having to explicitly tell Syntastic to use a yaml checker, like so:

	let g:syntastic_yaml_checkers = ['yamlxs']

But the worse issue is that I can't get it to seem to draw properly on the screen[2].  (I know what the yaml syntax issue is, I created it intentionally.)  vim seems to be able to draw the status at the bottom normally otherwise.  The bad drawing seems to be an issue no matter the (iTerm on OSX) terminal window size, but if I resize the window enough, it seems to straighten out at least temporarily.  The only other customization I have for vim is the pathogen prereq.  I'm using the syntastic defaults otherwise[3].  The way it is handling screen drawing is even worse when you try to quit[4], because there does not seem to be any way to recover or continue editing - you're just stuck and have to quit out of vim regardless.  I can't get that yellow error message to move from the top.

This doesn't seem to be a specific issue with vim on OSX.  I copied all the vim configuration stuff to a remote linux host and it is behaving the same way.  My term type is xterm-256color if that matters?  I also tried it in a Linux VM console (not via ssh) - same weird not drawing in the right place behavior.

I'm trying to do this not only for myself, but trying to put something together for my team of *NIX engineers who know next to nothing about Puppet, yaml, etc.  For now, they'll only be modifying hiera data in yaml, but I'd like the solution to be flexible enough to extend to linting puppet pp files, etc later.

Is anyone using Syntastic and have an idea of what might be wrong?  Is there a better solution?  I don't really want one-offs like [5], that's far too brittle.

thanks!

[1] https://github.com/scrooloose/syntastic <https://github.com/scrooloose/syntastic>
[2] https://www.dropbox.com/s/z4lb7ywg4b0ui6y/Screen%20Shot%202016-06-02%20at%2021.47.18.png?dl=0 <https://www.dropbox.com/s/z4lb7ywg4b0ui6y/Screen%20Shot%202016-06-02%20at%2021.47.18.png?dl=0>
[3] https://gist.github.com/rjhornsby/80a6dcf3808b857793ca8979091796c9 <https://gist.github.com/rjhornsby/80a6dcf3808b857793ca8979091796c9>
[4] https://www.dropbox.com/s/spp49830krhmwdr/Screen%20Shot%202016-06-02%20at%2021.50.23.png?dl=0 <https://www.dropbox.com/s/spp49830krhmwdr/Screen%20Shot%202016-06-02%20at%2021.50.23.png?dl=0>
[5] http://mattparkes.net/automatically-lint-yaml-files-after-editing-them-with-vivim/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.colug.net/pipermail/colug-432/attachments/20160602/b70bdc5e/attachment.html 


More information about the colug-432 mailing list