Thorg Ctrl+T Shortcut Setup - For Quick Search

But CTRL+t is taken for ShowAllSymbols! - Yes, let's free CTRL+t first

Out of the box, VSCode assigns CTRL+t to workbench.action.showAllSymbols. You'll need to free and remap this so you can use CTRL+t as an entry point for many commands rather than just a single command.

Step 1: Free "ctrl+t" from Being Tied to a Single Command

Add the following to the file:

  {
    "key": "ctrl+t",
    "command": "-workbench.action.showAllSymbols"
  },
  {
    "key": "ctrl+t",
    "command": "-editor.action.transposeLetters",
    "when": "textInputFocus && !editorReadonly"
  }

Step 2: Assign New Shortcut for workbench.action.showAllSymbols

The recommended shortcut for workbench.action.showAllSymbols is CTRL+t + T (the second time you press T is without CTRL).

To set this up, add the following to your keyboard shortcuts (JSON) file (keybindings.json):

  {
    "key": "ctrl+t t",
    "command": "workbench.action.showAllSymbols"
  },

This setup will leave CTRL+t + CTRL+t available for Quick Search All.

Now that we've freed CTRL+t from being tied to a single command, we can use it as an entry point for multiple commands.

Use CTRL+t as entry point for Thorg commands

CTRL+t is used as the entry point for primary Thorg commands. Think of CTRL+t as meaning Thorg for most commands you assign under it.

Pre-Req

Add CTRL+t Thorg Shortcuts

Add the following to your keybindings.json:

  {
    "key": "ctrl+t ctrl+t",
    "command": "thorg.search.quick.all"
  },
  {
    "key": "ctrl+t ctrl+h",
    "command": "thorg.search.quick.visited-since.2-hours-ago"
  },
  {
    "key": "ctrl+t ctrl+d",
    "command": "thorg.search.quick.visited-since.today"
  },
  {
    "key": "ctrl+t ctrl+y",
    "command": "thorg.search.quick.visited-since.yesterday"
  },
  {
    "key": "ctrl+t ctrl+w",
    "command": "thorg.search.quick.visited-since.1-week-ago"
  },
  {
    "key": "ctrl+t ctrl+m",
    "command": "thorg.search.quick.visited-since.1-month-ago"
  },
  {
    "key": "ctrl+t ctrl+e",
    "command": "thorg.search.quick.visited-since.1-year-ago"
  },

Description of Additions

The following are descriptions of the shortcuts added to keybindings.json above:

Q&A:

Why use visited-since and not updated-since for primary shortcuts?

Why Use Visited-Since and Not Updated-Since as Primary Shortcuts?

Visited Encompasses Modified for Most Cases

We choose visited-since commands over updated-since because if you perform modifications on a note, you'll likely stay in that note longer than your configured Min Visitation Time Threshold. Therefore, your visit will be recorded as a Visit Event for the modified note and will be picked up by visited-since commands.

Updated-Since Does Not Encompass Visited Notes

You could visit and stay at a note for a prolonged period without making modifications or updates. In such cases, the note will be fresh in your memory and likely related to the area you're currently working on. A note that has been read has a higher chance of being re-visited, and it's picked up by visited-since commands. However, such a note that has been read but not modified is out of reach of updated-since commands.

Also see


Children
  1. Add Ctrl+T Thorg Shortcuts
  2. Free Ctrl+T

Backlinks