Sunday, April 6, 2008

Some musings from ~/Music/Playlists/manager/ideas.outline. The file outlines a format for the stored records and as much of the scripts operation as my mind can think of right now, it is 0420 already...

tags file format
| every song listed as 'file := checksum'

daemon/script
| for all files in collection loop
| | if md5 == known then
| | | if filename == known then
| | | | continue
| | | else
| | | | if md5(filename) in file then
| | | | | generate new entry in file
| | | | else
| | | | | update file with new name
| | | | | update playlists with new name
| | | | end
| | | end
| | end
| done

I like to outline my ideas every now and then for later reference, especially when I'm very tired it helps me make sense of my notes next week.


There is a vim plugin for outlining but that is kind of over kill for me. Vim has a 'listchars' setting that alters from Vi's behavior how and what it displays things when 'list' is set.

I have a function named My_OutlineMode() and an automcmd that calls the function whenever creating a new file or reading a new buffer with a file.outline

setl listchars =tab:\|\ " Mark \t's with |'s
setl list


That makes each level of indentation be highlighted and displays a pipe symbol '|' at each tab stop (e.g. indentation level) without inserting it into the file. I find it a tad distracting while coding -- indentation is used in programs for a reason after all! But for outlining ideas, I find it really helps to visually display the collation of ideas to indents. Maybe because I use blank lines and tabs to order thoughts in my outlines but what ever works hehe.


I remember I first learned about list/listchars when trying to help someone in #vim that wanted code to display each indent level with leading dots, kind of like how KATE can be set to show a '.' at each tab stop. So I made a note of it in case I would want to do something like that myself later.

No comments:

Post a Comment