From cd5cd3ba69e96e1eb21b8c6e6ca8d472ebae0134 Mon Sep 17 00:00:00 2001 From: "Kenneth Benzie (Benie)" Date: Sat, 21 Sep 2024 10:32:18 +0100 Subject: [PATCH] Update comments in commands.lua --- plugin/commands.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugin/commands.lua b/plugin/commands.lua index b40e90b..2a28eab 100644 --- a/plugin/commands.lua +++ b/plugin/commands.lua @@ -1,4 +1,4 @@ --- :RString strip white psace from right of all lines, ranges supported +-- :RStrip strip white psace from right of all lines, ranges supported vim.api.nvim_create_user_command('RStrip', function(opts) local pos = vim.fn.getcurpos(vim.api.nvim_get_current_win()) local range = opts.line1 .. ',' .. opts.line2 @@ -42,7 +42,7 @@ vim.api.nvim_create_user_command('Remove', function(opts) end end end - -- Actually remove the file using the selecte callback. + -- Actually remove the file using the selected callback. vim.loop.fs_unlink(path, callback) end, { bang = true }) @@ -141,6 +141,7 @@ vim.api.nvim_create_user_command('Rg', function(opts) require('telescope.builtin').grep_string(grep_opts) end, { bang = true, range = true, nargs = '*' }) +-- :PreProcIfWrap wraps the given range of lines in #if 0 / #endif. vim.api.nvim_create_user_command('PreProcIfWrap', function(opts) local buffer = vim.api.nvim_get_current_buf() vim.api.nvim_buf_set_lines( @@ -151,6 +152,7 @@ vim.api.nvim_create_user_command('PreProcIfWrap', function(opts) vim.api.nvim_win_set_cursor(window, { opts.line1, 5 }) end, { range = true }) +-- :CheckboxToggle toggles GitHub Flavoured Markdown style checkboxes. vim.api.nvim_create_user_command('CheckboxToggle', function(opts) local linenr = vim.fn.line('.') local line = vim.fn.getline(linenr)