{"id":16984130,"url":"https://github.com/samtebbs33/vim-exec","last_synced_at":"2025-10-28T23:04:56.764Z","repository":{"id":70676732,"uuid":"46421308","full_name":"SamTebbs33/vim-exec","owner":"SamTebbs33","description":"Execute current file open in vim","archived":false,"fork":false,"pushed_at":"2016-04-12T00:26:09.000Z","size":23,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-14T20:47:40.679Z","etag":null,"topics":["vim","vim-plugin","vim-script"],"latest_commit_sha":null,"homepage":"","language":"VimL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SamTebbs33.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-11-18T13:43:10.000Z","updated_at":"2017-09-16T14:44:13.000Z","dependencies_parsed_at":"2023-04-17T22:17:51.192Z","dependency_job_id":null,"html_url":"https://github.com/SamTebbs33/vim-exec","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamTebbs33%2Fvim-exec","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamTebbs33%2Fvim-exec/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamTebbs33%2Fvim-exec/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamTebbs33%2Fvim-exec/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SamTebbs33","download_url":"https://codeload.github.com/SamTebbs33/vim-exec/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244890089,"owners_count":20527031,"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":["vim","vim-plugin","vim-script"],"created_at":"2024-10-14T02:30:10.243Z","updated_at":"2025-10-28T23:04:51.713Z","avatar_url":"https://github.com/SamTebbs33.png","language":"VimL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vim-exec\nA vim plugin that executes the current file.\n\n![](http://zippy.gfycat.com/MindlessExcellentAfricangroundhornbill.gif)\n\n# Contents\n* \u003ca href=\"#Installation\"\u003eInstallation\u003c/a\u003e\n* \u003ca href=\"#Usage\"\u003eUsage\u003c/a\u003e\n  * \u003ca href=\"#Key\"\u003eKey mapping\u003c/a\u003e\n  * \u003ca href=\"#Commands\"\u003eAdding commands\u003c/a\u003e\n  * \u003ca href=\"#Clearing\"\u003eClearing the terminal\u003c/a\u003e\n  * \u003ca href=\"#Vimux\"\u003eVimux/tmux support\u003c/a\u003e\n* \u003ca href=\"#Filetypes\"\u003eDefault filetypes\u003c/a\u003e\n\n\u003ca id=\"Installation\"\u003eInstallation\u003c/a\u003e\n=====================================\nInstall [pathogen](https://github.com/tpope/vim-pathogen), and then clone this repo into your `.vim/bundle` directory.\n```\ncd ~/.vim/bundle \u0026\u0026 git clone https://github.com/SamTebbs33/vim-exec\n```\n\n\u003ca id=\"Usage\"\u003eUsage\u003c/a\u003e\n=======================\n\u003ca id=\"Key\"\u003eKey mapping\u003c/a\u003e\n---------------------------\nThe default key mapping is to `F12`, which can be changed by reassigning `g:vim_exec_key` in your `.vimrc` and then calling `VimExecMap()`.\n```\n\" Map to \u003cleader\u003ee\nlet g:vim_exec_key = \"\u003cleader\u003ee\"\ncall VimExecMap()\n```\n\n\u003ca id=\"Commands\"\u003eAdding commands\u003c/a\u003e\n------------------------------------\nSome common commands are provided by default (run `:call VimExecCmds()` to see a list of those), but more can be added easily.\nThe variable that stores the commands is called `g:vim_exec_cmds` and is a dictionary, where the key is the filetype and the value is the command to execute.\nTo create a new command or override an existing one:\n```\nlet g:vim_exec_cmds[\"filetype\"] = \"cmd\"\n```\nWhere \"filetype\" is the filetype you want the command to apply to and \"cmd\" is the command itself. Use `%` to represent the path to the current file. Note that `:` is added to the beginning and `\u003cCR\u003e` is not needed at the end. Open a file of the filetype and press the key that is bound to VimExec to test the new command.\n\nIf you'd like to add a command that will be supplied by default, fork the repo, edit the `plugin/vim-exec.vim` file and add the filetype and command to the end of the `g:vim_exec_cmds` dictionary.\n```\nlet g:vim_exec_cmds = {..., \"new-filetype\" : \"new-comand\"}\n```\nThen open a pull request. I will merge the pull request if the change is relevant and doesn't do anything malicious to the user's system (i.e, no `rm -rf /*`)\n\n\u003ca id=\"Clearing\"\u003eClearing the terminal\u003c/a\u003e\n------------------------------------------\nBy default, VimExec will not clear the terminal screen (not the vim buffer window) before executing a command. To enable this:\n```\nlet g:vim_exec_clear = 1\n```\nTo change the command used to clear the screen (It is `clear` by default):\n```\nlet g:vim_exec_clearcmd = \"cls\"\n```\n\n\u003ca id=\"Vimux\"\u003eVimux/tmux support\u003c/a\u003e\n------------------------------------\nvim-exec can output to a tmux pane rather than the default terminal if [vimux](https://github.com/benmills/vimux) is installed. To enable this:\n```\nlet g:vim_exec_vimux = 1\n```\nYou must be runnign an instance of tmux in order for this to work.\n\n\u003ca id=\"Filetypes\"\u003eDefault filetypes\u003c/a\u003e\n======================================\nBelow is a list of the filetypes that are supported by default and their requirements (if there are any).\n* **Python**\n* **OCaml**\n* **VimScript**\n* **JavaScript**: Node.js\n* **HTML**\n* **Bash script**\n* **Haskell**: Ghci\n\nSee the \"Adding execution commands\" section for info on adding more filetypes. More will be added to the default set when they are thought of.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamtebbs33%2Fvim-exec","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamtebbs33%2Fvim-exec","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamtebbs33%2Fvim-exec/lists"}