{"id":18850342,"url":"https://github.com/corochann/singlefileexecutionplugin","last_synced_at":"2025-04-14T09:22:03.029Z","repository":{"id":49407947,"uuid":"58621871","full_name":"corochann/SingleFileExecutionPlugin","owner":"corochann","description":"Single File Execution Plugin is a plugin for CLion (C/C++ IDE on IntelliJ platform provided by Jetbrain).","archived":false,"fork":false,"pushed_at":"2020-12-28T01:53:14.000Z","size":79,"stargazers_count":84,"open_issues_count":12,"forks_count":15,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-27T22:42:58.687Z","etag":null,"topics":["clion","cmakelists","cpp","intellij","jetbrains"],"latest_commit_sha":null,"homepage":null,"language":"Java","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/corochann.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":"2016-05-12T08:15:54.000Z","updated_at":"2025-03-13T16:44:10.000Z","dependencies_parsed_at":"2022-08-31T03:51:11.799Z","dependency_job_id":null,"html_url":"https://github.com/corochann/SingleFileExecutionPlugin","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/corochann%2FSingleFileExecutionPlugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corochann%2FSingleFileExecutionPlugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corochann%2FSingleFileExecutionPlugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corochann%2FSingleFileExecutionPlugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/corochann","download_url":"https://codeload.github.com/corochann/SingleFileExecutionPlugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248852194,"owners_count":21171844,"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":["clion","cmakelists","cpp","intellij","jetbrains"],"created_at":"2024-11-08T03:28:55.302Z","updated_at":"2025-04-14T09:22:02.990Z","avatar_url":"https://github.com/corochann.png","language":"Java","readme":"# SingleFileExecutionPlugin\n[CLion](https://www.jetbrains.com/clion/) plugin to execute single file .c/.cpp file quickly.\n\n## Description\nCLion is a C/C++ IDE on [IntelliJ IDEA](https://www.jetbrains.com/idea/) platform provided by [JetBrains](https://www.jetbrains.com/).\n\nCLion is working on CMake platform, so when you want to run a single file with main() function you need to configure CMakeLists.txt file everytime.\nThis plugin helps you to add a configuration to quickly run a single .c/.cpp file.\n\nLinks\n\n - **[Document page](http://corochann.com/projects/single-file-execution-plugin)**: for more detail information.\n - **[Official plugin page](https://plugins.jetbrains.com/plugin/8352?pr=)**\n\n\u003ch2\u003eInstallation\u003c/h2\u003e\n\u003cp\u003eC/C++ Single File Execution plugin is uploaded on JetBrains repositry, so you can download by navigating [File] → [Settings] → [Plugins] tab → click [Browse repositries...] in CLion.\u003c/p\u003e\n\u003cp\u003eYou can find and install C/C++ Single File Execution plugin.\u003c/p\u003e\n\u003cp\u003e\u003ca href=\"https://plugins.jetbrains.com/files/8352/screenshot_15874.png\"\u003e\u003cimg class=\"aligncenter size-full wp-image-939\" src=\"https://plugins.jetbrains.com/files/8352/screenshot_15874.png\" alt=\"install_form_repositry\" width=\"836\" height=\"701\" /\u003e\u003c/a\u003e\u003c/p\u003e\n\u003cp\u003e\u0026nbsp;\u003c/p\u003e\n\u003ch2\u003eHow to use\u003c/h2\u003e\n\u003col\u003e\n\u003cli\u003eCreate or show C/C++ source code you want to run on the editor.\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eRight click\u003c/strong\u003e on the editor.\u003c/li\u003e\n\u003cli\u003eSelect \"Add executable for single c/cpp file\".\u003c/li\u003e\n\u003c/ol\u003e\n\u003cp\u003eThat's all! Plugin automatically insert \u003ccode\u003eadd_executable\u003c/code\u003e to \u003ccode\u003eCMakeLists.txt\u003c/code\u003e with proper path for you.\u003c/p\u003e\n\u003cp\u003e\u003ca href=\"https://plugins.jetbrains.com/files/8352/screenshot_15875.png\"\u003e\u003cimg class=\"aligncenter size-large wp-image-945\" src=\"https://plugins.jetbrains.com/files/8352/screenshot_15875.png\" alt=\"sample_example2\" width=\"700\" height=\"335\" /\u003e\u003c/a\u003e\u003c/p\u003e\n\u003cp\u003eAfter that, you can start coding and once it's done, run it by selecting proper executable name on the top-right panel in CLion.\u003c/p\u003e\n\u003cp\u003e\u003ca href=\"https://plugins.jetbrains.com/files/8352/screenshot_15878.png\"\u003e\u003cimg class=\"aligncenter size-large wp-image-946\" src=\"https://plugins.jetbrains.com/files/8352/screenshot_15878.png\" alt=\"sample_example_run_bar\" width=\"700\" height=\"336\" /\u003e\u003c/a\u003e\u003c/p\u003e\n\u003ch2\u003eConfiguration\u003c/h2\u003e\n\u003cp\u003e\u003ca href=\"https://plugins.jetbrains.com/files/8352/screenshot_15900.png\"\u003e\u003cimg class=\"aligncenter size-large wp-image-958\" src=\"https://plugins.jetbrains.com/files/8352/screenshot_15900.png\" alt=\"single_file_execution_settings_v120\" width=\"700\" height=\"471\" /\u003e\u003c/a\u003e\u003c/p\u003e\n\u003cp\u003eLittle configuration is available from [File]  → [Settings] → [Tools] tab \u0026gt; [Single File Execution Plugin].\u003c/p\u003e\n\u003ch3\u003eexecutable name\u003c/h3\u003e\n\u003cp\u003eYou may specify the executable name. As a default with \u003ccode\u003e%FILENAME%\u003c/code\u003e, it will use a name depending on the source code file name. In this case, every time you add a new source code and insert \u003ccode\u003eadd_executable\u003c/code\u003e, new executable name will be added. Build configuration tab can be messy in this case as the number of files increases.\u003c/p\u003e\n\u003cp\u003eAnother way is to use \"fixed\" executable name here (not use \u003ccode\u003e%FILENAME%\u003c/code\u003e), in that case you can always run single source code file with same executable name.\u003c/p\u003e\n\u003ch3\u003eruntime output directory\u003c/h3\u003e\n\u003cp\u003eYou can also specify a directory where the executable file will be stored after build.\u003c/p\u003e\n\u003cp\u003eFor example, when you set \u003ccode\u003e%FILEDIR%\u003c/code\u003e, executable file will be located in the same directory of source file. This configuration is especially useful when your source code reads/writes another file which is located in same directory of the source file.\u003c/p\u003e\n\u003cp\u003eConcrete example is for programming contest. You may want to read the input data from another text file. You can just place the input data text file in the same directory of source file, and just write below\u003c/p\u003e\n\u003cpre class=\"lang:c++ decode:true\"\u003eint main() {\n    freopen(\"input_data.txt\", \"r\", stdin);\n\n    ...\n\n}\u003c/pre\u003e\n\u003cp\u003eyou can now build and run this program by pressing \"run\" button on CLion.\u003c/p\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcorochann%2Fsinglefileexecutionplugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcorochann%2Fsinglefileexecutionplugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcorochann%2Fsinglefileexecutionplugin/lists"}