elastic threads

Check out: Threshold
Type to control OS X.

my Notational Velocity fork
adds some useful viewing options, like fullscreen mode.

This tumblr contains threads for code, freeware, tricks, tips, alterations, altercations, infighting, etc.

Feel free to stretch these threads out. Please comment, respond, and
submit your own posts.

email elasticthreads, or follow him on twitter

All posts here are released under a Creative Commons license, so feel free to repost elsewhere with appropriate attribution.

Support Threshold, NV forking, or anything else you see on this site.
CS5+Launchpad=special

CS5+Launchpad=special

It’s coming…

Mobile Safari+Instapaper tip

If you’ve ever been reading a page in Mobile Safari and wished you were reading it in Instapaper instead, this is the quickest way to back that happen: Install the javascript below as a bookmarklet in Safari. Whenever you want to add an article to Instapaper and switch to instapaper all you have to do is hit that bookmarklet up.

javascript:function%20ipNOW(){var%20d='i'+document.location;document.location=d;}ipNOW();void(0)

How does it work? A while back Instapaper added a url scheme “ihttp://…”. So that any url you open on your iOS device instantly switches you to Instapaper and adds that url (minus the ‘i’, of course) to your articles. This bookmarklet just takes the url of the webpage you’re at, prepends an ‘i’, and opens that link.

As with all bookmarklets and Mobile Safari, the clunkiest part is the install. Here’s one way to do it:

1. If you’re not reading this post in Mobile Safari, switch over to your iOS device and come back. Here’s a link back here, if that helps.

2. Bookmark this page on Mobile Safari. Go through all the steps to actually bookmark this page, only you can rename to bookmark to what you’d like your bookmarklet to be called, lets call it “ipNOW” as an example.

3. Scroll up to the javascript above, select it and copy it.

4. Go back to your bookmarks, tap the “Edit” button, and select the bookmark you created in Step 2. Tap the url field for that bookmark to edit it. Tap and hold and select all of the old tumblr url. Delete. Tap and hold and paste in the javascript.

done.

UPDATE: if you tried that javascript and it got scrambled on copy/paste in mobile safari, that was because i didn’t use the <code>tag</code> .  I fixed it. Try again. SHOULD work this time.

nvIt — Chrome and Safari extensions for nvALT

Brett and I just released nvALT 2.1 with a lot of bug fixes, UI improvements, and some new features. Some of my favorite additions:

- TextMate style auto-pairing of matched characters like parenthesis, brackets, and double quotes.

- Shortcut (CMD-Shift-L) for Inserting [[Links]]

Read more about it here.  Full release notes here. You can use the in-app update mechanism or download it here.

But I also just finished up developing Safari and Chrome extensions to extend nvALT’s notational velocity (or something ;) into the browser. 

They let you create a new note in Safari 4 different ways:

  • Click the toolbar button to have nvALT download the current page you’re on as a new note
  • Right-click on a link, and select the appropriate option from the contextual menu,  to have nvALT download the linked page as a new note.
  • Right-click away from either a link or a selection, and select the appropriate option from the contextual menu, to have nvALT download the current page you’re on as a new note.
  • Right-click on selected text, and select the appropriate option from the contextual menu, to have nvALT create a new note with the selected text as well as a link to the current page you’re on.

There’s an preference setting to have nvALT use Instapaper’s Mobilizer when downloading pages into new notes, so that those notes are more readable. This is not turned on by default. To turn it on go to the extension’s preference page.

Since these extensions require OS X and nvALT 2.1, I don’t have any plans to release them on their respective Browser’s extensions page. Check back here or follow me on Twitter @elasticthreads for updates to the extensions.

Please email any bug reports to elasticthreads att gmail.com  with “nvIt bug report” in the subject

Downloads:

Safari Extension

Chrome Extension

p.s. I’ll post the source for these on GitHub soon, but if you are willing and able to develop a Firefox version please email me. 

