Phantom Inline Comment
Add visible inline-comments, which do not swear the source code as phantom.
You can add inline-comments which can be visible but does not affect the source code, i.e. even if you write comments, no changes will be made in the source code.
This package is useful when leaving a little note on the source code for yourself.
For example, when you write codes totally from scratch or when you read complex codes.
git clone and edit your init.el as below.
(require 'phantom-inline-comment) (add-to-list 'load-path "YOUR PATH")
Add/Edit a phantom comment
Add or Edit one phantom under a line of the cursor.
After edit-buffer popups, you can write it.
C-c C-c to apply changes and
C-g to cancel.
Delete a specific phantom comment
Delete one phantom under a line of the cursor.
Delete All phantom comments
Delete all the phantoms.
Show All phantom comments
Show all the phantoms.
Then select a file and
RET to jump to the phantom comment.
Fold/Unfold All the phantom comments
Fold or Unfold all the phantoms.
Since this package uses
overlay, the phantom inline comment is not persisted.
After you quit emacs, the phantom inline comment you created will disappear.
To solve this problem, see Experimental section below.
Experimental: Persistent Phantoms
It's only experimental functions and not recommended.
In init.el, you can add settings as bellow.
;; Save phantom-inline-comments when quit Emacs (phantom-inline-comment-auto-save-mode t) ;; Restore phantom-inline-comments when open files (add-hook 'SOME-MODE-hook 'phantom-inline-comment-auto-restore-mode)
It allows you to save all the comments into the data-file
~/.phantom-inline-comment if it exists), before you quit Emacs.
And when you open the file you added comments, automatically the data-file will be loaded and the comments will be added again.