{"id":16609576,"url":"https://github.com/artbit/vim-tmpl","last_synced_at":"2026-05-15T13:02:03.636Z","repository":{"id":23949707,"uuid":"27331471","full_name":"ArtBIT/vim-tmpl","owner":"ArtBIT","description":"VIM plugin for the custom bash templating function","archived":false,"fork":false,"pushed_at":"2022-05-13T08:32:26.000Z","size":19,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-04-04T13:06:14.851Z","etag":null,"topics":["shell","vim","vim-plugins"],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ArtBIT.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-11-30T10:05:48.000Z","updated_at":"2022-05-12T10:57:19.000Z","dependencies_parsed_at":"2022-08-22T07:50:58.040Z","dependency_job_id":null,"html_url":"https://github.com/ArtBIT/vim-tmpl","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/ArtBIT/vim-tmpl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArtBIT%2Fvim-tmpl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArtBIT%2Fvim-tmpl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArtBIT%2Fvim-tmpl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArtBIT%2Fvim-tmpl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ArtBIT","download_url":"https://codeload.github.com/ArtBIT/vim-tmpl/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArtBIT%2Fvim-tmpl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33067476,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-15T11:35:32.926Z","status":"ssl_error","status_checked_at":"2026-05-15T11:35:31.362Z","response_time":103,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["shell","vim","vim-plugins"],"created_at":"2024-10-12T01:29:09.345Z","updated_at":"2026-05-15T13:02:03.592Z","avatar_url":"https://github.com/ArtBIT.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Overview\n\nVIM-TMPL is a plugin with the custom bash templating function\n\n## Features\nYou can call the templates by running the following command:\n`:Tmpl html/html5`\n\nWorks best when used with snippets plugins like SnipMate ot UltiSnips.\n\n## Installation\nThere are several plugin managers for vim, which will either allow you to\nmanually clone vim plugin repositories, or will do so for you. Probably the\ntwo most popular ones currently are `pathogen\n\u003chttps://github.com/tpope/vim-pathogen\u003e`_ and `vundle\n\u003chttps://github.com/gmarik/Vundle.vim\u003e`_. Please refer to their docs for\ninstructions on how to install plugins.\n\n## Configuration\nYou can create your own templates directory with your own templates\n\n```\n   # i.e. in your $HOME\n   # \n   # $HOME/templates\n   # $HOME/templates/react\n   # $HOME/templates/react/jsx\n   #\n   # Just export the path in VIM_TMPL_TEMPLATES env var\n   export VIM_TMPL_TEMPLATES=$HOME/templates\n   \n   # And then in nvim\n   :Tmpl react/jsx \n```\n## Example template\n\nEach template is a simple bash script, and can follow this proposed structure\n```lang=sh\n#/bin/bash\n\n# Map positional arguments to varnames and set their default values\n# first argument is always filepath \ndeclare -A VARS=( [\"FILEPATH\"]=\"./Component/Component.js\" )\n\n# Map passed arguments to varnames\nfor VAR in \"${!VARS[@]}\"; do\n    VAL=${1:-${VARS[$VAR]}}\n    export $VAR=$VAL\n    shift\ndone\n\nPARENTDIR=$(basename $(dirname -- \"$FILEPATH\"))\nFILENAME=$(basename -- \"$FILEPATH\")\nEXTENSION=\"${FILENAME##*.}\"\nNAME=\"${FILENAME%.*}\"\n\n#--------Begin template-----------#\ncat $TEMPLATE \u003c\u003cEOF\nimport React from 'react'\n\ninterface Props {\n    className?: string;\n}\n\nconst ${NAME}:React.FC\u003cProps\u003e = ({className}) =\u003e {\n  return \u003cdiv className={className}\u003e\u003c/div\u003e\n}\n\nexport default ${NAME}\nEOF\n#--------End template-----------#\n\n```\n\n\n## License\n\nSee the [LICENSE](LICENSE) file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fartbit%2Fvim-tmpl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fartbit%2Fvim-tmpl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fartbit%2Fvim-tmpl/lists"}