Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>vscode-positionNew to Visual Studio Code? Get it now.
vscode-position

vscode-position

jtr

|
53,612 installs
| (9) | Free
Get and Set cursor position by byte offset
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

vscode-position README

This is the README "vscode-position". I had been using the Positions extension for seeing the offset but had a need to set the position by offset easily. So I wrote this, partially because the mentioned extension to learn a bit about typescript. As I finished I came across show-offset which I wish I'd run across initially. Nevertheless, I had added a couple unique features when I wrote this, so I figured I'd toss it into the gallery.

Features

  • Shows cursor character offset as 'Pos <position>' in the status bar.
  • Click the status bar or use the Go To Position palette command to move the cursor by offset.
  • New position is previewed while typing it in (similar to goto line)
  • Cursor and selection restored if setting position is abandoned with esc
  • Cursor position can also be +number or -number for moving the cursor relative to the current position.
  • Works as a web extension in online hosts vscode.

Initial keybinding for Go To Position: ⌃+Alt+G (Mac: ⌃+⌘+G)

Overview

Requirements

None

Extension Settings

None

Known Issues

Release Notes

1.1.1

Supports web extension context for online vscode. Still exports traditional extension model for back compat to 1.40.0 Internal project restructuring to webpack to support web worker context.

1.0.3

(Cumulative)

  • Fix 'Enter' leaving position at new location
  • Fix extensionKind to properly support ui/workspaces for web Codespaces

1.0.0

Initial release.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft