/swipe-to-navigate

VSCode Extension for adding three finger swipe with various options similar to Xcode.

Primary LanguageTypeScriptMIT LicenseMIT

Swipe To Navigate VSCode Extension

Features

Adding support for navigating:

  • Currently opened tabs.
  • Currently opened tabs within a group.
  • Recently focused code and opened files.
  • Recently opened files.

Supported Platforms

  • macOS

    • Navigate using three finger swipes on the touchpad in a similar fashion to Xcode.
    • macOS trackpad Settings
  • Windows & Linux

    • Navigate using keyboard media keys or browser commands, as well as the "Back" button built into some mice on Windows.

Supported configuration options

"swipeToNavigate.action": "disabled" | "tabs" |  "grouped-tabs" | "recent-code" | "recent-files"

Examples:

  • Currently opened tabs - default.
"swipeToNavigate.action": "tabs"
  • Currently opened tabs in a single group.
"swipeToNavigate.action": "grouped-tabs"
  • Recently focused code & files - like Xcode.
"swipeToNavigate.action": "recent-code"
  • Recently opened files.
"swipeToNavigate.action": "recent-files"

How does it work?

Swipe To Navigate relies on the Monkey Patch Extension to inject custom javascript in VSCode. After installation you should be prompted to enable Monkey Patch. You can always trigger this manually by invoking the "Enable Monkey Patch" command.

Why Monkey Patch?

These changes were initially proposed directly to VSCode but this discussion indicated that they're trying to limit further code that depends on Electron APIs

Credits

Monkey Patch Extension from Matej Knopp made this possible without direct changes to VSCode.