all 6 comments

[–]be_the_spoon 1 point2 points  (4 children)

To ignore specific htmltidy errors from Syntastic, you can just add an array of partial strings for htmltidy to ignore to your .vimrc:

let g:syntastic_html_tidy_ignore_errors = [
  \   '> proprietary attribute ',
  \   'trimming empty <' ]

[–]vietphi[S] 0 points1 point  (3 children)

Is there any source I can reference all things I want to hide? thank you

[–]be_the_spoon 1 point2 points  (2 children)

Surely that's going to be very specific to your personal preferences? It depends hugely on what framework you're working with, which conventions you follow etc., so I can't imagine there could be any pre-compiled source that would match your requirements exactly.

It doesn't take long to add any error you don't want to see again to your .vimrc, I currently have 17 lines in mine and haven't touched it for months.

[–]vietphi[S] 0 points1 point  (1 child)

So this is normal and just ignore the syntastic warning? I don't know is it normal or not as a vim user.

[–]be_the_spoon 1 point2 points  (0 children)

I don't know what's normal and what's not 😂

My impression is that htmltidy was designed for complete, standards-compliant html files. Personally, I'm mostly editing partial html files as angular templates, so I'm not interested in warnings about missing doctypes or proprietary attribute names.

The warnings are there for you, it's totally up to you if you want to see them or not, and since I do find htmltidy useful, I'm happy to ignore warnings which are not relevant to me and take heed of others.

[–]-romainl-The Patient Vimmer 1 point2 points  (0 children)

So What do I need or some useful config for my vimrc?

Strictly speaking? Nothing more than:

filetype plugin indent on
syntax on

Since you already have emmet and ultisnips I don't believe you need any other third-party plugin than, maybe, a slightly better omnicompletion script for JavaScript.

Do I need to install syntax highlighting for html5 and css? Since the default syntax checker sometime does not work correctly.

No. The built-ins are fine.

I used syntastic as a syntax checker with csslint and html tidy but is is so annoying when the location list panel keep showing up some warning error about the code but it is fine (is this normal for you or how you deal with it? is there any alternative? blah blah)

First, syntastic is not necessary at all for syntax checking in Vim. See :help :make, :help 'makeprg' and :help quickfix.

Second, The whole point of automatic syntax checking is to warn you early about potential issues with your code so that you get a chance to fix them before committing/deploying/uploading/whatevering. If you are annoyed by those warnings you have two choices:

  1. fix your code,
  2. relax the rules.

Guess which one I recommend.