{"id":19079044,"url":"https://github.com/tomtom/checksyntax_vim","last_synced_at":"2025-04-30T05:23:39.605Z","repository":{"id":66582394,"uuid":"626510","full_name":"tomtom/checksyntax_vim","owner":"tomtom","description":"Check a file's syntax when saving a file (php, ruby, tex ...) with vim","archived":false,"fork":false,"pushed_at":"2017-05-17T18:28:59.000Z","size":399,"stargazers_count":94,"open_issues_count":2,"forks_count":9,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-18T20:50:03.906Z","etag":null,"topics":["code-quality","linters","vim","vim-plugin","viml"],"latest_commit_sha":null,"homepage":"http://www.vim.org/scripts/script.php?script_id=1431","language":"Vim script","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tomtom.png","metadata":{"files":{"readme":"README","changelog":"CHANGES.TXT","contributing":null,"funding":null,"license":"LICENSE.TXT","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2010-04-24T06:56:48.000Z","updated_at":"2025-04-16T14:33:26.000Z","dependencies_parsed_at":"2023-02-24T06:30:40.539Z","dependency_job_id":null,"html_url":"https://github.com/tomtom/checksyntax_vim","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomtom%2Fchecksyntax_vim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomtom%2Fchecksyntax_vim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomtom%2Fchecksyntax_vim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomtom%2Fchecksyntax_vim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tomtom","download_url":"https://codeload.github.com/tomtom/checksyntax_vim/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251646297,"owners_count":21620906,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["code-quality","linters","vim","vim-plugin","viml"],"created_at":"2024-11-09T02:13:08.499Z","updated_at":"2025-04-30T05:23:39.593Z","avatar_url":"https://github.com/tomtom.png","language":"Vim script","funding_links":[],"categories":[],"sub_categories":[],"readme":"The checksyntax plugin runs an external syntax checker for the current buffer \nwhenever the buffer is saved (by calling the |:CheckSyntax| command). Syntax \nerrors are managed as location or quickfix lists. If any syntax error occurs, \nthe |location-list| is opened (users can redefine |CheckSyntaxFail()| to change \nthis behaviour). You can use any |location-list| related command to navigate \nthe list of syntax errors.\n\nMost syntax checks can be run asynchronously (from Vim 8 onwards or, for \nVim 7, if the AsyncCommand plugin is installed).\n\n\nInvocation~\n\nManual invocation:\nBy default, |:CheckSyntax| is mapped to \u003cF5\u003e (if not mapped already), and \nautomatically executed when saving the buffer. If multiple syntax checkers are \ndefined for the given filetype, this will by default invoke the preferred (see \n|g:checksyntax#preferred|) or first good (i.e. installed) syntax checker for a \ngiven filetype.\n\n:CheckSyntax! (with the optional \u003cbang\u003e) or \u003cC-F5\u003e will run all supported \nsyntax checkers for a given filetype if multiple syntax checkers are defined \nfor a given filetype and if the software is installed on your computer.\n\nAutomatic invocation:\nIn order to automatically run a syntax check when saving a file, please set \n|g:checksyntax#auto_filetypes| or |g:checksyntax#auto_enable_rx| to an \nappropriate value. If |g:checksyntax#auto_enable_rx| is set to '.', which \nmatches all filetypes, automatic syntax checks are enabled for all supported \nfiletypes. Automatic checks are equivalent to running |:CheckSyntax| with no \n\u003cbang\u003e.\n\n\nSupported filetypes~\n\nThe syntax checks are performed by external syntax checker. This software has \nto be installed on your computer. Pre-defined syntax checkers are:\n\n  bash         ... shellcheck, bash -n\n  c, cpp       ... splint\n  haskell      ... hlint, ghc-mod-check\n  html         ... tidy\n  java         ... jlint, checkstyle, pmd\n  javascript   ... jshint, esprima, gjslint, jslint, jsl, pmd\n  lua          ... luac (run luac -p)\n  perl         ... perl (run perl -Wc)\n  php          ... php (run php -l)\n  python       ... pyflakes or pylint\n  r            ... lintr\n  ruby         ... ruby (run ruby -c)\n  tex, latex   ... chktex (run chktex -q -v0)\n  typescript   ... tsc\n  viki         ... deplate\n  vim          ... vint\n  xhtml        ... tidy\n  xml, docbk   ... xmllint, pmd\n\nCheckers with support for many filetypes:\n\n  coala        ... c, cpp, csharp, cmake, coffeescript, css, dart, fortran, go, \n                   haskell, html, java, javascript, jsp, tex, lua, markdown, \n                   perl, php, python, r, rst, ruby, scala, scss, sh, sql, \n                   swift, typescript, verilog, vhdl, vim, xml, yaml and maybe \n                   others\n\nSyntax checker definitions are kept in:\nautoload/checksyntax/defs/{\u0026filetype}.vim\n\nRun this command to find out, which filetypes are supported: \u003e\n\n  :echo globpath(\u0026rtp, 'autoload/checksyntax/defs/*.vim')\n\n\nTrouble shooting~\n\nIt's possible that a newer version of a linter changes its command-line \narguments or the output format in a way that breaks the checksyntax plugin. \nSince I personally use only a small subset of the provided checkers, it's \nlikely that I won't notice the problem. If the checksyntax plugin doesn't seem \nto work, please proceed as follows:\n\n1. Check if the errorformat is correctly defined. Look at either:\n    - `autoload/checksyntax/defs/LINTER.vim` or\n    - `compiler/checksyntax/LINTER.vim`.\n   If the linter is defined as a compiler, you can try to invoke the compiler \n   manually: \u003e\n     compiler checksyntax/LINTER\n     lmake\n\n2. Use `:let g:checksyntax#debug = 2` to get a high level view of what is going \n   on when you invoke |:CheckSyntax|.\n\n3. Install the tlib plugin (vimscript #1863 or \n   https://github.com/tomtom/tlib_vim) and try: \u003e\n     :Tlibtraceset --file=checksyntax.log +checksyntax\n\u003c   Invoke |:CheckSyntax| and send me the resulting log file per e-mail. You \n   can use `:CheckSyntax FILETYPE LINTER` to invoke a specific syntax checker.\n\n\n-----------------------------------------------------------------------\nInstall~\n\nEdit the vba file and type: \u003e\n\n    :so %\n\nSee :help vimball for details. If you have difficulties or use vim 7.0, \nplease make sure, you have the current version of vimball (vimscript \n#1502) installed or update your runtime.\n\nAlso available via git: http://github.com/tomtom/checksyntax_vim/\n\n\nOptional enhancements~\n\nIf the quickfixsigns plugin (vimscript #2584) is installed, lines containing \nsyntax errors will be marked with signs.\n\nThe tinykeymap plugin (vimscript #4199) can be used to quickly move from one \nissue to the next by using it's quickfix or location-list maps (see \n|g:tinykeymap#map#qfl#map| and |g:tinykeymap#map#loc#map|).\n\nFor vim8+: Checks will be run asynchronously by default.\n\nFor vim7: If AsyncCommand (vimscript #3431) is installed, syntax checks can \nbe peformed asynchronously -- see also |g:checksyntax#run_alternatives|, \n|g:checksyntax#run_all_alternatives| and |g:checksyntax#async_runner|. This \nrequires a version of vim with |clientserver| support and |v:servername| to be \nset (for vim see also |--servername|).\n\n\n\n\n\nLicense: GPLv3 or later\nInstall: See http://github.com/tomtom/vimtlib/blob/master/INSTALL.TXT\nSee http://github.com/tomtom for related plugins.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomtom%2Fchecksyntax_vim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftomtom%2Fchecksyntax_vim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomtom%2Fchecksyntax_vim/lists"}