{"id":14978952,"url":"https://github.com/sago35/tinygo-edit","last_synced_at":"2025-10-28T14:30:41.529Z","repository":{"id":57531091,"uuid":"262722600","full_name":"sago35/tinygo-edit","owner":"sago35","description":"Add an environment variable for tinygo and open the editor","archived":false,"fork":false,"pushed_at":"2022-09-02T11:22:32.000Z","size":1511,"stargazers_count":13,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-09-29T02:06:03.687Z","etag":null,"topics":["bash","tinygo","vim","zsh"],"latest_commit_sha":null,"homepage":"","language":"Go","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/sago35.png","metadata":{"files":{"readme":"README.md","changelog":"Changes.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-05-10T05:59:00.000Z","updated_at":"2024-07-27T21:05:02.000Z","dependencies_parsed_at":"2022-09-05T08:00:14.095Z","dependency_job_id":null,"html_url":"https://github.com/sago35/tinygo-edit","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sago35%2Ftinygo-edit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sago35%2Ftinygo-edit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sago35%2Ftinygo-edit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sago35%2Ftinygo-edit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sago35","download_url":"https://codeload.github.com/sago35/tinygo-edit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219859520,"owners_count":16556036,"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":["bash","tinygo","vim","zsh"],"created_at":"2024-09-24T13:58:42.320Z","updated_at":"2025-10-28T14:30:41.083Z","avatar_url":"https://github.com/sago35.png","language":"Go","readme":"# tinygo-edit\n\nAdd an environment variable for tinygo and open the editor.  \nUsing tinygo-edit, you can easily integrate with gopls.  \n\n## Description\n\n### Vim\n\n![tinygo-edit-with-vim](tinygo-edit-with-vim.gif)\n\nIf you are using Vim, you had better read the following.\n\n* https://github.com/sago35/tinygo.vim\n\n### VSCode\n\n![tinygo-edit-with-code](tinygo-edit-with-code.gif)\n\nIf you are using VSCode, you had better read the following.\n\n* https://marketplace.visualstudio.com/items?itemName=tinygo.vscode-tinygo\n\n### Bash/ZSH Shell Completion\n\nBy default, all flags and commands/subcommands generate completions internally.  \nYou can enable autocompletion by setting the following to `~/.bashrc` etc.  \n\n```\n$ eval \"$(tinygo-edit --completion-script-bash)\"\n```\n\nOr for ZSH\n\n```\n$ eval \"$(tinygo-edit --completion-script-zsh)\"\n```\n\n* https://github.com/alecthomas/kingpin#bashzsh-shell-completion\n\n## Usage\n\n```\nusage: tinygo-edit [\u003cflags\u003e]\n\nFlags:\n  -h, --help            Show context-sensitive help (also try --help-long and\n                        --help-man).\n      --editor=\"vim\"    editor path\n      --wait            wait for the editor to close\n      --without-goroot  don't use proper GOROOT\n      --target=TARGET   target name\n      --version         Show application version.\n```\n\nNow you can use tinygo-edit.  \nIt works with or without go.mod, so you can work with gopls very simply.  \n\n```\n# Vim\n$ tinygo-edit --target xiao --editor vim --wait\n\n# gVim\n$ tinygo-edit --target xiao --editor gvim\n\n# VSCode\n$ tinygo-edit --target xiao --editor code\n```\n\n## Usage (with TinyGo older than 0.15)\n\n*deprecated : To be removed in 0.3.0*\n\nIf you want to use TinyGo older than 0.15, you can disable it with the following  \n\n```\n$ tinygo-edit --without-goroot --target xiao --editor code\n```\n\nIf it doesn't work, please try the following  \n\n1. Remove go.mod in the current dir\n2. If $TINYGOPATH/go.mod exists, delete it.\n3. Restart tinygo-edit.\n\nIf you don't want to remove the go.mod, try the following page  \n\n* https://github.com/tinygo-org/tinygo-site/pull/107\n  * https://deploy-preview-107--tinygo.netlify.app/ide-integration/\n\n## Installation\n\nTo install, run:\n```\ngo install github.com/sago35/tinygo-edit@latest\n```\nBe sure that you have added your GOBIN to the PATH.\nYou can find your GOBIN by running ```go env```.\n\n### If GOBIN is empty\nThe command below should be added to your ```.bashrc``` or ```.zshrc```.\n```\nexport PATH=\"$GOPATH/bin/:$PATH\"\n```\n### If GOBIN is not empty\nThe command below should be added to your ```.bashrc``` or ```.zshrc```.\n```\nexport PATH=\"$GOBIN:$PATH\"\n```\n## Build\n\n```\ngo build\n```\n\n### Environment\n\n* go\n* kingpin.v2\n* tinygo 0.15\n\n## FAQ\n\n### I can't \"tinygo build\" in a vim opened by tinygo-edit.\n\nYou can use the `unset GOROOT` command, which will allow you to build.\n\n## Author\n\nsago35 - \u003csago35@gmail.com\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsago35%2Ftinygo-edit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsago35%2Ftinygo-edit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsago35%2Ftinygo-edit/lists"}