{"id":16659973,"url":"https://github.com/venantius/vim-cljfmt","last_synced_at":"2025-10-16T11:19:19.884Z","repository":{"id":26591142,"uuid":"30045842","full_name":"venantius/vim-cljfmt","owner":"venantius","description":"A Vim plugin for cljfmt, the Clojure formatting tool.","archived":false,"fork":false,"pushed_at":"2023-04-02T04:17:29.000Z","size":2020,"stargazers_count":153,"open_issues_count":10,"forks_count":22,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-08-31T12:41:40.390Z","etag":null,"topics":[],"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/venantius.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}},"created_at":"2015-01-29T23:08:01.000Z","updated_at":"2025-08-06T16:07:04.000Z","dependencies_parsed_at":"2024-01-05T21:52:04.791Z","dependency_job_id":"3d838b48-fc31-45ad-b35c-b0eeb5ffcfc9","html_url":"https://github.com/venantius/vim-cljfmt","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/venantius/vim-cljfmt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/venantius%2Fvim-cljfmt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/venantius%2Fvim-cljfmt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/venantius%2Fvim-cljfmt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/venantius%2Fvim-cljfmt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/venantius","download_url":"https://codeload.github.com/venantius/vim-cljfmt/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/venantius%2Fvim-cljfmt/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279182932,"owners_count":26121281,"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-10-16T02:00:06.019Z","response_time":53,"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":[],"created_at":"2024-10-12T10:27:21.379Z","updated_at":"2025-10-16T11:19:19.861Z","avatar_url":"https://github.com/venantius.png","language":"Vim script","funding_links":[],"categories":["Editor Plugins"],"sub_categories":[],"readme":"# vim-cljfmt\n\nvim-cljfmt is a vim plugin for [cljfmt](https://github.com/weavejester/cljfmt), the code formatting tool for Clojure(Script). Rather than invoking the plugin by shelling out to Leiningen, it uses a [vim-fireplace](https://github.com/tpope/vim-fireplace/) REPL connection to only format the current file. This has the advantage of sidestepping Leiningen's startup time and keeping Vim from hanging, though the first time you use it with a given REPL server there will be a slight delay as it loads the cljfmt namespace.\n\nDemo below:\n\n![](doc/demo.gif)\n\n## Configuration and Usage\n\nvim-cljfmt allows you to format the file in the current buffer with the following:\n\n```vim\n:Cljfmt\n```\n\nOf course, manually formatting files is for people who aren't lazy. So, by default, vim-cljfmt automatically does the formatting when you save. If you want to turn this off, add the following line to your `.vimrc`:\n\n```vim\nlet g:clj_fmt_autosave = 0\n```\n\nIf you need to pass custom configuration to cljfmt, you can do it like\nthis:\n\n```vim\nlet g:clj_fmt_config = '{:indentation? true, :remove-surrounding-whitespace? true, :remove-trailing-whitespace? true, :remove-consecutive-blank-lines? false, :insert-missing-whitespace? true, :align-associative? false, :indents {#\"^\\w\" [[:inner 0]], #\".*\" [[:inner 0]]}}'\n```\n\nTo format the code in current visual selection use the following command:\n\n```vim\n:'\u003c,'\u003eCljfmtRange\n```\n\n##### Re-starting the REPL while editing\n\nIf you expect the have to re-start the REPL while working, you have two options. You can manually re-load vim-cljfmt from within Vim with the following:\n\n```vim\n:CljfmtRequire\n```\n\nAlternatively, you can add the following line to your `~/.lein/profiles.clj`:\n\n```clojure\n:repl-options {:init (require 'cljfmt.core)}\n```\n\nThe latter will slow down your REPL startup time, but will mean you won't have to do any extra typing if you restart your REPL. Personally, I prefer this approach.\n\n## Installation\n\n### Requirements\n\nYou'll want to have [cljfmt](https://github.com/weavejester/cljfmt) and [vim-fireplace](https://github.com/tpope/vim-fireplace/) installed, and you'll need to make sure Cljfmt is somewhere on your project's classpath. I'd recommend adding the following to your `~/.lein/profiles.clj`:\n\n```clojure\n:dependencies [[cljfmt \"0.5.1\"]]\n```\n\nYou'll also need to have a REPL connection open through fireplace.\n\nAfter that, the rest should take care of itself.\n\n### Installing with Pathogen\n\nAssuming you already have [Pathogen](https://github.com/tpope/vim-pathogen) installed, you should be good to go with the following:\n\n```\ncd ~/.vim/bundle \u0026\u0026 \\\ngit clone https://github.com/venantius/vim-cljfmt.git\n```\n\n### Installing with Vundle\n\nTo install vim-cljfmt with [Vundle](https://github.com/gmarik/Vundle.vim), add the following line to your `.vimrc`:\n```\nBundle 'venantius/vim-cljfmt'\n```\n\n## Other Vim + Clojure Plugins\n\nIf you like this, you should check out [vim-eastwood](https://github.com/venantius/vim-eastwood)!\n\n## License\n\nCopyright (c) 2015 W. David Jarvis.\n\nLicensed under the Eclipse Public License, the same as Clojure.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvenantius%2Fvim-cljfmt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvenantius%2Fvim-cljfmt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvenantius%2Fvim-cljfmt/lists"}