From f98794643ed76f37c2fb9a2148f2d51c51d0e17c Mon Sep 17 00:00:00 2001 From: FloppyDisco Date: Sat, 5 Oct 2024 23:05:55 +0200 Subject: [PATCH 1/6] created transform plugin --- transform.lua | 287 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 287 insertions(+) create mode 100644 transform.lua diff --git a/transform.lua b/transform.lua new file mode 100644 index 00000000..617f3203 --- /dev/null +++ b/transform.lua @@ -0,0 +1,287 @@ +-- mod-version:3 +local command = require "core.command" +local keymap = require "core.keymap" +local config = require "core.config" + +-- |-------------------------| +-- | Transform | +-- |-------------------------| + +--[[ + + The Transform plugin provides commands for transforming text + into the specified case. + + this plugin supports multiple cursors. + + if a selection is highlighted, + the transformation will be performed on + the entire selection + + if not, + the transformation will be performed on + the word under the cursor + the word will be determined using the nonWordChars settings value + -- if a change is made to this setting the plugin will need to be reloaded + +]] + +local command_prefix = "Transform" +local command_names = { + ["snake_case"] = command_prefix .. ": To snake_case", + ["camel_case"] = command_prefix .. ": To camelCase", + ["pascal_case"] = command_prefix .. ": To PascalCase", + -- determine how to display "-" in commandview + ["kebab_case"] = command_prefix .. ": To kebab-case (hyphen)", + ["uppercase"] = command_prefix .. ": To UPPERCASE", + ["lowercase"] = command_prefix .. ": To lowercase", + ["capitalize_word"] = command_prefix .. ": Capitalize Word", + ["uppercase_next"] = command_prefix .. ": Uppercase Next Char", + ["lowercase_next"] = command_prefix .. ": lowercase Next Char", +} + +-- Retrieve non-word characters from the Lite XL settings +local nonWordChars = config.non_word_chars +local nonWordCharsSet = {[" "]=true} +for i = 1, #nonWordChars do + local char = nonWordChars:sub(i, i) + nonWordCharsSet[char] = true +end + +-- Feature? +-- ------------ +-- allow the user to define "wordPartSeparators" + + +local function get_selected_text(document, line1, col1, line2, col2) + -- if first position does not match second position + if line1 ~= line2 or col1 ~= col2 then + + -- There is a selection + -- ------------------------ + local selected_text = document:get_text(line1, col1, line2, col2) + return line1, col1, line2, col2, selected_text + else + + -- No selection, get the word under the cursor + -- ----------------------------------------------- + local text = document.lines[line1] + -- Find the start of the word + local word_start = col1 + while word_start > 1 and not nonWordCharsSet[text:sub(word_start - 1, word_start - 1)] do + word_start = word_start - 1 + end + -- Find the end of the word + local word_end = col1 + while word_end <= #text and not nonWordCharsSet[text:sub(word_end, word_end)] do + word_end = word_end + 1 + end + local selected_text = text:sub(word_start, word_end - 1) + return line1, word_start, line1, word_end, selected_text + end +end + +local function split(s) + local result = {} + -- wordPartSeparators would be used here + for part in s:gmatch("([^-_ \n\t]+)") do + table.insert(result, part) + end + return result +end + +local function for_each_selection_of_doc(document, func, get_word) + get_word = get_word == nil and true or get_word + for idx, line1, col1, line2, col2 in document:get_selections(true) do + if get_word then + -- args: cursor_index, start_line, start_col, end_line, end_col, selected_text + func(idx, get_selected_text(document, line1, col1, line2, col2)) + else + func(idx, line1, col1, line2, col2, document:get_text(line1, col1, line2, col2)) + end + end +end + + +---transforms the word or selection using the specified separator and clean function +---@param document core.doc: the document (dv.doc) +---@param word_part_join_value string: a string value to join the word parts with +---@param word_part_clean fun(word_part: string, i: number) | nil must return the cleaned word_part +local function transform(document, word_part_join_value , word_part_clean) + if word_part_clean == nil then + word_part_clean = function (w,i) return w end + end + for_each_selection_of_doc(document, function(cursor_index, start_line, start_col, end_line, end_col, selected_text) + + -- split word parts + -- -------------------- + -- by (lower)(upper) + selected_text = selected_text:gsub("([%l%d])([%u])", "%1_%2") + -- by single (upper)s + selected_text = selected_text:gsub("([%u%d])(%u)(%l)", "%1_%2%3") + local parts = split(selected_text) + + -- clean each word part + for i,word_part in ipairs(parts) do + parts[i] = word_part_clean(word_part, i) + end + + local transformed_text = table.concat(parts, word_part_join_value) + document:replace_cursor(cursor_index,start_line,start_col,end_line,end_col, function () return transformed_text end) + document:move_to_cursor(cursor_index,0,#transformed_text) + end) +end + +local function capitalize(word) + return word:sub(1, 1):upper() .. word:sub(2):lower() +end + + +-- |----------------------------------| +-- | Transform Commands | +-- |----------------------------------| + +-- To Snake_Case +-- ----------------- +command.add("core.docview", { + [command_names.snake_case] = function(dv) + transform(dv.doc, "_", function(word_part) + return word_part:lower() + end) + end, +}) + +-- To camelCase +-- ---------------- +command.add("core.docview", { + [command_names.camel_case] = function(dv) + transform(dv.doc, "", function(word_part, i) + if i==1 then + return word_part:lower() + else + return capitalize(word_part) + end + end) + end, +}) + +-- To PascalCase +-- ----------------- +command.add("core.docview", { + [command_names.pascal_case] = function(dv) + transform(dv.doc, "", capitalize) + end, +}) + +-- To kebab-case +-- ----------------- +command.add("core.docview", { + [command_names.kebab_case] = function(dv) + transform(dv.doc, "-") + end, +}) + +-- To UPPERCASE +-- ---------------- +command.add("core.docview", { + [command_names.uppercase] = function(dv) + local document = dv.doc + for_each_selection_of_doc( + document, + function (cursor_index, start_line, start_col, end_line, end_col, selected_text) + document:replace_cursor(cursor_index,start_line, start_col, end_line, end_col, + function () + return selected_text:upper() + end) + end + ) + end, +}) + +-- To lowercase +-- ---------------- +command.add("core.docview", { + [command_names.lowercase] = function(dv) + local document = dv.doc + for_each_selection_of_doc( + document, + function (cursor_index, start_line, start_col, end_line, end_col, selected_text) + document:replace_cursor(cursor_index,start_line, start_col, end_line, end_col, + function () + return selected_text:lower() + end) + end + ) + end, +}) + + +-- Capitalize Word +-- ------------------- +command.add("core.docview", { + [command_names.capitalize_word] = function(dv) + local document = dv.doc + for_each_selection_of_doc( + document, + function (cursor_index, start_line, start_col, end_line, end_col, selected_text) + document:replace_cursor(cursor_index, start_line, start_col, end_line, end_col, + function () + local words = split(selected_text) + for i,word in ipairs(words) do + words[i] = capitalize(word) + end + return table.concat(words," ") + end) + end + ) + end, +}) + +-- Uppercase Next Char +-- ----------------------- +command.add("core.docview", { + [command_names.uppercase_next] = function(dv) + local document = dv.doc + for_each_selection_of_doc( + document, + function (cursor_index, start_line, start_col) + document:replace_cursor(cursor_index, start_line, start_col, start_line, start_col+1, + function (text) + return text:upper() + end) + document:move_to_cursor(cursor_index,0,1) + end, + -- get_word = + false + ) + end, +}) + +-- lowercase Next Char +-- ----------------------- +command.add("core.docview", { + [command_names.lowercase_next] = function(dv) + local document = dv.doc + for_each_selection_of_doc( + document, + function (cursor_index, start_line, start_col) + document:replace_cursor(cursor_index, start_line, start_col, start_line, start_col+1, + function (text) + return text:lower() + end) + document:move_to_cursor(cursor_index,0,1) + end, + -- get_word = + false + ) + end, +}) + + +-- not sure best way to add a keybind for both platforms +keymap.add { + ["cmd+option+u"] = command_names.uppercase_next, + ["cmd+option+l"] = command_names.lowercase_next, + -- ["ctrl+alt+u"] = command_names.uppercase_next, + -- ["ctrl+alt+l"] = command_names.lowercase_next, +} From f55d90358425996e34706b913e837970b9fb15bc Mon Sep 17 00:00:00 2001 From: FloppyDisco Date: Sat, 5 Oct 2024 23:33:04 +0200 Subject: [PATCH 2/6] added transform to manifest.json --- manifest.json | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/manifest.json b/manifest.json index 8d3ec9ac..d5a4c770 100644 --- a/manifest.json +++ b/manifest.json @@ -2257,6 +2257,19 @@ "type": "library", "version": "1.3" }, + { + "description": "Commands to transform cases", + "id": "transform", + "name": "Transform", + "path": "plugins/transform.lua", + "mod_version": "3", + "tags":["transform", "snake_case", "camelCase", "PascalCase"], + "type": "plugin", + "version" : "0.1.0", + "extra": { + "author": "floppyDisco" + } + }, { "description": "Tree-sitter bindings based on `lua-tree-sitter`", "id": "tree_sitter", From 33b9d5b7ec1f73423aa6c5525bd607565aa38825 Mon Sep 17 00:00:00 2001 From: FloppyDisco Date: Sat, 5 Oct 2024 23:58:23 +0200 Subject: [PATCH 3/6] refactor and comments for clarity --- transform.lua | 66 +++++++++++++++++++++++++++++---------------------- 1 file changed, 37 insertions(+), 29 deletions(-) diff --git a/transform.lua b/transform.lua index 617f3203..9e1f2d92 100644 --- a/transform.lua +++ b/transform.lua @@ -53,7 +53,7 @@ end -- allow the user to define "wordPartSeparators" -local function get_selected_text(document, line1, col1, line2, col2) +local function get_word_or_selection(document, line1, col1, line2, col2) -- if first position does not match second position if line1 ~= line2 or col1 ~= col2 then @@ -90,45 +90,53 @@ local function split(s) return result end + +--- Function to call the transform command for each cursor +---@param document: the document +---@param func fun(cursor_index: number, start_line: number, start_col: number, end_line: number, end_col: number, selected_text: string) +---@param get_word boolean | nil if true the word under the cursor will be retreived if there is no selection for the current cursor, otherwise the cursor positions will be passed directly local function for_each_selection_of_doc(document, func, get_word) - get_word = get_word == nil and true or get_word - for idx, line1, col1, line2, col2 in document:get_selections(true) do - if get_word then - -- args: cursor_index, start_line, start_col, end_line, end_col, selected_text - func(idx, get_selected_text(document, line1, col1, line2, col2)) - else - func(idx, line1, col1, line2, col2, document:get_text(line1, col1, line2, col2)) - end + -- get_word default value 'true' + get_word = get_word == nil or get_word + for idx, line1, col1, line2, col2 in document:get_selections(true) do + if get_word then + func(idx, get_word_or_selection(document, line1, col1, line2, col2)) + else + func(idx, line1, col1, line2, col2, document:get_text(line1, col1, line2, col2)) end + end end ---transforms the word or selection using the specified separator and clean function ----@param document core.doc: the document (dv.doc) ----@param word_part_join_value string: a string value to join the word parts with +---@param document: the document +---@param word_part_join_value string a string value to join the word parts with ---@param word_part_clean fun(word_part: string, i: number) | nil must return the cleaned word_part local function transform(document, word_part_join_value , word_part_clean) if word_part_clean == nil then word_part_clean = function (w,i) return w end end - for_each_selection_of_doc(document, function(cursor_index, start_line, start_col, end_line, end_col, selected_text) - - -- split word parts - -- -------------------- - -- by (lower)(upper) - selected_text = selected_text:gsub("([%l%d])([%u])", "%1_%2") - -- by single (upper)s - selected_text = selected_text:gsub("([%u%d])(%u)(%l)", "%1_%2%3") - local parts = split(selected_text) - - -- clean each word part - for i,word_part in ipairs(parts) do - parts[i] = word_part_clean(word_part, i) - end - - local transformed_text = table.concat(parts, word_part_join_value) - document:replace_cursor(cursor_index,start_line,start_col,end_line,end_col, function () return transformed_text end) - document:move_to_cursor(cursor_index,0,#transformed_text) + for_each_selection_of_doc( + document, + function(cursor_index, start_line, start_col, end_line, end_col, selected_text) + + -- split word parts + -- -------------------- + -- by (lower)(upper) + selected_text = selected_text:gsub("([%l%d])([%u])", "%1_%2") + -- by single (upper)s + selected_text = selected_text:gsub("([%u%d])(%u)(%l)", "%1_%2%3") + local parts = split(selected_text) + + -- clean each word part + for i,word_part in ipairs(parts) do + parts[i] = word_part_clean(word_part, i) + end + + -- replace text + local transformed_text = table.concat(parts, word_part_join_value) + document:replace_cursor(cursor_index,start_line,start_col,end_line,end_col, function() return transformed_text end) + document:move_to_cursor(cursor_index,0,#transformed_text) end) end From dcc64d1f65474e26cdf7f178694b0ea7b4e000aa Mon Sep 17 00:00:00 2001 From: FloppyDisco Date: Sun, 6 Oct 2024 00:08:40 +0200 Subject: [PATCH 4/6] renamed the other one because it sounds better this way. --- transform.lua | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/transform.lua b/transform.lua index 9e1f2d92..0f5d256c 100644 --- a/transform.lua +++ b/transform.lua @@ -91,11 +91,11 @@ local function split(s) end ---- Function to call the transform command for each cursor ----@param document: the document ----@param func fun(cursor_index: number, start_line: number, start_col: number, end_line: number, end_col: number, selected_text: string) ----@param get_word boolean | nil if true the word under the cursor will be retreived if there is no selection for the current cursor, otherwise the cursor positions will be passed directly -local function for_each_selection_of_doc(document, func, get_word) + --- Function to call the transform command for each cursor + ---@param document: the document + ---@param func fun(cursor_index: number, start_line: number, start_col: number, end_line: number, end_col: number, selected_text: string) + ---@param get_word boolean | nil if true the word under the cursor will be retreived if there is no selection for the current cursor, otherwise the cursor positions will be passed directly +local function for_each_cursor(document, func, get_word) -- get_word default value 'true' get_word = get_word == nil or get_word for idx, line1, col1, line2, col2 in document:get_selections(true) do @@ -108,15 +108,15 @@ local function for_each_selection_of_doc(document, func, get_word) end ----transforms the word or selection using the specified separator and clean function ----@param document: the document ----@param word_part_join_value string a string value to join the word parts with ----@param word_part_clean fun(word_part: string, i: number) | nil must return the cleaned word_part + ---transforms the word or selection using the specified separator and clean function + ---@param document: the document + ---@param word_part_join_value string a string value to join the word parts with + ---@param word_part_clean fun(word_part: string, i: number) | nil must return the cleaned word_part local function transform(document, word_part_join_value , word_part_clean) if word_part_clean == nil then word_part_clean = function (w,i) return w end end - for_each_selection_of_doc( + for_each_cursor( document, function(cursor_index, start_line, start_col, end_line, end_col, selected_text) @@ -194,7 +194,7 @@ command.add("core.docview", { command.add("core.docview", { [command_names.uppercase] = function(dv) local document = dv.doc - for_each_selection_of_doc( + for_each_cursor( document, function (cursor_index, start_line, start_col, end_line, end_col, selected_text) document:replace_cursor(cursor_index,start_line, start_col, end_line, end_col, @@ -211,7 +211,7 @@ command.add("core.docview", { command.add("core.docview", { [command_names.lowercase] = function(dv) local document = dv.doc - for_each_selection_of_doc( + for_each_cursor( document, function (cursor_index, start_line, start_col, end_line, end_col, selected_text) document:replace_cursor(cursor_index,start_line, start_col, end_line, end_col, @@ -229,7 +229,7 @@ command.add("core.docview", { command.add("core.docview", { [command_names.capitalize_word] = function(dv) local document = dv.doc - for_each_selection_of_doc( + for_each_cursor( document, function (cursor_index, start_line, start_col, end_line, end_col, selected_text) document:replace_cursor(cursor_index, start_line, start_col, end_line, end_col, @@ -250,7 +250,7 @@ command.add("core.docview", { command.add("core.docview", { [command_names.uppercase_next] = function(dv) local document = dv.doc - for_each_selection_of_doc( + for_each_cursor( document, function (cursor_index, start_line, start_col) document:replace_cursor(cursor_index, start_line, start_col, start_line, start_col+1, @@ -270,7 +270,7 @@ command.add("core.docview", { command.add("core.docview", { [command_names.lowercase_next] = function(dv) local document = dv.doc - for_each_selection_of_doc( + for_each_cursor( document, function (cursor_index, start_line, start_col) document:replace_cursor(cursor_index, start_line, start_col, start_line, start_col+1, From 83927b6db156a42fe51a258b0530bb7d873b2739 Mon Sep 17 00:00:00 2001 From: FloppyDisco Date: Mon, 7 Oct 2024 13:48:31 +0200 Subject: [PATCH 5/6] refactored out unnecessary function --- transform.lua | 167 +++++++++++++++++++++----------------------------- 1 file changed, 70 insertions(+), 97 deletions(-) diff --git a/transform.lua b/transform.lua index 0f5d256c..6af7eb5c 100644 --- a/transform.lua +++ b/transform.lua @@ -90,58 +90,45 @@ local function split(s) return result end + ---transforms the word or selection using the specified separator and clean function + ---@param document core.doc + ---@param word_part_join_value string + ---@param word_part_clean fun(word_part: string, i: number) | nil +local function transform(document, word_part_join_value , word_part_clean) - --- Function to call the transform command for each cursor - ---@param document: the document - ---@param func fun(cursor_index: number, start_line: number, start_col: number, end_line: number, end_col: number, selected_text: string) - ---@param get_word boolean | nil if true the word under the cursor will be retreived if there is no selection for the current cursor, otherwise the cursor positions will be passed directly -local function for_each_cursor(document, func, get_word) - -- get_word default value 'true' - get_word = get_word == nil or get_word - for idx, line1, col1, line2, col2 in document:get_selections(true) do - if get_word then - func(idx, get_word_or_selection(document, line1, col1, line2, col2)) - else - func(idx, line1, col1, line2, col2, document:get_text(line1, col1, line2, col2)) - end + if word_part_clean == nil then + word_part_clean = function (w,i) return w end end -end + -- for each cursor ... iterate backwards to avoid shifting the text + for cursor_index, line1, col1, line2, col2 in document:get_selections(true, true) do - ---transforms the word or selection using the specified separator and clean function - ---@param document: the document - ---@param word_part_join_value string a string value to join the word parts with - ---@param word_part_clean fun(word_part: string, i: number) | nil must return the cleaned word_part -local function transform(document, word_part_join_value , word_part_clean) - if word_part_clean == nil then - word_part_clean = function (w,i) return w end + local start_line, start_col, end_line, end_col, selected_text = get_word_or_selection(document, line1, col1, line2, col2) + + -- split word parts + -- -------------------- + -- by (lower)(upper) + selected_text = selected_text:gsub("([%l%d])([%u])", "%1_%2") + -- by single (upper)s + selected_text = selected_text:gsub("([%u%d])(%u)(%l)", "%1_%2%3") + local parts = split(selected_text) + + -- clean each word part + for i,word_part in ipairs(parts) do + parts[i] = word_part_clean(word_part, i) end - for_each_cursor( - document, - function(cursor_index, start_line, start_col, end_line, end_col, selected_text) - - -- split word parts - -- -------------------- - -- by (lower)(upper) - selected_text = selected_text:gsub("([%l%d])([%u])", "%1_%2") - -- by single (upper)s - selected_text = selected_text:gsub("([%u%d])(%u)(%l)", "%1_%2%3") - local parts = split(selected_text) - - -- clean each word part - for i,word_part in ipairs(parts) do - parts[i] = word_part_clean(word_part, i) - end - -- replace text - local transformed_text = table.concat(parts, word_part_join_value) - document:replace_cursor(cursor_index,start_line,start_col,end_line,end_col, function() return transformed_text end) - document:move_to_cursor(cursor_index,0,#transformed_text) - end) + -- replace text + local transformed_text = table.concat(parts, word_part_join_value) + document:replace_cursor(cursor_index,start_line,start_col,end_line,end_col, function() return transformed_text end) + document:move_to_cursor(cursor_index,0,#transformed_text) + end end local function capitalize(word) - return word:sub(1, 1):upper() .. word:sub(2):lower() + return word:gsub("(%w)(%w*)", function(first, rest) + return first:upper() .. rest:lower() + end) end @@ -149,6 +136,14 @@ end -- | Transform Commands | -- |----------------------------------| +-- To PascalCase +-- ----------------- +command.add("core.docview", { + [command_names.pascal_case] = function(dv) + transform(dv.doc, "", capitalize) + end, +}) + -- To Snake_Case -- ----------------- command.add("core.docview", { @@ -173,14 +168,6 @@ command.add("core.docview", { end, }) --- To PascalCase --- ----------------- -command.add("core.docview", { - [command_names.pascal_case] = function(dv) - transform(dv.doc, "", capitalize) - end, -}) - -- To kebab-case -- ----------------- command.add("core.docview", { @@ -194,15 +181,14 @@ command.add("core.docview", { command.add("core.docview", { [command_names.uppercase] = function(dv) local document = dv.doc - for_each_cursor( - document, - function (cursor_index, start_line, start_col, end_line, end_col, selected_text) - document:replace_cursor(cursor_index,start_line, start_col, end_line, end_col, + for cursor_index, line1, col1, line2, col2 in document:get_selections(true, true) do + local start_line, start_col, end_line, end_col, selected_text = get_word_or_selection(document, line1, col1, line2, col2) + document:replace_cursor(cursor_index,start_line, start_col, end_line, end_col, function () return selected_text:upper() - end) - end - ) + end + ) + end end, }) @@ -210,38 +196,35 @@ command.add("core.docview", { -- ---------------- command.add("core.docview", { [command_names.lowercase] = function(dv) - local document = dv.doc - for_each_cursor( - document, - function (cursor_index, start_line, start_col, end_line, end_col, selected_text) - document:replace_cursor(cursor_index,start_line, start_col, end_line, end_col, + local document = dv.doc + for cursor_index, line1, col1, line2, col2 in document:get_selections(true, true) do + local start_line, start_col, end_line, end_col, selected_text = get_word_or_selection(document, line1, col1, line2, col2) + document:replace_cursor(cursor_index,start_line, start_col, end_line, end_col, function () return selected_text:lower() - end) - end - ) + end + ) + end end, }) - -- Capitalize Word -- ------------------- command.add("core.docview", { [command_names.capitalize_word] = function(dv) local document = dv.doc - for_each_cursor( - document, - function (cursor_index, start_line, start_col, end_line, end_col, selected_text) - document:replace_cursor(cursor_index, start_line, start_col, end_line, end_col, + for cursor_index, line1, col1, line2, col2 in document:get_selections(true, true) do + local start_line, start_col, end_line, end_col, selected_text = get_word_or_selection(document, line1, col1, line2, col2) + document:replace_cursor(cursor_index, start_line, start_col, end_line, end_col, function () local words = split(selected_text) for i,word in ipairs(words) do words[i] = capitalize(word) end return table.concat(words," ") - end) - end - ) + end + ) + end end, }) @@ -250,18 +233,14 @@ command.add("core.docview", { command.add("core.docview", { [command_names.uppercase_next] = function(dv) local document = dv.doc - for_each_cursor( - document, - function (cursor_index, start_line, start_col) - document:replace_cursor(cursor_index, start_line, start_col, start_line, start_col+1, + for cursor_index, line1, col1 in document:get_selections(true, true) do + document:replace_cursor(cursor_index, line1, col1, line1, col1+1, function (text) return text:upper() - end) - document:move_to_cursor(cursor_index,0,1) - end, - -- get_word = - false - ) + end + ) + document:move_to_cursor(cursor_index,0,1) + end end, }) @@ -270,22 +249,16 @@ command.add("core.docview", { command.add("core.docview", { [command_names.lowercase_next] = function(dv) local document = dv.doc - for_each_cursor( - document, - function (cursor_index, start_line, start_col) - document:replace_cursor(cursor_index, start_line, start_col, start_line, start_col+1, - function (text) - return text:lower() - end) - document:move_to_cursor(cursor_index,0,1) - end, - -- get_word = - false - ) + for cursor_index, line1, col1 in document:get_selections(true, true) do + document:replace_cursor(cursor_index, line1, col1, line1, col1+1, + function (text) + return text:lower() + end) + document:move_to_cursor(cursor_index,0,1) + end end, }) - -- not sure best way to add a keybind for both platforms keymap.add { ["cmd+option+u"] = command_names.uppercase_next, From fbadceb5d05fcacbd41900af0a376f2d805ee4a5 Mon Sep 17 00:00:00 2001 From: FloppyDisco Date: Mon, 7 Oct 2024 13:50:11 +0200 Subject: [PATCH 6/6] updated manifest.json --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index d5a4c770..aefe3059 100644 --- a/manifest.json +++ b/manifest.json @@ -2258,7 +2258,7 @@ "version": "1.3" }, { - "description": "Commands to transform cases", + "description": "Commands for transforming cases", "id": "transform", "name": "Transform", "path": "plugins/transform.lua",