Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm editing a note, then I get a call from my ADHD and I go to look at another note. Is there no way to get back to the previous note? I'm looking for previous/next like in a browser (or any other program, these days)...

share|improve this question
    
You could try abusing the bookmarks feature to store what note you're viewing, then return later and remove from bookmarks. –  Daniel Beck Oct 23 '11 at 2:57
    
Thanks @DanielBeck, my concern is that I usually realize that I want to go back AFTER I've gone forward :) –  Yar Oct 23 '11 at 17:39

1 Answer 1

up vote 1 down vote accepted

The developer of Notational Velocity in a comment to #64: Simple: Jump back to last note, Advanced: Browsing history - Issues - scrod/nv - GitHub:

How would NV determine what the "last" note was? Would that be the last note edited? The last note where the editor had focus? The last note selected? How would it differentiate between selecting a series of notes using Command-J/K, the left/right keys, or dragging across them with the mouse?

I've tried writing AppleScripts that were based on the modification date of the external text files for notes. But that had a few additional issues, and the scripts were pretty unintuitive to use.


The best workaround I've come up with:

~/Library/Scripts/Applications/nvALT/jump.scpt, ⌃␣ in FastScripts

tell application "System Events" to tell process "nvALT"
    set p to value of text field 1 of group 1 of tool bar 1 of window 1
end tell
set x to do shell script "cd /1
/bin/ls -t |
grep -v '^Interim Note-Changes$' |
grep -v '^Notes & Settings$' |
grep '^'" & quoted form of p & "'.txt$' -B 1 |
grep -v '^'" & quoted form of p & "'.txt$' |
sed 's|\\.txt$||'"
open location "nv://" & x
delay 0.1
tell application "System Events" to keystroke return
  • If the most recently modified note is not selected, open it
  • Otherwise open the second most recently modified note

NV doesn't save changes to external files immediately. (It takes about 5 to 10 seconds from the first edit.) Most of the time that's not a problem though.


Another (and probably the best) option would be to sort Notational Velocity's note list by Date Modified. Then for example pressing ⎋↓↓↩ would go to the second most recently modified note.

share|improve this answer
    
Thanks @Lri, great answer. So all of these depend on you actually modify the notes, right? –  Yar Oct 23 '11 at 15:37
    
@Yar Yeah. You can't sort by "date last opened" in NV. And the external files don't have any metadata for that either. –  ؘؘؘؘ Oct 23 '11 at 20:06
    
Thanks @Lri, that make sense... were I building (or modifying) NV, I definitely would not make that data persistent. It would just be a stack of the notes that have shown up in the editing pane. –  Yar Oct 23 '11 at 21:34

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.