InstapaperIt Safari extension users: if you updated to Safari 5.1 you need to re-enter Instapaper credentials in Preferences

If you updated to Safari 5.1 InstapaperIt might have stop working correctly for you.

When Safari updated to 5.1 it lost some of your extension settings. This includes your Instapaper login credentials you have to enter into InstapaperIt’s preferences.

To fix:

  • Go to Safari’s Preferences
  • Click on the Extensions tab,
  • Click on the InstapaperIt extension.
  • Re-enter your username/password.
  • Reload any pages currently open in Safari (so they reload the extension)

nvALT 2.0: two forks, merged…

NVForked updated and is now nvALT, a merger of two forks.

Big update. Huge. Back in January, Scrod released an update the NV that added a host of great features… and broke compatibility with my fork. Since then I’ve been working on updating my fork to add in his changes in the official NV:

  • Option for horizontal layout with multi-line previews in notes list
  • Words between [[double-brackets]] will become links to other notes
  • Tags can be synced to Dropbox and searched by Spotlight, via OpenMeta
  • Tags are auto-completed while typing in the tag-entry field
  • TaskPaper-compatible strikethrough formatting using the “@done” tag
  • Fully plain-text-based automatic list-bullet formatting
  • Note-titles inside double-brackets are (optionally) auto-completed
  • “Show in Finder” command for revealing selected note-files on disk
  • Highlighting of search terms can be disabled
  • Dragging the divider to the top or left of the window will hide search field
  • and more

I kept the new, official implementation of a horizontal layout, which uses a single column to display note title + metadata (dates and tags). Looks beautiful.

All the features from my fork are still there:

  • Fullscreen mode (cmd-shift-f)
  • Optional menubar icon/drop down menu
  • Optional no dock icon (menu bar icon only) mode.
  • The ability to add/edit tags for multiple notes at once (which now auto-completes the tags for you).
  • Multiple color schemes you can easily switch between:
  • Black/White
  • Low Contrast (light gray background, dark gray text)
  • User Customizable
  • Easily collapse/expand the notes list and search field (cmd-shift-c)
  • An option to improve the readability of notes by using margins to limit the width of the text (in preferences»Fonts&Colors)
  • Other eye candy (check the scrollbars out).

AND added some new features:

  • “Open in Text Editor” (Under the note menu, or Cmd-Shift-O) to will open the current note in the application of your choice (use WriteRoom if you prefer its fullscreen mode). This requires that you store your notes as separate files. The default app is the system wide default for whatever file type (.txt,.rtf,.html) you’re using. Probably Text Edit. But you can pick your preferred application in “Preferences»Editing”
  • Show Word Count (Under the View menu, or Cmd-Shift-K). Heavily requested. Adds a live word count of your note to the search field. Hold down the option key to temporarily see the word count.
  • Working Localization for French, German, and Portuguese. (Although some of the newer features show up in English. If you know French, German, or Portuguese and want to translate anything you see in English please email me or Brett).

Along the way, Brett Terpstra, the developer of another NV fork, nvALT, and I decided to “branch off and merge our forks”…. whatever that means. Well, it means that my fork and nvALT are now combined into a single release:nvALT, version 2. So this adds the features of nvALT 1.0.7 into the mix as well:

  • (Multi)Markdown/Textile Preview (in the Preview menu, or hit Cmd-Control-P). Also highly requested. Brought to you mainly by Christian Tietze and Brett Terpstra. Thanks! I’ve added one thing to their implementation: Hold down the control key to temporarily see the preview window.
  • HTML source code tab in the Preview window for fast copy/paste to blogs, etc.
  • Customizable HTML and CSS files for the Preview window
  • Custom HTML/CSS templates can be included in saved output from the Preview
  • Social note sharing via Peggd
  • Convert imported URLs to Markdown, and optionally strip excess content with Readability

And some other bug fixes and improvements. (Most noticeable: the search field is embedded in the window’s titlebar as in the official release, which I originally took out for going fullscreen, but got working again).

