{"id":18999087,"url":"https://github.com/crossr/vim-fhicl","last_synced_at":"2026-06-19T06:32:47.035Z","repository":{"id":139441753,"uuid":"155978383","full_name":"CrossR/vim-fhicl","owner":"CrossR","description":"Helpers for FHICL Files in Vim + Neovim.","archived":false,"fork":false,"pushed_at":"2021-10-04T11:21:04.000Z","size":40,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-19T04:47:30.141Z","etag":null,"topics":["fermilab","larsoft","neovim","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CrossR.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":"2018-11-03T11:52:45.000Z","updated_at":"2023-08-29T14:32:11.000Z","dependencies_parsed_at":"2023-04-03T22:17:16.900Z","dependency_job_id":null,"html_url":"https://github.com/CrossR/vim-fhicl","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/CrossR/vim-fhicl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CrossR%2Fvim-fhicl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CrossR%2Fvim-fhicl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CrossR%2Fvim-fhicl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CrossR%2Fvim-fhicl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CrossR","download_url":"https://codeload.github.com/CrossR/vim-fhicl/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CrossR%2Fvim-fhicl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34520431,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-19T02:00:06.005Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["fermilab","larsoft","neovim","vim"],"created_at":"2024-11-08T17:49:16.793Z","updated_at":"2026-06-19T06:32:47.019Z","avatar_url":"https://github.com/CrossR.png","language":"Vim script","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vim-fhicl\n\nHelpers for [FHICL](https://cdcvs.fnal.gov/redmine/projects/fhicl/wiki) Files in Vim + Neovim.\n\nThe demo below shows the opening of various fhicl files over CVMFS, syntax highlights, and \n[FZF](https://github.com/junegunn/fzf.vim) powered search.\n\nhttps://user-images.githubusercontent.com/10038688/135842553-3f030d64-31be-4964-b9da-7df5dffbda34.mov\n\n### Features\n\n * Adds basic syntax highlighting to `.fcl` files.\n    * Highlight keywords like `physics`, `analyzers` to flag up typos.\n    * Properly colour `#include` statements, comments and numbers.\n * Helper functions, with the default keybind:\n    * Follow `#include` statement to `fcl` file → `\u003cLeader\u003e-ff`.\n    * Find all files that include the current one  → `\u003cLeader\u003e-fi`.\n    * List all `fcl` files in `FHICL_FILE_PATH` → `\u003cLeader\u003e-fa`.\n    * Search contents of all `fcl` files → `\u003cLeader\u003e-fs`.\n      * Search and list function requires `fzf`, https://github.com/junegunn/fzf.vim\n * Update the `commentstring` variable for `.fcl` files, so commenting plugins work.\n * Sets the `JSON` indentation rules for the `.fcl` files, to give more intelligent auto indentation.\n    * **TODO:** Check and update this logic to make sure it works nicely for all files, and all styles of line.\n\n### Usage\n\nOnce installed, syntax highlighting should be applied automatically for all\n`.fcl` files.\n\nPressing `\u003cleader\u003e-ff` on any `#include` statement (`leader`\ndefaults to `\\`, such that `\\` then `ff` calls the function) will search for and\nthen open the corresponding `fcl` file. If multiple results are found, the\nLocation List will be populated, which can be navigated like normal and a selected\nfile opened with `Enter`.\n\nOnce finished with a file, pressing `Backspace` will navigate back to the parent file.\n\nSimilarly, `\u003cleader\u003e-fi` will search for all files that `#include` the current `fcl` file.\nThe results will be populated into a Location List, or an FZF search if installed.\n\n`\u003cleader\u003e-fa` will populate the location list (or FZF) with every `fcl` file that can be found.\n\n`\u003cleader\u003e-fs` will populate FZF with the content of every `fcl` file, such that they can all\nbe searched through.\n\n### Installation\n\nCan be installed with `vim-plug` or any other similar package manager with:\n\n```vim\nPlug 'CrossR/vim-fhicl'\n```\n\n### Config Options\n\n```vim\n\" Controls if the current directory should be searched.\n\" Defaults to 0, set to 1 to search it.\nlet g:vim_fhicl#search_current = 0\n\n\" Controls when the search stops.\n\" Defaults to 'all' which means get all results.\n\" If set to 'first', will break after finding one match.\nlet g:vim_fhicl#search_setting = \"all\"\n\n\" Controls if the first file should be opened.\n\" If multiple results are found, the results are\n\" sent to the location list. If this option is set,\n\" the first file will be opened as well.\n\" Defaults to 0, set to 1 to open it every time.\nlet g:vim_fhicl#always_open_first = 0\n\n\" Controls if the given file should be opened.\n\" If set to 1, when invoking the plugin on an include line,\n\" the results will always be sent to the location list, and\n\" never opened.\n\" Defaults to 0, set to 1 to never open a file and only populate\n\" the location list.\nlet g:vim_fhicl#dont_open_file = 0\n\n\" The command used to search for files that include the current one.\n\" If replaced, the command should be passed with any flags needed for\n\" recursive running, as well as only returning files.\n\" Defaults to using \"grep -r\".\n\" To use ripgrep, instead use \"rg --type-add 'fcl:*.fcl' -tfcl\".\nlet g:vim_fhicl#search_command = \"grep -lr\"\n\n\" The command used to find files.\n\" If replaced, the command should be passed with any flags needed for\n\" recursive running, as well as only returning files.\n\" Defaults to using \"find\", and due to the command setup, only find\n\" replacements will work easily. Code could be updated to instead take a full\n\" command, not just an executable.\nlet g:vim_fhicl#find_command = \"find\"\n```\n\n### Custom Binds\n\n```vim\n\" Remap the follow function with the following.\n\" Replace \u003cleader\u003e-ff with the correct bind.\n\" ff -\u003e Follow Fhicl\nnmap \u003cleader\u003e-ff \u003cPlug\u003evim-fhiclFindFhiclFile\n\n\" Remap the swap back function with the following.\n\" Replace \u003cBS\u003e with the correct bind.\nnmap \u003cBS\u003e \u003cPlug\u003evim-fhiclSwapToPrevious\n\n\" Remap the search include function with the following.\n\" Replace \u003cleader\u003e-fi with the correct bind.\n\" fi -\u003e Fhicl Include / Find Include\nnmap \u003cleader\u003e-fi \u003cPlug\u003evim-fhiclFindIncludes\n\n\" Remap the search through all file names with the following.\n\" Replace \u003cleader\u003e-fa with the correct bind.\n\" fa -\u003e Find all / Fhicl All\nnmap \u003cleader\u003e-fa \u003cPlug\u003evim-fhiclFindAll\n\n\" Remap the search through all files.\n\" Replace \u003cleader\u003e-fs with the correct bind.\n\" fs -\u003e Fhicl Search\nnmap \u003cleader\u003e-fs \u003cPlug\u003evim-fhiclSearchAll\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrossr%2Fvim-fhicl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcrossr%2Fvim-fhicl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrossr%2Fvim-fhicl/lists"}