Protip: documenting source code with links to locations - keyboard shortcuts - uuids - macros


#1

Tip:

Use keyboard maestro to

  1. generate an uuid and copy it to clipboard and paste it - when you press ctrl-1
  2. generate a macro that selects the word (uuid) under cursor, copies to clipboard, opens your IDE, searches for the uuid, jumps to its location when you press ctrl-2

I have been using this now for a year. Pretty nice.

Hope this tip might be useful for some.

Cheers,

Jozsef


#2

You do this instead of linking directly to a heading in another document? Or are you doing this in a single document to jump around between blocks of code?
I wish I could future proof my document structure. I was using a lot of links between headings in documents but once you move them around (to different documents), all the links break. I’ve thought of using some identifier as a backup (like a UUID), but it isn’t terribly practical for multiple links in the middle of a paragraph, for example.


#3

Or under the heading, in notes you can specify all the related pages as hyperlinks. You can do this on the other side too, making a truly connected loop.

  • Test
    rel-link | rel-link | rel-link

#4

But links are document specific. If you move any information to a different document, links break.

Does anyone work around that somehow?


#5

No, but if you are moving just one document/bullet, then you can just manually change a link. At least one side would still work.

If you move documents/bullets frequently try to put the relative links in the top-most bullet so it would be easier to move.