{"id":16227644,"url":"https://github.com/leafoftree/vim-run","last_synced_at":"2026-01-21T10:37:16.487Z","repository":{"id":98920396,"uuid":"215474298","full_name":"leafOfTree/vim-run","owner":"leafOfTree","description":"Run any file and show output inside vim","archived":false,"fork":false,"pushed_at":"2024-03-09T06:47:11.000Z","size":36,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-07T20:12:32.024Z","etag":null,"topics":["cmd","file","run","vim"],"latest_commit_sha":null,"homepage":"","language":"Vim Script","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/leafOfTree.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2019-10-16T06:33:41.000Z","updated_at":"2023-02-15T07:35:56.000Z","dependencies_parsed_at":"2024-02-01T14:48:47.961Z","dependency_job_id":"6e02cbef-72c9-406e-885a-1321ffc99644","html_url":"https://github.com/leafOfTree/vim-run","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/leafOfTree/vim-run","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leafOfTree%2Fvim-run","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leafOfTree%2Fvim-run/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leafOfTree%2Fvim-run/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leafOfTree%2Fvim-run/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leafOfTree","download_url":"https://codeload.github.com/leafOfTree/vim-run/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leafOfTree%2Fvim-run/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28631937,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-21T04:47:28.174Z","status":"ssl_error","status_checked_at":"2026-01-21T04:47:22.943Z","response_time":86,"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":["cmd","file","run","vim"],"created_at":"2024-10-10T12:53:23.835Z","updated_at":"2026-01-21T10:37:16.470Z","avatar_url":"https://github.com/leafOfTree.png","language":"Vim Script","readme":"# vim-run\n\n\u003cp align=\"center\"\u003e\n\u003cimg alt=\"screenshot\" src=\"https://raw.githubusercontent.com/leafOfTree/leafOfTree.github.io/master/screenshot-run-c.png\" width=\"210\" /\u003e\n\u003cimg alt=\"screenshot\" src=\"https://raw.githubusercontent.com/leafOfTree/leafOfTree.github.io/master/screenshot-run-javascript.png\" width=\"186\" /\u003e\n\u003c/p\u003e\n\nRun any file and show output inside vim.\n\n## Usage\n\nWith config\n\n```vim\nlet g:run_mapping = 'go' \" default mapping\n\nlet g:run_cmd = {\n      \\'c':           'gcc -Wall -Wextra -std=c99 -pedantic',\n      \\'c_plus':      './a.out',\n      \\'java':        'javac -Xdiags:verbose -Xlint:unchecked',\n      \\'java_plus':   'java %:r',\n      \\'python':      'python',\n      \\'javascript':  'node',\n      \\'tsx':         'tsc --outFile %t %',\n      \\'tsx_plus':    'node %t',\n      \\'vim':         'source',  \n      \\}\n```\n\nOpen a `tmp.c` or `tmp.py` file and Press \u003ckbd\u003eg\u003c/kbd\u003e\u003ckbd\u003eo\u003c/kbd\u003e in NORMAL mode. Vim will run the file and split a window to display the output.\n\n## Installation\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003ca\u003eHow to install\u003c/a\u003e\u003c/summary\u003e\n\n- [VundleVim][1]\n\n        Plugin 'leafOfTree/vim-run'\n\n- [vim-pathogen][2]\n\n        cd ~/.vim/bundle \u0026\u0026 \\\n        git clone https://github.com/leafOfTree/vim-run --depth 1\n\n- [vim-plug][3]\n\n        Plug 'leafOfTree/vim-run'\n        :PlugInstall\n\n- Or manually, clone this plugin to `path/to/this_plugin`, and add it to `rtp` in vimrc\n\n        set rtp+=path/to/this_plugin\n\n\u003cbr /\u003e\n\u003c/details\u003e\n\nPlease stay up to date. Feel free to open an issue or a pull request.\n\n## Configuration\n\n#### `g:run_cmd`\n\n- `{ key: \u003cfiletype\u003e, value: \u003ccmd\u003e }`\n- `{ key: \u003cfiletype\u003e_plus, value: \u003ccmd\u003e }`\n\n- description:\n\n    Set `\u003ccmd\u003e` for `\u003cfiletype\u003e`. The filename is appended to the `\u003ccmd\u003e`. \n\n    - If there are special chars in `\u003ccmd\u003e`, they will be replaced with a proper value. Meanwhile the filename won't be appended to the `\u003ccmd\u003e`.\n\n      | Special chars | Value                       |\n      |---------------|-----------------------------|\n      | %             | Filename                    |\n      | %:r           | Filename without extension  |\n      | %t            | Temp filename given by vim  |\n\n    - Optional: set `\u003ccmd\u003e` for `\u003cfiletype\u003e_plus` which runs after the previous one. Useful when the previous only compiles the file.\n\n- type: `Dictionary`\n- default: `Undefined`\n- example: \n\n    ```vim\n    let markdown_to_html = 'pandoc \n          \\ --metadata title=\"%\" \n          \\ -c http://cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap.min.css \n          \\ -s % -o %:r.html'\n\n    let g:run_cmd = {\n          \\'c':             'gcc -Wall -Wextra -std=c99 -pedantic',\n          \\'c_plus':        './a.out',\n          \\'cpp':           'g++ -Wall -Wextra -pedantic',\n          \\'javascript':    'node',\n          \\'python':        'python',\n          \\'markdown':      markdown_to_html,\n          \\'markdown_plus': 'open %:r.html',\n          \\'vim':           'source',  \n          \\}\n    ```\n\nNote: you need to use `'source'` for `vim` files.\n\n#### `g:run_mapping`\n\n- description: key mapping to run the current file in Normal mode.\n- default: `'go'`\n- example: \n    \n    ```vim\n    let g:run_mapping = '\u003cF5\u003e'\n    ```\n\nOr you can map key as usual\n\n```vim\nnnoremap \u003cc-cr\u003e \u003cCmd\u003ecall run#Run()\u003ccr\u003e\ninoremap \u003cc-cr\u003e \u003cCmd\u003ecall run#Run()\u003ccr\u003e\n```\n\n#### `g:run_output_focus`\n\nFocus the output window. Default: `0`. (`0` or `1`).\n\n#### `g:run_output_scroll_bottom`\n\nLet the output window scroll to bottom. Default: `0`. (`0` or `1`).\n\n#### `g:run_output_vertically`\n\nSplit output window vertically. Default: `0`. (`0` or `1`).\n\n#### `g:run_debug`\n\nShow debug messages. Default: `0`. (`0` or `1`).\n\n## Custom output syntax highlighting\n\nYou can add `syntax/run-\u003cfiletype\u003e.vim` to custom `\u003cfiletype\u003e` output's syntax highlighting. Examples are `syntax/run-go.vim`, `syntax/run-c.vim`, ...\n\n[1]: https://github.com/VundleVim/Vundle.vim\n[2]: https://github.com/tpope/vim-pathogen\n[3]: https://github.com/junegunn/vim-plug\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleafoftree%2Fvim-run","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleafoftree%2Fvim-run","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleafoftree%2Fvim-run/lists"}