nvALT has its own auto-update channel. So it will only update to future nvALTs, and never to Scrod’s NV.

nvALT will create it own set of preferences from NV. This means that the first time you run nvALT it won’t have any prefs you’ve set in my old fork, the first version of nvALT, or the official NV. If you moved your notes to a custom location (like Dropbox) they won’t show up the first time you run nvALT; you just need to go back into preferences»Notes and set the “read notes from folder” to the right place. Apologies for the chance, it is a pain in the ass, but separating nvALT from NV means you can use both apps, store notes for each in a separate folder, and have fewer compatibility issues.

Note: Apparently our build is not particularly PowerPC compatible. Since neither Brett nor I have PPC machines its pretty hard to test/debug/build for them. We’ll do our best, but in the meantime its probably best for PPC users to hold off or use this experimentally only. Apologies.

Download nvALT, version 2 here.

The official project page for nvALT is on Brett’s site. Or you can check my old NV site.

Source code will be available (soon) here.

Follow my tumblr and/or Brett’s blog for news and updates about nvALT.

I’ll post a roadmap soon, after Brett and I have a little more time to agree on the next steps. In the meantime, enjoy the new release!

Big thanks to Scrod (aka Zachary Schneirov), Christian Tietze , and others whose work is a part of the fork.

The new world vs old world of OS X UI. It&#8217;s a wild west of stop lights.

The new world vs old world of OS X UI. It’s a wild west of stop lights.

Put Your Mac’s Caps Lock Key to Better Use

After reading about Google’s Cr-48 ChromeOS prototype netbook, I had two immediate reactions:
1. My Mac runs Chrome + 1000s of other applications. Why would I want to reduce that to just Chrome?
2. The Cr-48 has no Caps Lock key. Instead it has a web search key. Slap your left pinky against that key and instead of SCREwiNG with what you’re writing, you get a quick web search box. Awesome. Where can I get me one of these?

Well. It took a while (mostly because I forgot about it). But I figured it out. Read on to find out how to disable your Caps Lock key, and then how to set it to activate Threshold, Quicksilver, Launchbar, or Alfred (all of which can quickly run a web search).

Setting this up is a bit convoluted, and I’ll explain why, but afterwards: it works like a charm.

Part of the convolutedness requires that you use either option-space or command-space to activate Quicksilver (or other app). Ok, you can use other combinations, but it is even more tricky to set that up, and I can explain how to do it, but I’ll do so in another post (if enough people request it).

You’ll need to install two preference panes, both from the same developer. PCKeyboard Hack and KeyRemap4MacBook (regardless of the name, this should work with any Mac). PCKeyboard Hack lets you remap your Caps Lock key to any other key. KeyRemap4MacBook lets you do all kinds of crazy remapping of your keyboard (but it CAN’T remap your Caps Lock key for some reason). In this case we want to remap your Caps Lock key to whatever keyboard combination you’ve got set to activate Quicksilver (or whatever your launcher/web searcher of choice happens to be). Now the challenge, and the reason we need both preference panes is that you can’t reasonably use a single key to activate Quicksilver. Otherwise every time you hit the command key (for example), Quicksilver would pop up. And for some reason, PCKeyboard Hack only lets you remap your Caps Lock key to a single key (not a combination like control-space). So the trick is to (use PCKeyboard Hack) to remap your Caps Lock key to another key that you almost certainly never use (because its not on your keyboard), and then (use KeyRemap4MacBook) remap that key to either option-space or command-space (to activate Quicksilver).

Ok. Convoluted explaination of a convoluted process? Check. Now onto the details:

1. First you’ll need to download and install PCKeyboard Hack and KeyRemap4Macbook.

2. Next we’ll remap your Caps Lock key. Go to System Preferences and click on PCKeyboard Hack.

In the first row you’ll see “Change Caps Lock”, double click in that row under “keycode” and enter 110. 110 is the keycode for the PC Application key.

Apparently, its this key on a Windows keyboard.

