Skip to content

GitHub indent comments

Rob Garrison edited this page Oct 24, 2022 · 20 revisions

A userscript that allows you to indent & outdent blocks in the comment editor

  • It only works on issue & gist comment pages.
  • Click on the "Indent" button or the Tab key to add a set number of spaces to the left of the selected text.
  • Click on the "Outdent" button or Shift+Tab to remove zero to the set number of spaces to the left of the selected text.
  • If no text is selected, the set number of spaces is added or removed to the right of the cursor.
  • Use the userscript addon to change the set number of spaces (see screenshot below). It is set to 2 spaces by default.
  • Click this link to install from GitHub; or, install from GreasyFork or OpenUserJS.

Screenshot

github-indent-comments-settings

github-indent-comments

* NOTES *

  • The "Toggle monospaced font" can be added by installing the userscript; or, install the GitHub-Dark Script which adds multiple scripts & a dark theme.
  • The default of two spaces are being added & removed in the above screenshot.

Change Log

Version 1.0.18 (2022-10-24)

  • Update dependencies.

Version 1.0.17 (2022-02-14)

  • Update styling & code.

Version 1.0.16 (2021-07-21)

  • Update mutation script.

Version 1.0.15 (2021-01-31)

  • Update mutation script.

Version 1.0.14 (2019-02-16)

  • Update GitHub icon.

Version 1.0.13 (2019-01-28)

  • Update mutation script.

Version 1.0.12 (2018-10-05)

  • Update mutation script.

Version 1.0.11 (2018-05-17)

  • Update mutation script.

Version 1.0.10 (2018-05-10)

  • Update mutation script.

Version 1.0.9 (2018-04-09)

  • Update mutation script url.

Version 1.0.8 (2018-01-18)

  • Update assets.

Version 1.0.7 (2017-10-08)

  • Update mutation script url.

Version 1.0.6 (2017-05-16)

  • Change license to MIT.

Version 1.0.5 (2017-04-21)

  • Update mutation url.

Version 1.0.2 - 1.0.4 (2017-04-13)

  • Switch to using mutations.js.

Version 1.0.1 (2017-03-25)

  • Use pjax event & move caret code.
  • Set textarea tab size.

Version 1.0.0 (2017-03-15)

  • Initial commit
Clone this wiki locally