consult-vc-modified-files
provides a easy way to list Git-tracked files that have been modified, newly added, or are part of the HEAD commit in a project.
It integrates with Emacs' built-in vc and project libraries, as well as the consult package for navigation.
- View locally modified and newly added files in the current Git project.
- List files from the HEAD commit.
- Customize sources for specific use cases.
- Navigate the open files with
consult
.
Using use-package
and MELPA
(use-package consult-vc-modified-files
:bind
;; choose any other key binding you prefer
("C-x v /" . consult-vc-modified-files))
Call the interactive function consult-vc-modified-files
, or use a key binding
like C-x v /
(if configured with the configuration above).
When invoked, the command show a prompt for selecting files based on customizable sources:
- Modified locally: Lists locally modified or untracked files.
- Modified in HEAD: Lists files modified in the HEAD commit.
You can customize the available sources using the
consult-vc-modified-files-sources
variable.
Customize consult-vc-modified-files-sources
to control which file categories appear in the selection. For example:
(setq consult-vc-modified-files-sources
'(consult-vc-modified-source-files
consult-vc-modified-source-head-files))
Adjust the appearance of listed files by customizing:
consult-vc-modified-files-face
: For locally modified files.consult-vc-modified-head-files-face
: For files modified in HEAD.
- Fediverse: @chmouel@chmouel.com
- Twitter: @chmouel
- Blog: https://blog.chmouel.com
This project is licensed under the GPL-3.0.