Is it possible to get gVim to highlight C++ syntax errors (the red squiggles underneath) in real-time like Visual Studio?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Short answer: Yes, but it won’t be so smooth / immediate as in IDEs.
Long answer: Whereas IDEs have built-in support (and parsers, etc.) for a (usually very limited) set of programming languages, Vim is a general-purpose editor, and therefore has to rely on external tools to do the syntax checking. The built-in way is to execute
:makeand receive a list of (syntax or compiler) errors in the quickfix list. There are plugins to automate that; Syntastic is a very popular one with support for many languages.But still, because Vim has to invoke an external executable and has little support for running tasks asynchronously, there will be more delay until you see the errors. If you can’t do without the features of an IDE, it’s fine to use both according to their strengths: Vim for super-efficient text editing, and the IDE for code navigation, debugging, and compilation.