configuring sytanstic - mainly ruby(rails), javascript, eruby

34 views
Skip to first unread message

Robert Balejík

unread,
May 22, 2015, 12:09:34 PM5/22/15
to vim...@googlegroups.com
so I installed syntastic and I try to use it - it notes rails errors & warnings but reading this article http://blog.thomasupton.com/2012/05/syntastic/ you can tune it finely, i.e. is it necssary or what are adv. of doing so.

LCD 47

unread,
May 22, 2015, 6:07:10 PM5/22/15
to vim...@googlegroups.com
It mostly works out of the box, but you aren't really supposed to
use it with the default configuration. It's a good idea to read the
manual[1], you'll save yourself a lot of time by doing that. Then
perhaps read the FAQ[2], and look at the checker-specific notes[3] for
the checkers you care to use.

/lcd

[1]: :help syntastic
[2]: https://github.com/scrooloose/syntastic#faq
[3]: https://github.com/scrooloose/syntastic/wiki/Syntax-Checkers

Robert Balejík

unread,
May 23, 2015, 8:58:47 AM5/23/15
to vim...@googlegroups.com
thanks so I did :SyntastciInfo and this is what I get

Global mode: active
Filetype ] is active
Available checkers: -
Currently enabled checkers: -

I have isntalled chcekers wtih npm and globally (jshint, csshint,) and ruby-lint but how could it be that there are no available checkers
:echo syntastic#util#system('echo "$PATH"') gives this output
/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games:/usr/lib/mit/bin
so this seems OK so the only reason could be that those checker arn't enabled in my path - how could it be?

LCD 47

unread,
May 23, 2015, 12:43:25 PM5/23/15
to vim...@googlegroups.com
On 23 May 2015, Robert Balejík <r.ba...@gmail.com> wrote:
> thanks so I did :SyntastciInfo and this is what I get
>
> Global mode: active
> Filetype ] is active
^^^^^^^^^^

There's your problem.

/lcd

Robert Balejík

unread,
May 23, 2015, 2:15:45 PM5/23/15
to vim...@googlegroups.com
I mean how can I resolve it our found aout what of thoee checkers variables are enabled in my $PATH ?

LCD 47

unread,
May 23, 2015, 2:26:53 PM5/23/15
to vim...@googlegroups.com
On 23 May 2015, Robert Balejík <r.ba...@gmail.com> wrote:
> I mean how can I resolve it our found aout what of thoee checkers
> variables are enabled in my $PATH ?

Fix your filetype. Syntastic depends on filetypes being set
correctly. Your test file has filetype "]". No idea how you managed to
do that, but this is not going to work.

/lcd

Robert Balejík

unread,
May 23, 2015, 2:54:18 PM5/23/15
to vim...@googlegroups.com
what did you mean by : " Your test file has filetype "]". "?


--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to a topic in the Google Groups "vim_use" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vim_use/AcKUMAMhQK0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vim_use+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ethan Hereth

unread,
May 23, 2015, 3:19:04 PM5/23/15
to vim...@googlegroups.com
On Sat, May 23, 2015 at 2:54 PM, Robert Balejík <r.ba...@gmail.com> wrote:
what did you mean by : " Your test file has filetype "]". "?

2015-05-23 20:26 GMT+02:00 LCD 47 <lcd...@gmail.com>:
On 23 May 2015, Robert Balejík <r.ba...@gmail.com> wrote:
> I mean how can I resolve it our found aout what of thoee checkers
> variables are enabled in my $PATH ?

    Fix your filetype.  Syntastic depends on filetypes being set
correctly.  Your test file has filetype "]". No idea how you managed to
do that, but this is not going to work.

    /lcd

Robert,

Please don't top post.

It appears that, somehow, vim thinks the filetype of the file you are editing is ']'

This seems very strange; what kind of file are you editing? If you type :set filetype? in Vim's commandline, it should tell you what it thinks the filetype is. Presumably it is ']' and I have no idea what that means or why it would think that.

To learn more about this read :help filetype.

I use Syntastic some too, and, if the filetype is correct it pretty much should just work. Assuming that the appropriate linters/checkers are indeed in your path.

Good luck,

Ethan Alan

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to a topic in the Google Groups "vim_use" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vim_use/AcKUMAMhQK0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vim_use+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+u...@googlegroups.com.

Nikolay Pavlov

unread,
May 23, 2015, 3:37:55 PM5/23/15
to vim...@googlegroups.com
2015-05-23 22:18 GMT+03:00 Ethan Hereth <advocate...@gmail.com>:
>
> On Sat, May 23, 2015 at 2:54 PM, Robert Balejík <r.ba...@gmail.com> wrote:
>>
>> what did you mean by : " Your test file has filetype "]". "?
>>
>> 2015-05-23 20:26 GMT+02:00 LCD 47 <lcd...@gmail.com>:
>>>
>>> On 23 May 2015, Robert Balejík <r.ba...@gmail.com> wrote:
>>> > I mean how can I resolve it our found aout what of thoee checkers
>>> > variables are enabled in my $PATH ?
>>>
>>> Fix your filetype. Syntastic depends on filetypes being set
>>> correctly. Your test file has filetype "]". No idea how you managed to
>>> do that, but this is not going to work.
>>>
>>> /lcd
>>>
> Robert,
>
> Please don't top post.
>
> It appears that, somehow, vim thinks the filetype of the file you are
> editing is ']'
>
> This seems very strange; what kind of file are you editing? If you type :set
> filetype? in Vim's commandline, it should tell you what it thinks the
> filetype is. Presumably it is ']' and I have no idea what that means or why
> it would think that.

It is very easy to have this filetype: just have
`\%(\s\|^\)vim:\s*ft=]` somewhere near the start or the end of the
file. It is interesting that `set ft=[` produces E474.

It is better to type `:verbose set filetype?` to know where it was set.

Justin M. Keyes

unread,
May 23, 2015, 5:07:48 PM5/23/15
to vim_use
Off-topic, I finally gave syntastic a chance recently, and I must say
the documentation is impressive. Original author notwithstanding.


Justin M. Keyes

Robert Balejík

unread,
May 24, 2015, 4:58:39 AM5/24/15
to vim...@googlegroups.com
Dne pátek 22. května 2015 18:09:34 UTC+2 Robert Balejík napsal(a):
> so I installed syntastic and I try to use it - it notes rails errors & warnings but reading this article http://blog.thomasupton.com/2012/05/syntastic/ you can tune it finely, i.e. is it necssary or what are adv. of doing so.

OK now it is runnin just fine, but I have 1 mire question: I've js.erb file it says filetype ruby - is it also chcekin javascript in that case? I mean I've installed jshint and also set it as a cehecker in .vimrc

LCD 47

unread,
May 24, 2015, 12:11:52 PM5/24/15
to vim...@googlegroups.com
No, jshint can't check eRuby files.

/lcd

Robert Balejík

unread,
May 24, 2015, 2:02:04 PM5/24/15
to vim...@googlegroups.com
so does it chcek for javascript when filetype is js.erb ??? or it only chceks for ruby mistakes ?? or is there a way (plugin) to do that?

Reply all
Reply to author
Forward
0 new messages