Skip to content

Latest commit

 

History

History
107 lines (75 loc) · 2.97 KB

links.org

File metadata and controls

107 lines (75 loc) · 2.97 KB

Links

<<ThisIsATarget>>

Links in org mode are a nested set of square brackets

images/links.gif

[[ Reference ][ Description ]]

Pressing enter on a link in sublime will try to follow the link. If the link is a web reference org will try to open a web browser.

The link system I am using is based on the original orgmode for sublime text and is fairly extensible. Custom handlers can be built to allow you to link easily to your own services.

There are several special ways of locating within a file within a reference.

[[<PROTOCOL>:<FILENAME>::<LOCATOR>][<NAME>]]

To manually specify locators using special symbols:

Custom Id
#<IDNAME>
Header
*<HEADING TEXT>
Row Col
Row::Col

If your locator is only text and non numerical there is an order to how the text is matched:

  • Target
  • Custom Id
  • Header

Targets

Targets are like anchors in an html file. A target is specified using double angle brackets.

<<TEXT>>

Linking to a Target

Images

Org supports the ability to show images inline in the document These are done with Sublimes phantom support under an image link and do not count as lines of text. Org can download links off the web that reference images into a cache and display them locally. This can lock up sublime while the images are downloaded so turn on visualization with care.

  • OrgShowAllImages - Shows all image links in the document
  • OrgHideAllImages - Hides all image links in the document
  • OrgShowImage - Shows a single image link in the document
  • OrgHideImage - Hides a single image link in the document

images/orgimages.gif

NOTE: You can ask that sublime visualize images by default in a file using a startup comment:

#+STARTUP: inlineimages

File and Line Number

A link can be more than just the filename. You can link to a specific line number like so:

[[file:links.org::3][File and Line Number Example]]

File and Line Number Example

Linking to Headings

You can link to a heading using a star.

[[file:./links.org::*Images][Images Example]]

Images Example

You can link without the star but it can match other things.

[[file:./links.org::Images][Images Example]]

Images Example

Custom Ids

Org has the concept of custom IDs. These are defined as a CUSTOM_ID property in a property drawer. To link to a heading with one of these IDs:

[[file:./links.org::#a-custom-id][Custom Id Example]]

Custom Id Example

Extending Link Processing

TODO: Describe how to do this.