Merlin’s weekly podcast with Dan Benjamin. We talk about creativity, independence, and making things you love.
Merlin’s weekly podcast with Dan Benjamin. We talk about creativity, independence, and making things you love.
”What’s 43 Folders?”
43Folders.com is Merlin Mann’s website about finding the time and attention to do your best creative work.
Life inside one big text file
Merlin Mann | Aug 17 2005
O’Reilly Network Weblogs: Living in text files Giles takes one of the biggest, geekiest leaps you can—moving all of his stuff into a single big-ass plain text file.
This ambitious strategy—usually only whispered about among the lower geek echelons in which I dwell—seems to require a lot of confidence, planning, and familiarity with your favorite flavor of text editor. Mine’s currently TextMate, but, given what I’ve seen people like Danny do with Vim (and its incremental search-on-steroids, scripting functions, and endless shortcuts and configurability), this really reignites my resolve to hit the book and thumb through all my bookmarks again. So. Questions for people who are already living in one text file:
Spill whatever you like about your one-file system (and, curious folks, feel free to ask questions). Related Stuff 74 Comments
POSTED IN:
I use OS X Vim...Submitted by KKovacs (not verified) on September 2, 2005 - 7:01am.
I use OS X Vim (www.macvim.org), and have a simple, yet very usable setup. I use dotmac syncing to sync my file between my 2 machines. In the /Volumes/iDisk/Documents folder I have 3 files: notes.txt (the actual "data") notes.vim (vim options for the file) notes.scpt (applescript file that is invoked from a QuickSilver "trigger" (F9 for me)) The files are the following (I hope it stays formatted in the comment...): notes.vim: " Load file, set up GUI :set lines=50 :vi /Volumes/iDisk/Documents/notes.txt :set lz " Syntax highlighting :syn match Comment /^---/ :syn match Error /^[.]$/ :syn match Title /^\t.*/ " Keyboard setup :map j gj :map k gk :map [ ?^[z :map ] /^[z :map gA Go:r !date "+\%Y-\%m-\%d \%H:\%M"I[A]o " Folding hack :set foldlevel=1 :set foldmethod=expr :set foldexpr=(getline(v:lnum)[0]=="[")?">1<1":"1" " Display options :set is hls noai nocin ic linebreak sbr=> incsearch ts=4 sw=4 " END :set nolz notes.scpt tell application "System Events" to (name of processes) contains "Vim" set foo to result if foo = true then tell application "Finder" to activate application "Vim" else do shell script "/Applications/Vim.app/Contents/MacOS/Vim -g -S /Volumes/iDisk/Documents/notes.vim &>/dev/null &" end if notes.txt (sample) [@projects] buy food pay bills etc [gift ideas] Father: new briefcase END ---- That's it. This setup (mostly the notes.vim file) knows a few extra features, like highlighting [headers], coloring lines that contain "---", and coloring lines that start with a TAB. It also sets up a folding system, you can "activate" that by pressing "zm" in command mode. When folded, you can yank/paste/delete whole "pages". A key binding for command mode "gA" is defined: it jumps to the end of the file, adds a header like [2005-09-02 18:46], and enters insert mode. You can use the [ and ] keys to jump to the next and the previous header. The applescript enables QuickSilver to switch to Vim if already opened, or start Vim with the notes.vim file as "bootstrap", if not running. This way you hit "F9" (or whatever key you used), and Vim appears with notes.txt open, no matter what. I hope this helps someone! :-) KKovacs » POSTED IN:
|
|
EXPLORE 43Folders | THE GOOD STUFF |