From 9e3d55617c072efcb114c518d4a59c949c51f11a Mon Sep 17 00:00:00 2001 From: leafee98 Date: Thu, 14 Dec 2023 21:45:10 +0800 Subject: [PATCH] replace single quote to double, lowercase --- init.lua | 24 ++++++++++++------------ lua/plugins/10-editor.lua | 2 +- lua/plugins/13-lines.lua | 28 ++++++++++++++-------------- lua/plugins/15-tree.lua | 4 ++-- lua/plugins/20-git.lua | 32 ++++++++++++++++---------------- 5 files changed, 45 insertions(+), 45 deletions(-) diff --git a/init.lua b/init.lua index e8d8719..1fcbf46 100644 --- a/init.lua +++ b/init.lua @@ -18,20 +18,20 @@ vim.o.list = true vim.o.relativenumber = true vim.o.number = true -vim.keymap.set("n", "\\q", "wincmd q", { silent = true }) -vim.keymap.set("n", "zh", "wincmd h", { silent = true }) -vim.keymap.set("n", "zj", "wincmd j", { silent = true }) -vim.keymap.set("n", "zk", "wincmd k", { silent = true }) -vim.keymap.set("n", "zl", "wincmd l", { silent = true }) +vim.keymap.set("n", "\\q", "wincmd q", { silent = true }) +vim.keymap.set("n", "zh", "wincmd h", { silent = true }) +vim.keymap.set("n", "zj", "wincmd j", { silent = true }) +vim.keymap.set("n", "zk", "wincmd k", { silent = true }) +vim.keymap.set("n", "zl", "wincmd l", { silent = true }) -vim.keymap.set("n", "zch", "wincmd H", { silent = true }) -vim.keymap.set("n", "zcj", "wincmd J", { silent = true }) -vim.keymap.set("n", "zck", "wincmd K", { silent = true }) -vim.keymap.set("n", "zcl", "wincmd L", { silent = true }) +vim.keymap.set("n", "zch", "wincmd H", { silent = true }) +vim.keymap.set("n", "zcj", "wincmd J", { silent = true }) +vim.keymap.set("n", "zck", "wincmd K", { silent = true }) +vim.keymap.set("n", "zcl", "wincmd L", { silent = true }) -vim.keymap.set("n", "zn", "bnext", { silent = true }) -vim.keymap.set("n", "zp", "bprevious", { silent = true }) -vim.keymap.set("n", "zx", "bdelete", { silent = true }) +vim.keymap.set("n", "zn", "bnext", { silent = true }) +vim.keymap.set("n", "zp", "bprevious", { silent = true }) +vim.keymap.set("n", "zx", "bdelete", { silent = true }) vim.keymap.set("n", "nh", "nohlsearch", { silent = true }) diff --git a/lua/plugins/10-editor.lua b/lua/plugins/10-editor.lua index 168c300..d6f8926 100644 --- a/lua/plugins/10-editor.lua +++ b/lua/plugins/10-editor.lua @@ -16,7 +16,7 @@ return { { "famiu/bufdelete.nvim", keys = { - { "zx", "Bdelete", mode = "n" }, + { "zx", "Bdelete", mode = "n" }, }, }, { diff --git a/lua/plugins/13-lines.lua b/lua/plugins/13-lines.lua index 7189df3..b9122a9 100644 --- a/lua/plugins/13-lines.lua +++ b/lua/plugins/13-lines.lua @@ -1,9 +1,9 @@ local function my_location() - local line = vim.fn.line('.') - local line_cnt = vim.fn.line('$') - local col = vim.fn.virtcol('.') - local col_cnt = vim.fn.virtcol('$') - 1 - return string.format('%3d(%d):%d(%d)', line, line_cnt, col, col_cnt) + local line = vim.fn.line(".") + local line_cnt = vim.fn.line("$") + local col = vim.fn.virtcol(".") + local col_cnt = vim.fn.virtcol("$") - 1 + return string.format("%3d(%d):%d(%d)", line, line_cnt, col, col_cnt) end return { @@ -49,24 +49,24 @@ return { event = "VeryLazy", opts = { sections = { - lualine_a = { 'mode' }, - lualine_b = { 'branch', 'diff', 'diagnostics' }, - lualine_c = { 'filename' }, - lualine_x = { 'encoding' , 'fileformat', 'filetype' }, - lualine_y = { 'progress' }, + lualine_a = { "mode" }, + lualine_b = { "branch", "diff", "diagnostics" }, + lualine_c = { "filename" }, + lualine_x = { "encoding" , "fileformat", "filetype" }, + lualine_y = { "progress" }, lualine_z = { my_location }, }, inactive_sections = { lualine_a = { }, lualine_b = { }, - lualine_c = { 'filename' }, - lualine_x = { 'encoding', 'fileformat', 'filetype' }, - lualine_y = { 'progress' }, + lualine_c = { "filename" }, + lualine_x = { "encoding", "fileformat", "filetype" }, + lualine_y = { "progress" }, lualine_z = { my_location }, }, options = { disabled_filetypes = { - statusline = {'NvimTree'}, + statusline = {"NvimTree"}, winbar = {}, }, }, diff --git a/lua/plugins/15-tree.lua b/lua/plugins/15-tree.lua index aa8a193..a5cb7b2 100644 --- a/lua/plugins/15-tree.lua +++ b/lua/plugins/15-tree.lua @@ -13,8 +13,8 @@ return{ }, }, keys = { - { "t", "NvimTreeFocus", mode = "n" }, - { "f", "NvimTreeFindFile", mode = "n" }, + { "t", "NvimTreeFocus", mode = "n" }, + { "f", "NvimTreeFindFile", mode = "n" }, }, init = function(_) vim.g.loaded_netrw = 1 diff --git a/lua/plugins/20-git.lua b/lua/plugins/20-git.lua index 841e3c6..ef9874d 100644 --- a/lua/plugins/20-git.lua +++ b/lua/plugins/20-git.lua @@ -18,25 +18,25 @@ return { return "" end, {expr=true}) - m('n', '[h', function() - if vim.wo.diff then return '[c' end + m("n", "[h", function() + if vim.wo.diff then return "[c" end vim.schedule(function() gs.prev_hunk() end) - return '' + return "" end, {expr=true}) - m('n', 'hs', gs.stage_hunk) - m('n', 'hr', gs.reset_hunk) - m('v', 'hs', function() gs.stage_hunk {vim.fn.line("."), vim.fn.line("v")} end) - m('v', 'hr', function() gs.reset_hunk {vim.fn.line("."), vim.fn.line("v")} end) - m('n', 'hS', gs.stage_buffer) - m('n', 'hu', gs.undo_stage_hunk) - m('n', 'hR', gs.reset_buffer) - m('n', 'hp', gs.preview_hunk) - m('n', 'hb', function() gs.blame_line{full=true} end) - -- m('n', 'tb', gs.toggle_current_line_blame) - m('n', 'hd', gs.diffthis) - m('n', 'hD', function() gs.diffthis('~') end) - -- m('n', 'td', gs.toggle_deleted) + m("n", "hs", gs.stage_hunk) + m("n", "hr", gs.reset_hunk) + m("v", "hs", function() gs.stage_hunk {vim.fn.line("."), vim.fn.line("v")} end) + m("v", "hr", function() gs.reset_hunk {vim.fn.line("."), vim.fn.line("v")} end) + m("n", "hS", gs.stage_buffer) + m("n", "hu", gs.undo_stage_hunk) + m("n", "hR", gs.reset_buffer) + m("n", "hp", gs.preview_hunk) + m("n", "hb", function() gs.blame_line{full=true} end) + -- m("n", "tb", gs.toggle_current_line_blame) + m("n", "hd", gs.diffthis) + m("n", "hD", function() gs.diffthis("~") end) + -- m("n", "td", gs.toggle_deleted) end, }, config = function (lazyplug, opts)