Want to use Atom's handy
COMMIT_EDITMSG syntax highlighting?
Tired of waiting on Atom to open a new window with the
Together with sister Go package
git-commit-atom, this Atom package allows Git commit files to be conveniently edited in the current editor pane... avoiding the launch of another instance of Atom!
git-commit-atom(instructions on how to install here)
Installation of the package can be performed via Atom's Settings pane or on the command line via the Atom Package Manager.
apm install git-edit-atom
git-commit-atom repository for instructions on how to install the sister Go package.
git-edit-atom Atom package is installed and the
git-commit-atom Go package is configured as Git's editor, Git
.diff files will open in the current pane of Atom.
To complete the message editing process simply close the tab (
cmd-w is convenient) if the Atom package
git-edit-atom is configured to tag the "magic marker" on the end of that message file type.
If Atom is not configured to supply the "magic marker" on file close, simply enter
done followed by a return at the terminal.
The filetypes recognized by
git-edit-atom can be configured in the package settings.
git-rebase-todo files are targeted for tagging with the magic marker but
.diff files are not.
This project has two components: a standalone Go script that acts as the editor called by Git during the commit process and the Atom package
When the standalone Go script is activated, it opens the
COMMIT_EDITMSG file in the current Atom pane.
When that file is closed, Atom appends a "magic marker" (
## ATOM EDIT COMPLETE##) to the end of the
The Go script, which is listening to the end of the
COMMIT_EDITMSG file, recognizes the "magic marker" and terminates, ending the commit edit session.
In addition, the Go script listens for user input at the terminal.
The commit session can also be ended by entering
(This functionality allows the standalone script to function in some capacity without the Atom package in place).
This project is directly inspired by AJ Foster's
git-commit-atom.sh, presented on his personal blog.
It is hoped that this implementation in Go and as an Atom package will yield greater portability and reliability.
Good catch. Let us know what about this package looks wrong to you, and we'll investigate right away.