Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Smart End KeyNew to Visual Studio Code? Get it now.
Smart End Key

Smart End Key

Maikurosofuto

|
8 installs
| (0) | Free
Makes End key intelligently toggle the cursor between the end of the code and the end of the line, accounting for inline comments. Pressing Shift + End extends the text selection similarly.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Smart End Key

Smart End Key is a Visual Studio Code extension that enhances the behavior of the End key. Instead of always jumping to the very end of the line, it toggles between:

  1. The last code character of the line (ignoring inline comments and trailing whitespace).
  2. The true end of the line (after comments and spaces).
  • Press End once → cursor jumps to the end of the region it is at (code or inline comment).
  • Press End again → cursor jumps to the end of the other region.
  • Press Shift + End once → extends the text selection to the end of the region it is at (code or inline comment).
  • Press Shift + End again → extends the text selection to the end of the other region.

This makes navigating code with inline comments much faster and more intuitive — similar to how Smart Home toggles between the start of the line and the first non‑whitespace character.

✨ Features

  • Detects the current file’s language and use the appropriate inline comment markers. (e.g., //, #, --).
  • Detects if the comment marker is inside a string and ignores it.
  • Works with multiple cursors/selections.
  • Lightweight and fast — no configuration required.

Limitations

Doesn't detect multi-line comments and docstrings. This would make the extension far more complex and heavyweight.

Incompatibility

Some users have reported incompatibility with keyboards that assign the End key to multiple functions, especially when extensions also register actions on that shared key.

Build from source

  • Install Node.js
  • Clone repository from GitHub
  • At repository dir run:
    npm install
    npm run compile
    npm install -g @vscode/vsce
    vsce package
    
  • Install .vsix file directly in VS Code via Extensions: Install from VSIX... in command palette
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft