Skip to content

Instantly share code, notes, and snippets.

@alexchexes
alexchexes / chatgpt-better-syntax-highlighting.user.js
Last active November 30, 2025 10:41
ChatGPT improved syntax highlighting (with support for Vue.js code)
// ==UserScript==
// @name ChatGPT Better Syntax Highlighting
// @namespace http://tampermonkey.net/
// @version 2025-05-29
// @updateURL https://gist.github.com/alexchexes/273ad5fa78a018f00ad2aeb7f9494a5c/raw/chatgpt-better-syntax-highlighting.user.js
// @downloadURL https://gist.github.com/alexchexes/273ad5fa78a018f00ad2aeb7f9494a5c/raw/chatgpt-better-syntax-highlighting.user.js
// @description ❤️ Consider support via ko-fi.com/alexchexes ❤️ This userscript makes working with code in ChatGPT more convenient. It automatically highlights unhighlighted code blocks with auto language recognition, handles chat switching, applies syntax highlighting to new messages on user interaction. Allows to re-highlight the block by clicking on it or its title.
// @author alexchexes
// @match https://chat.openai.com/*
// @match https://chatgpt.com/*