{"id":13429316,"url":"https://github.com/preservim/nerdcommenter","last_synced_at":"2025-12-17T06:56:09.999Z","repository":{"id":385936,"uuid":"3287","full_name":"preservim/nerdcommenter","owner":"preservim","description":"Vim plugin for intensely nerdy commenting powers","archived":false,"fork":false,"pushed_at":"2025-11-19T08:24:44.000Z","size":1001,"stargazers_count":5011,"open_issues_count":100,"forks_count":446,"subscribers_count":59,"default_branch":"master","last_synced_at":"2025-11-19T10:14:39.066Z","etag":null,"topics":["comment","commenting","vim","vim-plugin","vim-plugins"],"latest_commit_sha":null,"homepage":"","language":"Vim Script","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/preservim.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","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,"zenodo":null},"funding":{"github":["alerque","scrooloose"]}},"created_at":"2008-03-10T08:19:15.000Z","updated_at":"2025-11-19T08:24:49.000Z","dependencies_parsed_at":"2023-07-05T14:44:54.911Z","dependency_job_id":"da07c4ab-2644-48d3-8135-c113aeaeb0cd","html_url":"https://github.com/preservim/nerdcommenter","commit_stats":{"total_commits":508,"total_committers":183,"mean_commits":"2.7759562841530054","dds":0.7618110236220472,"last_synced_commit":"3f860f2d981547c18f2c9599e3c358ea488c3be4"},"previous_names":["scrooloose/nerdcommenter"],"tags_count":21,"template":false,"template_full_name":null,"purl":"pkg:github/preservim/nerdcommenter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/preservim%2Fnerdcommenter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/preservim%2Fnerdcommenter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/preservim%2Fnerdcommenter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/preservim%2Fnerdcommenter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/preservim","download_url":"https://codeload.github.com/preservim/nerdcommenter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/preservim%2Fnerdcommenter/sbom","scorecard":{"id":744612,"data":{"date":"2025-08-11","repo":{"name":"github.com/preservim/nerdcommenter","commit":"02a3b6455fa07b61b9440a78732f1e9b7876c991"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.6,"checks":[{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":8,"reason":"Found 25/29 approved changesets -- score normalized to 8","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/reviewdog.yml:10: update your workflow using https://app.stepsecurity.io/secureworkflow/preservim/nerdcommenter/reviewdog.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/reviewdog.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/preservim/nerdcommenter/reviewdog.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/vint.yml:10: update your workflow using https://app.stepsecurity.io/secureworkflow/preservim/nerdcommenter/vint.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/vint.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/preservim/nerdcommenter/vint.yml/master?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/vint.yml:15","Info:   0 out of   3 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   0 out of   1 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/reviewdog.yml:1","Warn: no topLevel permission defined: .github/workflows/vint.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Creative Commons Zero v1.0 Universal: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 26 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-22T18:22:30.142Z","repository_id":385936,"created_at":"2025-08-22T18:22:30.142Z","updated_at":"2025-08-22T18:22:30.142Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27778950,"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","status":"online","status_checked_at":"2025-12-17T02:00:08.291Z","response_time":55,"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":["comment","commenting","vim","vim-plugin","vim-plugins"],"created_at":"2024-07-31T02:00:34.168Z","updated_at":"2025-12-17T06:56:09.962Z","avatar_url":"https://github.com/preservim.png","language":"Vim Script","readme":"# NERD Commenter\n\n[![Vint](https://github.com/preservim/nerdcommenter/workflows/Vint/badge.svg)](https://github.com/preservim/nerdcommenter/actions?workflow=Vint)\n\nComment functions so powerful—no comment necessary.\n\n## Installation\n\n### Via Plugin Manager (Recommended)\n\n\u003cdetails\u003e\n  \u003csummary\u003eVim Plug\u003c/summary\u003e\n    \n#### [Vim-Plug](https://github.com/junegunn/vim-plug)\n\n1. Add `Plug 'preservim/nerdcommenter'` to your vimrc file.\n2. Reload your vimrc or restart\n3. Run `:PlugInstall`\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eVundle\u003c/summary\u003e\n\n#### [Vundle](https://github.com/VundleVim/Vundle.vim) or similar\n\n1. Add `Plugin 'preservim/nerdcommenter'` to your vimrc file.\n2. Reload your vimrc or restart\n3. Run `:BundleInstall`\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eNeoBundle\u003c/summary\u003e\n  \n#### [NeoBundle](https://github.com/Shougo/neobundle.vim)\n\n1. Add `NeoBundle 'preservim/nerdcommenter'` to your vimrc file.\n2. Reload your vimrc or restart\n3. Run `:NeoUpdate`\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003ePathogen\u003c/summary\u003e\n  \n#### [Pathogen](https://github.com/tpope/vim-pathogen)\n\n```sh\ncd ~/.vim/bundle\ngit clone https://github.com/preservim/nerdcommenter.git\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eVim 8+ Packages\u003c/summary\u003e\n\n    git clone https://github.com/preservim/nerdcommenter.git ~/.vim/pack/vendor/start/nerdcommenter\n\u003c/details\u003e\n\n### Manual Installation\n\n\u003cdetails\u003e\n  \u003csummary\u003eUnix\u003c/summary\u003e\n  \n#### Unix\n\n(For Neovim, change `~/.vim/` to `~/.config/nvim/`.)\n\n```sh\ncurl -fLo ~/.vim/plugin/nerdcommenter.vim --create-dirs \\\n  https://raw.githubusercontent.com/preservim/nerdcommenter/master/plugin/nerdcommenter.vim\ncurl -fLo ~/.vim/doc/nerdcommenter.txt --create-dirs \\\n  https://raw.githubusercontent.com/preservim/nerdcommenter/master/doc/nerdcommenter.txt\ncurl -fLo ~/.vim/autoload/nerdcommenter.vim --create-dirs \\\n  https://raw.githubusercontent.com/preservim/nerdcommenter/master/autoload/nerdcommenter.vim\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eWindows\u003c/summary\u003e\n#### Windows (PowerShell)\n\n```powershell\nmd ~\\vimfiles\\plugin\nmd ~\\vimfiles\\doc\n$pluguri = 'https://raw.githubusercontent.com/preservim/nerdcommenter/master/plugin/nerdcommenter.vim'\n$docsuri = 'https://raw.githubusercontent.com/preservim/nerdcommenter/master/doc/nerdcommenter.txt'\n(New-Object Net.WebClient).DownloadFile($pluguri, $ExecutionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath(\"~\\vimfiles\\plugin\\nerdcommenter.vim\"))\n(New-Object Net.WebClient).DownloadFile($docsuri, $ExecutionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath(\"~\\vimfiles\\doc\\nerdcommenter.txt\"))\n```\n\u003c/details\u003e\n\n### Post Installation\n\nMake sure that you have filetype plugins enabled, as the plugin makes use of **|commentstring|** where possible (which is usually set in a filetype plugin). See **|filetype-plugin-on|** for details, but the short version is make sure this line appears in your vimrc:\n\n```sh\nfiletype plugin on\n```\n\n## Usage\n\n### Documentation\n\nPlease see the vim help system for full documentation of all options: `:help nerdcommenter`\n\n### Settings\n\nSeveral settings can be added to your vimrc to change the default behavior. Some examples:\n\n```vim\n\" Create default mappings\nlet g:NERDCreateDefaultMappings = 1\n\n\" Add spaces after comment delimiters by default\nlet g:NERDSpaceDelims = 1\n\n\" Use compact syntax for prettified multi-line comments\nlet g:NERDCompactSexyComs = 1\n\n\" Align line-wise comment delimiters flush left instead of following code indentation\nlet g:NERDDefaultAlign = 'left'\n\n\" Set a language to use its alternate delimiters by default\nlet g:NERDAltDelims_java = 1\n\n\" Add your own custom formats or override the defaults\nlet g:NERDCustomDelimiters = { 'c': { 'left': '/**','right': '*/' } }\n\n\" Allow commenting and inverting empty lines (useful when commenting a region)\nlet g:NERDCommentEmptyLines = 1\n\n\" Enable trimming of trailing whitespace when uncommenting\nlet g:NERDTrimTrailingWhitespace = 1\n\n\" Enable NERDCommenterToggle to check all selected lines is commented or not \nlet g:NERDToggleCheckAllLines = 1\n```\n\n### Default mappings\n\n\u003e **Note:** You can turn off settings default mappings to provide your own from scratch (look at the [Settings list](#settings) above)\n\nThe following key mappings are provided by default (there is also a menu provided that contains menu items corresponding to all the below mappings):\n\nMost of the following mappings are for normal/visual mode only. The **|NERDCommenterInsert|** mapping is for insert mode only.\n\n  * `[count]\u003cleader\u003ecc` **|NERDCommenterComment|**\n\n    Comment out the current line or text selected in visual mode.\n\n  * `[count]\u003cleader\u003ecn` **|NERDCommenterNested|**\n\n    Same as \u003cleader\u003ecc but forces nesting.\n\n  * `[count]\u003cleader\u003ec\u003cspace\u003e` **|NERDCommenterToggle|**\n\n    Toggles the comment state of the selected line(s). If the topmost selected line is commented, all selected lines are uncommented and vice versa.\n\n  * `[count]\u003cleader\u003ecm` **|NERDCommenterMinimal|**\n\n    Comments the given lines using only one set of multipart delimiters.\n\n  * `[count]\u003cleader\u003eci` **|NERDCommenterInvert|**\n\n    Toggles the comment state of the selected line(s) individually.\n\n  * `[count]\u003cleader\u003ecs` **|NERDCommenterSexy|**\n\n    Comments out the selected lines with a pretty block formatted layout.\n\n  * `[count]\u003cleader\u003ecy` **|NERDCommenterYank|**\n\n    Same as \u003cleader\u003ecc except that the commented line(s) are yanked first.\n\n  * `\u003cleader\u003ec$` **|NERDCommenterToEOL|**\n\n    Comments the current line from the cursor to the end of line.\n\n  * `\u003cleader\u003ecA` **|NERDCommenterAppend|**\n\n    Adds comment delimiters to the end of line and goes into insert mode between them.\n\n  * **|NERDCommenterInsert|**\n\n    Adds comment delimiters at the current cursor position and inserts between. Disabled by default.\n\n  * `\u003cleader\u003eca` **|NERDCommenterAltDelims|**\n\n    Switches to the alternative set of delimiters.\n\n  * `[count]\u003cleader\u003ecl` **|NERDCommenterAlignLeft**\n    `[count]\u003cleader\u003ecb` **|NERDCommenterAlignBoth**\n\n    Same as **|NERDCommenterComment|** except that the delimiters are aligned down the left side (`\u003cleader\u003ecl`) or both sides (`\u003cleader\u003ecb`).\n\n  * `[count]\u003cleader\u003ecu` **|NERDCommenterUncomment|**\n\n    Uncomments the selected line(s).\n\n## Motions\n\nWhile the plugin does not directly support motions, you can leverage its support for selections to do something very similar. For example, to add motions to toggle comments on the paragraph text object you could use:\n```vim\nnnoremap \u003csilent\u003e \u003cleader\u003ec} V}:call nerdcommenter#Comment('x', 'toggle')\u003cCR\u003e\nnnoremap \u003csilent\u003e \u003cleader\u003ec{ V{:call nerdcommenter#Comment('x', 'toggle')\u003cCR\u003e\n```\n\n## Contributions\n\nThis plugin was originally written in 2007 by [Martin Grenfell (@scrooloose)](https://github.com/scrooloose/). Lots of features and many of the supported filetypes have come from [community contributors](https://github.com/preservim/nerdcommenter/graphs/contributors). Since 2016 it has been maintained primarily by [Caleb Maclennan (@alerque)](https://github.com/alerque). Additional file type support, bug fixes, and new feature contributons are all welcome, please send them as Pull Requests on Github. If you can't contribute yourself please also feel free to open issues to report problems or request features.\n","funding_links":["https://github.com/sponsors/alerque","https://github.com/sponsors/scrooloose"],"categories":["Editor Utilities","HarmonyOS","Vim Script","Documentation Types"],"sub_categories":["Installing","Windows Manager","Code Documentation"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpreservim%2Fnerdcommenter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpreservim%2Fnerdcommenter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpreservim%2Fnerdcommenter/lists"}