clarkio / vscode-twitch-highlighter

This is a VS Code extension that will allow your Twitch chat to highlight a line of code via a command message. Example: `!line 8 server.js`. See master branch README.md for more details
https://clarkio.com
203 stars 14 forks source link

Handles relative line numbers - Addresses #80 #81

Closed parithon closed 5 years ago

parithon commented 5 years ago

Purpose

Adds the ability to handle highlights when the vscode is using relative line numbers.

Changed Files

!line -5-5 Highlights 10 lines when in relative mode (5 lines above and 5 lines below the cursor)
!line -5..5 Highlights the same 10 lines as above
!line -5--10 highlights lines 5-10 above the cursor
!line -5..-10 highlights the same 5 lines as above

How to test

  1. Clone the repo: git clone https://github.com/clarkio/vscode-twitch-highlighter.git.
  2. Change to branch to this PR using the vscode GitHub pull request plugin.
  3. Install the node dependencies: cd vscode-twitch-highlighter && npm install.
  4. Press F5 or click debug button (green triangle/play button) in VSCode.
  5. Change the Line Numbers setting for vscode to relative.
  6. Connect to the chat server.
  7. Use the highlight command !line or !highlight to highlight lines using the relative numbers (the cursor is always on line zero).
  8. Use the unhighlight command !line !<number> to unhighlight the lines.
  9. Disconnect from the chat server.
  10. Reset your Line Numbers setting for vscode.

Addresses

80

parithon commented 5 years ago

As mentioned by @clarkio we believe it may introduce unnecessary complexity. As a result I am going to close this PR.

bitmoji