Post ADdOAizlUpFb4BFZ44 by Zach777@fosstodon.org
(DIR) More posts by Zach777@fosstodon.org
(DIR) Post #ADcxQZtoNwYYj6ngNE by Zach777@fosstodon.org
2021-11-21T13:45:00Z
0 likes, 0 repeats
In #vim, is there a way to create a comment/note in a file that vim will remember but not save to the file? I would like to add personal thoughts to a file without having to remove them before saving.
(DIR) Post #ADd3ufVggiEGXbFQvI by charims@social.pcwideopen.com
2021-11-21T14:57:34.854611Z
0 likes, 0 repeats
@Zach777 maybe open another file in a 2nd pane? vim can open multiple files at once.
(DIR) Post #ADdF4Zzj9FUzpJE9Ts by samir@fosstodon.org
2021-11-21T17:02:41Z
0 likes, 0 repeats
@Zach777 one option (not exactly what you’re asking for) is to put a keyword or character in those lines and then remove them before saving by matching on that patternhttps://vim.fandom.com/wiki/Delete_all_lines_containing_a_pattern
(DIR) Post #ADdO6EeYMj6HntBhPE by Zach777@fosstodon.org
2021-11-21T18:43:51Z
0 likes, 0 repeats
@samir A good idea. I might be able to make an automated system for it too. Thanks.
(DIR) Post #ADdOAizlUpFb4BFZ44 by Zach777@fosstodon.org
2021-11-21T18:44:40Z
0 likes, 0 repeats
@charims This has been my current solution for a while. Although having it directly in the file visually speaking is more convenient.
(DIR) Post #ADdPsesQGly4zOKRUG by charims@social.pcwideopen.com
2021-11-21T19:03:49.134498Z
0 likes, 0 repeats
Great idea @samir@Zach777 adding on top of that, using diff and patch, you may be able to automate storing your comments in a diff file(save to file2, remove lines, save to originalfile, then diff), and then applying the patch when you reopen it. Then you have your own personal in-file private note-taking system.