{"id":19078942,"url":"https://github.com/tomtom/tassert_vim","last_synced_at":"2026-03-01T11:02:07.541Z","repository":{"id":66582403,"uuid":"841606","full_name":"tomtom/tassert_vim","owner":"tomtom","description":"Simple assertions/poor man's contracts for vim script","archived":false,"fork":false,"pushed_at":"2015-11-05T19:38:18.000Z","size":167,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-22T05:27:47.575Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://www.vim.org/scripts/script.php?script_id=1730","language":"VimL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"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":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2010-08-16T17:40:58.000Z","updated_at":"2017-07-15T04:53:20.000Z","dependencies_parsed_at":"2023-03-11T00:08:05.470Z","dependency_job_id":null,"html_url":"https://github.com/tomtom/tassert_vim","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/tomtom/tassert_vim","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomtom%2Ftassert_vim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomtom%2Ftassert_vim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomtom%2Ftassert_vim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomtom%2Ftassert_vim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tomtom","download_url":"https://codeload.github.com/tomtom/tassert_vim/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomtom%2Ftassert_vim/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29967931,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T10:55:55.490Z","status":"ssl_error","status_checked_at":"2026-03-01T10:55:55.175Z","response_time":124,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2024-11-09T02:12:47.109Z","updated_at":"2026-03-01T11:02:07.523Z","avatar_url":"https://github.com/tomtom.png","language":"VimL","funding_links":[],"categories":[],"sub_categories":[],"readme":"This plugin defines a command |:TAssert| that takes an expression as \nargument and throws an exception if this expression evaluates to \n|empty()|. You can insert these comments throughout your code whenever \nsomething could potentially go wrong. The exception is then thrown right \nwhere the problem occurs. You could think of it as a poor man's \ndesign-by-contract substitute.\n\nOne goal of this plugin is to allow users to quickly switch on or off \nassertions depending on the context. This can be done either by:\n\n    1. Turning assertions off so that they are not evaluated. This can \n       be achieved by setting g:TASSERT to 0 or by calling the command \n       |:TAssertOff|.\n\n    2. Commenting out assertions in the current buffer by calling the \n       commmand |:TAssertComment|.\n\n\nExample: \u003e\n\n    fun! Test(a, b)\n        TAssertType a:a, 'string'\n        TAssertType a:b, 'number'\n        TAssert !empty(a:a)\n        return repeat(a:a, a:b)\n    endf\n\nNOTE: The |:TAssertType| command requires the spec.vim plugin.\n\n\n                                                    *tAssert-logging*\nLogging:~\n\nTAssert also includes a few convenience commands for logging -- see \n|:TLog|.\n\n                                                    *g:TLOG*\nThe variable g:TLOG controls where messages are written to:\n\n    echom ... Print messages in the echo area.\n    file  ... Print messages to a file; syntax \"file:FILENAME\"\n    Decho ... Print messages via Decho (vimscript#642)\n\n\n                                                    *tAssert-install*\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.\n\nSee also |tassert-macros|.\n\n\n                                                    *tAssert-redistribute*\nCompatibility:~\n\nIf you want to redistribute files containing assertions but don't want \nto have people install this plugin, insert this close to the top of \nyour file: \u003e\n\n    if !exists(':TAssert')\n        command! -nargs=* -bar -bang TAssert :\n        command! -nargs=* -bar -bang TAssertType :\n    endif\n\nAlternatively, use the |:TAssertComment| command.\n\n\n%s\n\n\nStatus:  Works for me (there may be some minor quirks)\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%2Ftassert_vim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftomtom%2Ftassert_vim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomtom%2Ftassert_vim/lists"}