I’m guessing you don’t have a Windows keyboard (since this is a Mac only trick). Even if you do, I don’t think that key does anything in OS X. So we’ve now remapped your Caps Lock key to a key that doesn’t do anything in OS X. First, do no harm.

3. Now we’ll remap the “PC Application Key” to a keyboard combination that activates Quicksilver. Go back into System Preferences and click on the KeyRemap4Macbook icon. There’s a huge list of options that shows up. (and many interesting tricks you can use to ease your keyboard-life). You can literally get lost in this list trying out different remaps. For this post we just need one. Rather than have you scan down the list looking for it, click on the search field and type “Change PC Application Key”. This should narrow the list considerably. What you want is either the “Application Key to Option_L+Space” or “Application Key to Command_L+Space” (depending on if you want to use Command-Space or Option-Space to activate Quicksilver).

Check the appropriate box.

4. If you’ve already got the appropriate keyboard combo set up to activate Quicksilver (or Threshold, Launchbar, Alfred, etc.) then you’re good to go. Hit the Caps Lock key and enjoy. Otherwise you’ll need to go into that application’s preferences and set that up (comment below if you need info on how to do that). Some of those apps have ways of setting a specific trigger to activate ready to web search (instead of just activating). Comment below and I’ll post some info on how to do that.

UPDATE: 5. My original post forgot one last step. It turns out that OS X limits how fast it responds to the Caps Lock key. Its an attempt to cut down on accidental Caps Locking. Which is great. But for our uses, the limiting is annoying because it slows down how responsive our new web search key is. To fix this go into System Preferences»Keyboard»Keyboard tab and click on the “Modifiers…” button in the Lower right corner. 

In the dropdown menu next to the Caps Lock key, select “No Action”. Now the Caps Lock key should be as responsive as any other key. Which means our new web search key is too. Enjoy!

Reeder OS X Tip: Set the ESC key to close browser

When you follow an article’s link to its full content, or use Instapaper Mobilizer, or follow a link when reading something in Reeder the application hides its feed list on the left and opens a browser in the right column (where the feed’s article content usually is).

There’s a couple ways to close the browser and return to Reeder’s default view of feed list on the left and article on the right:

  • Click the close button (an “x” in a dark circle) in the upper left corner of the browser column.
  • Use the mouse to select a different feed item in the left column.
  • Hit the “j” or “k” key to select a different feed item
  • Select “Close Browser” from the file menu or hit cmd-shift-w for its keyboard shortcut.

I find myself trying to close the browser quite a lot (because I use Instapaper Mobilizer a ton) and wanted to set the escape key to do all this, since that seems much more in line with standard OS X behavior (and so is what my hands’ muscle memory wants to do).

It’s not terribly difficult to do, but does require a plist editor such as Property List Editor (which is one of the Developer tools you can install from your OS X install DVD) or PListEditPro. There are a lot of steps, and it might seem hacky (because we’re manually editing a plist), but it works fine. Here’s how to do it:

  • Quit Reeder if its open.
  • Open System Preferences
  • Click the Keyboard icon
  • Click the Keyboard Shortcuts tab
  • Select “Application Shortcuts” in the left column
  • Click the plus-sign button below the right column
  • Select Reeder from the drop down list (or navigate to it by selecting “other…”)
  • Type “Close Browser” (case sensitive) into the Menu Title field
  • Select the field next to Keyboard Shortcut and hit cmd-shift-escape
  • Close Preferences.
  • Navigate to ~/Library/Preferences/ folder and find “com.reederapp.mac.Reeder.plist”
  • Open that with a plist editor.
  • Look for the NSUserKeyEquivalents, which should have a drop-down arrow next it and click that.
  • You should see the Close Browser key on the left and something like “@⎋” on the right.

  • Double click the field on the right and delete the “@” so its just the escape key icon.
  • Save and close the plist.
  • Open Reeder and try it out (or check by clicking the File menu and looking at the keyboard shortcut listed next to Close Browser”)