Is there a way to disable warnings in vim quickfix? - vim

i am pretty new to vim and i find the warnings in quickfix especially distracting and useless at times. Is there a way to let quickfix ignore warnings and only highlight errors? Thank you for your help.

It is up to you to configure your compiler or linter to show warnings or not.
How to do so depends on your compiler or linter, which we don't know anything about.

Related

Nvim Showing Vim :h Pages

Nvim is showing Vim's help pages.
I am using nvim, and I am not sure if this is a problem, but when I type something like :help colorscheme I receive the information for configuring colorschemes for vim instead of nvim.
Please let me know either (1) how to fix this (2) or that I'm an idiot.
For example, it tells me to put the color files in ~/.vim/colors/, which doesn't work. For nvim they go in ~/.config/nvim/colors.
Neovim is a fork of Vim. It still retains much of original Vim data including a heap of help pages unmodified.
Simply don't pay attention to this. Maybe they fix it... some day.

`set foldmethod=syntax` makes vim slower, and `set foldmethod=indent` is not good enough, what can I do?

Before set foldmethod=syntax, my vim works like rocket, but everything changed after that, my vim works like tortoise, I can't bear the vim responding time.
so, I decided set foldmethod=indent, but it's not strong and smart enough.
And I try to write some vimscript, but it worths too much, what should I do?
NOTE: I just want to fold my c++ code.
It's hard to tell what's causing this without the problematic source code files. A lot of developers use Vim to edit C++ files (with syntax-based folding), so it's not a general problem. Do you have overly long files, a lot of nesting, or many #ifdefs?
I'm a bit surprised that it's just the folding part of the syntax that slows you down. Usually, it's the whole syntax parsing (on complex files), and only :syntax off can remedy that.
You may want to fiddle with the syntax sync options (:help :syn-sync). Also read :help :syntime; this can help with troubleshooting. I'm afraid there's no quick and easy fix.
A bit old thread, but just in case, try the FastFold plugin, I've been having issues with a large PHP file, and after switching to this plugin my Vim is really snappy. And even other issues with some plugins like Quickjump seem to be gone.
Tip found in this reddit thread

Ignore errors and warnings for a VIM plugin

Suppose I have a VIM plugin that is very useful, but it generates a lot of errors/warnings that I don't care for.
How can I ignore all errors from that plugin? I just want to be disturbed by these messages anymore.
Is there any setting/function call that turns off such things?
I know that the best thing would be to report this as issue, but how can I just make them not appear?
Example of errors:
Well, I would definitely look into the root cause of the errors, as it might affect the plugin's functionality. At least this should allow you to send a precise bug report to the plugin's author.
Errors and warnings can be suppressed via the :silent! (note the !) command. Basically, any Ex command can be prefixed with it. So, if you have a :TroublesomeCommand, you can silence the errors via
:silent! TroublesomeCommand
To silence the plugin (if you really must), you can might be able to redefine its mappings (to include :silent!) and commands, but the use of <SID> may force you to modify the plugin itself. In that case, you can also put the :silent! directly before the offending command (the error should include its location), but again, fixing the root cause would be preferable.

C++11 functions not recognised in vim

While using a few c++11 functions in vim I noticed that the vim plugin taglist syntastic keeps reporting errors such as 'stoi' was not declared in this scope.
So I have a few questions,
How do I get taglist syntastic to recognise c++11 functions?
Is there a way I can at least hide the error messages within vim?
Also I know I can replace c++11 specific code with standard c++ to fix the errors, but I want to find out if there is another way.
Edit: Sorry, turns out syntastic is actually responsible for the errors not taglist
Thanks for reminding me, I have too many plugins and I forget what each do
After some searching on syntastic's git repo I found an easy solution,
by adding let g:syntastic_cpp_compiler_options = '-std=c++11' in to my .vimrc

Vim language specific syntax validators?

I've been using JSLint, I was wondering if there were any sort of syntax checkers I could use for ECMAScript/JS and possibly other languages so if I do something like :check or :syntaxcheck and it would point out the first or even multiple syntax errors ( which I hopefully don't have ).
See Running JSLint from your IDE and
:help compiler
as well as jslint.vim.
:help ft-vim-syntax
You can get it to 'point out' syntax errors by highlighting aggressively. Type the command above to read the docs.
Personally I just have
filetype plugin indent on
in my .vimrc, and 99% of the time I pick up syntax errors immediately because the colour isn't right :)
This plugin is awesome:
http://github.com/scrooloose/syntastic/tree
I don't know how it works standalone, but I highly recommend Scrooloose's vimfiles, which already includes the syntax checker. In ruby for example, it will mark the status line red and tell you in which line you have a syntax error and how many errors are in your source.

Resources