{"id":13433699,"url":"https://github.com/tomimick/tomitool-vsext","last_synced_at":"2025-03-17T13:30:42.882Z","repository":{"id":145660429,"uuid":"500920469","full_name":"tomimick/tomitool-vsext","owner":"tomimick","description":"VSCode extension to add custom syntax hilighting to plain text files","archived":false,"fork":false,"pushed_at":"2022-12-01T08:06:34.000Z","size":63,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-28T16:13:14.927Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tomimick.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2022-06-07T16:30:42.000Z","updated_at":"2023-01-07T21:09:56.000Z","dependencies_parsed_at":"2023-06-26T00:14:47.445Z","dependency_job_id":null,"html_url":"https://github.com/tomimick/tomitool-vsext","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomimick%2Ftomitool-vsext","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomimick%2Ftomitool-vsext/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomimick%2Ftomitool-vsext/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomimick%2Ftomitool-vsext/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tomimick","download_url":"https://codeload.github.com/tomimick/tomitool-vsext/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244041364,"owners_count":20388223,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T02:01:33.571Z","updated_at":"2025-03-17T13:30:42.475Z","avatar_url":"https://github.com/tomimick.png","language":"JavaScript","readme":"\nTomitool - VSCode extension\n===========================\n\nThis is a VSCode extension to add custom syntax hilighting to plain text files.\n\nThis is a local extension that I have not released into\n[the marketplace](https://marketplace.visualstudio.com/vscode) since this is mainly about customizations for myself, and maybe a starter for your own customizations.\n\n![Screenshot](sample.txt.jpg)\n\n\nPurpose\n-------\n\nThe purpose of this extension is to pick custom strings in a plain text file and hilight them with desired colors. This is a two step process that consists of tokenization with TextMate grammars and then theming the tokens,\n[as explained in the docs](https://code.visualstudio.com/api/language-extensions/syntax-highlight-guide).\n\nWhen I started to use VSCode, I searched the marketplace for syntax hilighting extensions that could fill my need directly but in the end discovered that it does not seem to be possible to have custom tokenization via extension on the fly. The grammar must be defined inside an extension and then built for use.\n\nThe 2nd purpose of this extension is to develop my custom commands to VSCode. There is a single sample command \"Tomitool.Hello World\" that replaces the existing editor text selection with a sample text. This is just a base for further development of commands.\n\n\nBuild and install\n-----------------\n\nThe extension was started by using\n[a yoman generator](https://code.visualstudio.com/api/get-started/your-first-extension) as officially recommended.\n\nTo build the extension, first install the needed Node tools with ```npm install```.\n\nThe grammar is defined in a json file at\n[syntaxes/tomitext.tmLanguage.json](syntaxes/tomitext.tmLanguage.json)\n\nThe sample command \"Tomitool.Hello World\" is defined in\n[extension.js](extension.js).\n\nAfter editing these two files, you can build and package the extension for local consumption with a shell script:\n\n    ./install.sh\n\nThen restart VSCode to test and see the extension running in the editor.\n\nIn your VSCode settings.json, you colorize the tokens like this\n[settings-snippet.json](settings-snippet.json).\n\n\nMotivation\n----------\n\nI keep lots of notes for everything - for work, for hobbies and for daily thougths. Over the years I've tried various apps and file formats but in the end it's plain text that sticks. Plain text is the most versatile format that is compatible with any app.\n\nTo make text files more readable I've used colors for standard elements such as links, date headers and todo lists. Standard colors help me to scan big amounts of text quicker.\n\nI have a background of X years with Emacs, then 16.5 years with gVim, running on OSX. I had lots of plugins and customizations over the years. Minimal UI with keyboard access to everything. I also extended Vim with custom Python scripts. My hairy .vimrc was 2263 lines long.\n\nWhile Vim has all the power in the world, I noticed I became rusty in adding or maintaining my customizations. I did not enjoy fiddling with VimScript. My desire for a \"fresh \u0026 cleaner\" editor grew.\n\nAt the end of 2021 I started to use VSCode for Python coding and then in January 2022 after developing this extension, and being able to comfortably master shortcuts and edit plain text files, I finally jumped full time into VSCode, developing code and editing notes in the same editor.\n\nLicense\n-------\nMIT License\n\nAuthor\n-------\nDeveloped by [Tomi Mickelsson](https://tomicloud.com).\n","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomimick%2Ftomitool-vsext","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftomimick%2Ftomitool-vsext","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomimick%2Ftomitool-vsext/lists"}