From f40d9f81eaabc4c2d6956a0f91b24663a23451a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Ortega=20Froysa?= Date: Mon, 13 Jul 2026 13:10:02 +0200 Subject: [PATCH] Add support for plain text. --- README.md | 2 +- doc/licenser.txt | 1 + plugin/licenser.vim | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 4fbc728..3ef96be 100644 --- a/README.md +++ b/README.md @@ -136,7 +136,7 @@ vim-licenser automatically detects your file type and applies the appropriate comment style. Supported file types include: bash, c, cmake, cpp, csharp, css, dart, go, groovy, haskell, html, java, javascript, json, kotlin, lua, matlab, perl, php, python, r, ruby, rust, scala, -shell, sql, swift, typescript, typescriptreact, vim, xml, yaml +shell, sql, swift, text, typescript, typescriptreact, vim, xml, yaml For more information, see `:help licenser` after installation. diff --git a/doc/licenser.txt b/doc/licenser.txt index 12ac0c9..e1877aa 100644 --- a/doc/licenser.txt +++ b/doc/licenser.txt @@ -83,6 +83,7 @@ vim-licenser supports the following filetypes with appropriate comment styles: shell - Shell script sql - SQL swift - Swift + text - Plain text typescript - TypeScript typescriptreact - TypeScript React (TSX) vim - Vim script diff --git a/plugin/licenser.vim b/plugin/licenser.vim index 313f7ac..353fba1 100644 --- a/plugin/licenser.vim +++ b/plugin/licenser.vim @@ -69,6 +69,7 @@ function! s:GetCommentStyle(filetype) abort \ 'shell': {'margin': 0, 'hashbang': 1, 'prefix': '', 'middle': '#', 'suffix': ''}, \ 'sql': {'margin': 1, 'hashbang': 0, 'prefix': '/*', 'middle': ' *', 'suffix': ' */'}, \ 'swift': {'margin': 1, 'hashbang': 0, 'prefix': '/*', 'middle': ' *', 'suffix': ' */'}, + \ 'text': {'margin': 0, 'hashbang': 0, 'prefix': '', 'middle': '', 'suffix': ''}, \ 'typescript': {'margin': 1, 'hashbang': 0, 'prefix': '/*', 'middle': ' *', 'suffix': ' */'}, \ 'typescriptreact': {'margin': 1, 'hashbang': 0, 'prefix': '/*', 'middle': ' *', 'suffix': ' */'}, \ 'vim': {'margin': 0, 'hashbang': 0, 'prefix': '', 'middle': '"', 'suffix': ''},