replace single quote to double, lowercase <CR>

This commit is contained in:
leafee98 2023-12-14 21:45:10 +08:00
parent 1c0045f059
commit 9e3d55617c
5 changed files with 45 additions and 45 deletions

View file

@ -18,20 +18,20 @@ vim.o.list = true
vim.o.relativenumber = true
vim.o.number = true
vim.keymap.set("n", "\\q", "<cmd>wincmd q<CR>", { silent = true })
vim.keymap.set("n", "zh", "<cmd>wincmd h<CR>", { silent = true })
vim.keymap.set("n", "zj", "<cmd>wincmd j<CR>", { silent = true })
vim.keymap.set("n", "zk", "<cmd>wincmd k<CR>", { silent = true })
vim.keymap.set("n", "zl", "<cmd>wincmd l<CR>", { silent = true })
vim.keymap.set("n", "\\q", "<cmd>wincmd q<cr>", { silent = true })
vim.keymap.set("n", "zh", "<cmd>wincmd h<cr>", { silent = true })
vim.keymap.set("n", "zj", "<cmd>wincmd j<cr>", { silent = true })
vim.keymap.set("n", "zk", "<cmd>wincmd k<cr>", { silent = true })
vim.keymap.set("n", "zl", "<cmd>wincmd l<cr>", { silent = true })
vim.keymap.set("n", "zch", "<cmd>wincmd H<CR>", { silent = true })
vim.keymap.set("n", "zcj", "<cmd>wincmd J<CR>", { silent = true })
vim.keymap.set("n", "zck", "<cmd>wincmd K<CR>", { silent = true })
vim.keymap.set("n", "zcl", "<cmd>wincmd L<CR>", { silent = true })
vim.keymap.set("n", "zch", "<cmd>wincmd H<cr>", { silent = true })
vim.keymap.set("n", "zcj", "<cmd>wincmd J<cr>", { silent = true })
vim.keymap.set("n", "zck", "<cmd>wincmd K<cr>", { silent = true })
vim.keymap.set("n", "zcl", "<cmd>wincmd L<cr>", { silent = true })
vim.keymap.set("n", "zn", "<cmd>bnext<CR>", { silent = true })
vim.keymap.set("n", "zp", "<cmd>bprevious<CR>", { silent = true })
vim.keymap.set("n", "zx", "<cmd>bdelete<CR>", { silent = true })
vim.keymap.set("n", "zn", "<cmd>bnext<cr>", { silent = true })
vim.keymap.set("n", "zp", "<cmd>bprevious<cr>", { silent = true })
vim.keymap.set("n", "zx", "<cmd>bdelete<cr>", { silent = true })
vim.keymap.set("n", "<leader>nh", "<cmd>nohlsearch<cr>", { silent = true })

View file

@ -16,7 +16,7 @@ return {
{
"famiu/bufdelete.nvim",
keys = {
{ "zx", "<cmd>Bdelete<CR>", mode = "n" },
{ "zx", "<cmd>Bdelete<cr>", mode = "n" },
},
},
{

View file

@ -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 = {},
},
},

View file

@ -13,8 +13,8 @@ return{
},
},
keys = {
{ "<leader>t", "<cmd>NvimTreeFocus<CR>", mode = "n" },
{ "<leader>f", "<cmd>NvimTreeFindFile<CR>", mode = "n" },
{ "<leader>t", "<cmd>NvimTreeFocus<cr>", mode = "n" },
{ "<leader>f", "<cmd>NvimTreeFindFile<cr>", mode = "n" },
},
init = function(_)
vim.g.loaded_netrw = 1

View file

@ -18,25 +18,25 @@ return {
return "<Ignore>"
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 '<Ignore>'
return "<Ignore>"
end, {expr=true})
m('n', '<leader>hs', gs.stage_hunk)
m('n', '<leader>hr', gs.reset_hunk)
m('v', '<leader>hs', function() gs.stage_hunk {vim.fn.line("."), vim.fn.line("v")} end)
m('v', '<leader>hr', function() gs.reset_hunk {vim.fn.line("."), vim.fn.line("v")} end)
m('n', '<leader>hS', gs.stage_buffer)
m('n', '<leader>hu', gs.undo_stage_hunk)
m('n', '<leader>hR', gs.reset_buffer)
m('n', '<leader>hp', gs.preview_hunk)
m('n', '<leader>hb', function() gs.blame_line{full=true} end)
-- m('n', '<leader>tb', gs.toggle_current_line_blame)
m('n', '<leader>hd', gs.diffthis)
m('n', '<leader>hD', function() gs.diffthis('~') end)
-- m('n', '<leader>td', gs.toggle_deleted)
m("n", "<leader>hs", gs.stage_hunk)
m("n", "<leader>hr", gs.reset_hunk)
m("v", "<leader>hs", function() gs.stage_hunk {vim.fn.line("."), vim.fn.line("v")} end)
m("v", "<leader>hr", function() gs.reset_hunk {vim.fn.line("."), vim.fn.line("v")} end)
m("n", "<leader>hS", gs.stage_buffer)
m("n", "<leader>hu", gs.undo_stage_hunk)
m("n", "<leader>hR", gs.reset_buffer)
m("n", "<leader>hp", gs.preview_hunk)
m("n", "<leader>hb", function() gs.blame_line{full=true} end)
-- m("n", "<leader>tb", gs.toggle_current_line_blame)
m("n", "<leader>hd", gs.diffthis)
m("n", "<leader>hD", function() gs.diffthis("~") end)
-- m("n", "<leader>td", gs.toggle_deleted)
end,
},
config = function (lazyplug, opts)