Hacker News new | past | comments | ask | show | jobs | submit login

I started doing this at my first job in 1985. There is a direct lineage of the file to a few of the text files I use today. "todo.txt", "address.txt", and "dates.txt" have morphed continuously for 35 years.

Besides this reminiscence, I wanted remind vim users of a particular feature that allows easily navigating between text files like a hypertext system. The "gf" key sequence (mnemonic: go file). Typing "gf" will cause vim to extract the text under the cursor (it doesn't have to be at the head of the string) and open the file of that name. If you have ':set path=..' established, it also searches for the named file using that path order.

For example, in my main TODO I have a section like this for notes on things I want to attend to for various websites I maintain:

    ---------- websites todos -----------
    family website:   c:/path/to/this/todo.txt
    personal website: c:/path/to/that/todo.txt
    resume:           c:/path/to/other/todo.txt
    emulator:         c:/path/to/emulator/todo.txt
Just place the cursor over one I wanted to visit, hit 'gf' then I'm teleported to that document.

I've-too been evolving the text file for about 25 years. In those days, at the beginning of time, when dinosaurs roamed the earth, one would evolve the data format to tailor it for its purpose. txt is just perfect for that. Some indentation, some symbols, some tabular data.

Sometimes just Monday is fine, sometimes you want Monday Week 4, sometimes the format should be 01-02-99 etc etc but after using it for long enough it kind of stabilizes into a format that fits the task. At that point it becomes easy to parse the data (read table) and [if so desired] display it in some more visually appealing format.

I for example keep a work schedule that at some point included the coworkers ill be working with and later it had their full schedule for purpose of trading shifts. (all the way to the right of the screen and beyond)

I publish this as interactive html for them with fancy unicode icons and colors. It is much more compact, convenient and with its rounded corners looks sooooo much better than the excel printout from the planning department. It reveals complex trades like if jim takes joes shift and I take joes shift jim can take mine. To the point I have to assure the coworkers they don't have to understand the complexity of the trade, just work Monday in stead of Sunday.

If a shift is understaffed I call them before they call me if I desire to fill it. Their excel print out ends up on the wall many cpu cycles after my text file is updated. If they get my payments wrong I strip all the extra information from the text file, paste it in an email and color the font in the spots where they should be looking. I could export it as a spreadsheet too I suppose.

The point being, its lovely to have the visuals but I wouldn't want to be working the data in a gui.

(Reminds me to figure out how to morph it into iCalendar files (and perhaps back))

Similar to 'gf' there's 'gx' that opens a URL in your browser. I use this every day.


Here's my config from the vimrc:

" Disable netrw's gx mapping

let g:netrw_nogx = 1

" If the current word is a URL, open it in the browser. Else, pass it to a search engine

nmap gx <Plug>(openbrowser-smart-search)

vmap gx <Plug>(openbrowser-smart-search)

let g:openbrowser_default_search="duckduckgo"

There's a plugin called VimWiki that can help you with this.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact