{"id":15020920,"url":"https://github.com/lixuannan/voim","last_synced_at":"2026-01-20T09:02:56.411Z","repository":{"id":253499065,"uuid":"843693682","full_name":"Lixuannan/VOIM","owner":"Lixuannan","description":"A Vim Plugin - Vim OI Improve","archived":false,"fork":false,"pushed_at":"2024-10-13T11:36:06.000Z","size":1620,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-15T20:57:12.099Z","etag":null,"topics":["acm-icpc","oi","plugin","vim","vim-plugin"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Lixuannan.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":"2024-08-17T06:07:08.000Z","updated_at":"2024-10-22T10:45:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"852f2015-4bc0-4ebc-abc7-582965768762","html_url":"https://github.com/Lixuannan/VOIM","commit_stats":{"total_commits":58,"total_committers":1,"mean_commits":58.0,"dds":0.0,"last_synced_commit":"4abfda73ccc39401e058f9504ca85e1a36aaf81f"},"previous_names":["lixuannan/voim"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lixuannan%2FVOIM","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lixuannan%2FVOIM/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lixuannan%2FVOIM/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lixuannan%2FVOIM/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Lixuannan","download_url":"https://codeload.github.com/Lixuannan/VOIM/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248281425,"owners_count":21077423,"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":["acm-icpc","oi","plugin","vim","vim-plugin"],"created_at":"2024-09-24T19:55:51.252Z","updated_at":"2026-01-20T09:02:56.404Z","avatar_url":"https://github.com/Lixuannan.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# VOIM - Vim OI Improve\n\n[ENG](./README.md) | [中文](./README_zh.md)\n\nThis is a Vim plugin.\n\n这是一个 VIM 插件。\n\n## Warning\n\nThings you have to know: this plugin only support Unix-like Operating System.\n\nIf your file name contains space, you are on your own.\n\nThis plugin is stilling in development, it may contain lots of bugs.\n\n## Features\n\nThis plugin is designed to provide a more convenient Vim experience for OIers with the following features:\n\n- One-click Compile and Run (implemented, currently supports C/C++ and Python)\n- One-click Sample Testing (based on Competitive Companion, completed)\n- One-click Compile and Debug (requires Insight support if you use default setting)\n\n## Installation\n\nInstalling this plugin is very straightforward. Simply add it to your plugin list. The good news is that this plugin currently supports almost all plugin managers.\n\nIf you are using vim-plug, you can add the following to your `.vimrc`:\n\n```vimrc\ncall plug#begin('~/.vim/plugged')\n  Plug 'lixuannan/VOIM'\ncall plug#end()\n```\n\nThen, run the command `:PlugInstall` in Vim. To update the plugin, use the command `:PlugUpdate` in Vim.\n\nDue to the plugin's specific nature, regardless of the plugin manager you use, you need to use the `:UpdateVOIM` command to update the necessary runtime components of VOIM along with the corresponding plugin manager's update command.\n\n## Configuration\n\nWe define a command for one-click compile and run as `:RunCode`, and a command for one-click sample testing as `:JudgeCode`, and a command for one-click debug as `:DebugCode`. If you want to customize the shortcuts, you can add the following to your `.vimrc`:\n\n```vimrc\n\" Set global shortcuts, where % represents the current file name\nmap \u003cF5\u003e :RunCode %\u003cCR\u003e\n\" Set insert mode shortcuts\nimap \u003cF5\u003e \u003cesc\u003e :RunCode %\u003cCR\u003e\n\" Set visual mode shortcuts\nvmap \u003cF5\u003e \u003cesc\u003e :RunCode %\u003cCR\u003e\n\nmap \u003cF6\u003e :JudgeCode %\u003cCR\u003e\nimap \u003cF6\u003e \u003cesc\u003e :JudgeCode %\u003cCR\u003e\nvmap \u003cF6\u003e \u003cesc\u003e :JudgeCode %\u003cCR\u003e\n\nmap \u003cF7\u003e :DebugCode %\u003cCR\u003e\nimap \u003cF7\u003e \u003cesc\u003e :DebugCode %\u003cCR\u003e\nvmap \u003cF7\u003e \u003cesc\u003e :DebugCode %\u003cCR\u003e\n```\n\nIn the latest version of the plugin, we support custom compilers and compilation parameters. You can create a file `.VOIM.conf` in the user's `HOME` directory and write your configuration there. The following file shows the default configuration:\n\n```cpp\n# C compiler\nC_COMPILER = \"gcc\"\n# C++ compiler\nCPP_COMPILER = \"g++\"\n# Python interpreter\nPYTHON_INTERPRETER = \"python\"\n# C compilation options\nC_ARGV = \"-Wextra -g\"\n# C++ compilation options\nCPP_ARGV = \"-Wextra -g\"\n# Debugger command\nDEBUGGER = \"insight\"\n```\n\n## Usage Help\n\nIf you receive the error `Unsupport filetype detected, run failed` but your code file extension is correct, please check if your cursor is on the file you need.\n\n### One-click Compile and Run\n\nIf your file is correct, pressing the configured shortcut or entering the command `:RunCode /some/code/file.cpp` will automatically compile and run the program according to the configuration. It will usually output all compilation information, including warnings and errors. After compilation, the program will run automatically, and you can interact with your code as usual.\n\nAfter the compilation and running, the plugin will output the return value of your code and the runtime for debugging purposes.\n\n![](./demo/demo-run-code.gif)\n\n### One-click Sample Testing\n\nThis feature requires the Competitive Companion browser plugin. You can visit its [GitHub repository](https://github.com/jmerle/competitive-companion) or install it from the plugin application store.\n\nWhen you need this feature, you can press the shortcut or enter the command `:JudgeCode /some/code/file.cpp`. If the plugin detects previously saved data files, it will directly test the code. If not, the program will prompt you to open the browser. At this point, you need to open the browser and click on the Competitive Companion plugin. The browser plugin will send the data to VOIM, which will then handle the data, compile, and test it.\n\nAfter testing, the results may include:\n\n- Accept, which means passed\n- Time Limit Exceeded, which means time exceeded\n- Runtime Error, which means runtime error\n- Wrong Answer, which means incorrect answer\n\nNote that this plugin does not support MLE (Memory Limit Exceeded) penalties. Additionally, TLE (Time Limit Exceeded) penalties are based on Real Time, not CPU Time. For debugging convenience, RE (Runtime Error) reports will provide return values and possible errors, but correctness is not guaranteed and is for reference only.\n\n![](./demo/demo-judge-code.gif)\n\n### One-click Compile and Debug\n\nThis feature requires the Insight software. You can search online for *how to install Insight debugger* to find installation instructions. Here are some common installation commands for various systems:\n\n#### Arch Linux\n\n```bash\nyay -S insight\n```\n\nAfter installation, you only need to call `:DebugCode /some/code/file.cpp` or press your configured shortcut to compile and debug. You can search online for instructions on how to use Insight software.\n\n![](./demo/demo-debug-code.gif)\n\n### Clean Cache\n\nYou can use command `:CleanCache /some/code/file.cpp` to clean build cache and data.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flixuannan%2Fvoim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flixuannan%2Fvoim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flixuannan%2Fvoim/lists"}