replace single quote to double, lowercase <CR>
This commit is contained in:
parent
1c0045f059
commit
9e3d55617c
24
init.lua
24
init.lua
|
@ -18,20 +18,20 @@ vim.o.list = true
|
||||||
vim.o.relativenumber = true
|
vim.o.relativenumber = true
|
||||||
vim.o.number = true
|
vim.o.number = true
|
||||||
|
|
||||||
vim.keymap.set("n", "\\q", "<cmd>wincmd q<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", "zh", "<cmd>wincmd h<cr>", { silent = true })
|
||||||
vim.keymap.set("n", "zj", "<cmd>wincmd j<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", "zk", "<cmd>wincmd k<cr>", { silent = true })
|
||||||
vim.keymap.set("n", "zl", "<cmd>wincmd l<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", "zch", "<cmd>wincmd H<cr>", { silent = true })
|
||||||
vim.keymap.set("n", "zcj", "<cmd>wincmd J<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", "zck", "<cmd>wincmd K<cr>", { silent = true })
|
||||||
vim.keymap.set("n", "zcl", "<cmd>wincmd L<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", "zn", "<cmd>bnext<cr>", { silent = true })
|
||||||
vim.keymap.set("n", "zp", "<cmd>bprevious<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", "zx", "<cmd>bdelete<cr>", { silent = true })
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>nh", "<cmd>nohlsearch<cr>", { silent = true })
|
vim.keymap.set("n", "<leader>nh", "<cmd>nohlsearch<cr>", { silent = true })
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ return {
|
||||||
{
|
{
|
||||||
"famiu/bufdelete.nvim",
|
"famiu/bufdelete.nvim",
|
||||||
keys = {
|
keys = {
|
||||||
{ "zx", "<cmd>Bdelete<CR>", mode = "n" },
|
{ "zx", "<cmd>Bdelete<cr>", mode = "n" },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
local function my_location()
|
local function my_location()
|
||||||
local line = vim.fn.line('.')
|
local line = vim.fn.line(".")
|
||||||
local line_cnt = vim.fn.line('$')
|
local line_cnt = vim.fn.line("$")
|
||||||
local col = vim.fn.virtcol('.')
|
local col = vim.fn.virtcol(".")
|
||||||
local col_cnt = vim.fn.virtcol('$') - 1
|
local col_cnt = vim.fn.virtcol("$") - 1
|
||||||
return string.format('%3d(%d):%d(%d)', line, line_cnt, col, col_cnt)
|
return string.format("%3d(%d):%d(%d)", line, line_cnt, col, col_cnt)
|
||||||
end
|
end
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
@ -49,24 +49,24 @@ return {
|
||||||
event = "VeryLazy",
|
event = "VeryLazy",
|
||||||
opts = {
|
opts = {
|
||||||
sections = {
|
sections = {
|
||||||
lualine_a = { 'mode' },
|
lualine_a = { "mode" },
|
||||||
lualine_b = { 'branch', 'diff', 'diagnostics' },
|
lualine_b = { "branch", "diff", "diagnostics" },
|
||||||
lualine_c = { 'filename' },
|
lualine_c = { "filename" },
|
||||||
lualine_x = { 'encoding' , 'fileformat', 'filetype' },
|
lualine_x = { "encoding" , "fileformat", "filetype" },
|
||||||
lualine_y = { 'progress' },
|
lualine_y = { "progress" },
|
||||||
lualine_z = { my_location },
|
lualine_z = { my_location },
|
||||||
},
|
},
|
||||||
inactive_sections = {
|
inactive_sections = {
|
||||||
lualine_a = { },
|
lualine_a = { },
|
||||||
lualine_b = { },
|
lualine_b = { },
|
||||||
lualine_c = { 'filename' },
|
lualine_c = { "filename" },
|
||||||
lualine_x = { 'encoding', 'fileformat', 'filetype' },
|
lualine_x = { "encoding", "fileformat", "filetype" },
|
||||||
lualine_y = { 'progress' },
|
lualine_y = { "progress" },
|
||||||
lualine_z = { my_location },
|
lualine_z = { my_location },
|
||||||
},
|
},
|
||||||
options = {
|
options = {
|
||||||
disabled_filetypes = {
|
disabled_filetypes = {
|
||||||
statusline = {'NvimTree'},
|
statusline = {"NvimTree"},
|
||||||
winbar = {},
|
winbar = {},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -13,8 +13,8 @@ return{
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
keys = {
|
keys = {
|
||||||
{ "<leader>t", "<cmd>NvimTreeFocus<CR>", mode = "n" },
|
{ "<leader>t", "<cmd>NvimTreeFocus<cr>", mode = "n" },
|
||||||
{ "<leader>f", "<cmd>NvimTreeFindFile<CR>", mode = "n" },
|
{ "<leader>f", "<cmd>NvimTreeFindFile<cr>", mode = "n" },
|
||||||
},
|
},
|
||||||
init = function(_)
|
init = function(_)
|
||||||
vim.g.loaded_netrw = 1
|
vim.g.loaded_netrw = 1
|
||||||
|
|
|
@ -18,25 +18,25 @@ return {
|
||||||
return "<Ignore>"
|
return "<Ignore>"
|
||||||
end, {expr=true})
|
end, {expr=true})
|
||||||
|
|
||||||
m('n', '[h', function()
|
m("n", "[h", function()
|
||||||
if vim.wo.diff then return '[c' end
|
if vim.wo.diff then return "[c" end
|
||||||
vim.schedule(function() gs.prev_hunk() end)
|
vim.schedule(function() gs.prev_hunk() end)
|
||||||
return '<Ignore>'
|
return "<Ignore>"
|
||||||
end, {expr=true})
|
end, {expr=true})
|
||||||
|
|
||||||
m('n', '<leader>hs', gs.stage_hunk)
|
m("n", "<leader>hs", gs.stage_hunk)
|
||||||
m('n', '<leader>hr', gs.reset_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>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("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>hS", gs.stage_buffer)
|
||||||
m('n', '<leader>hu', gs.undo_stage_hunk)
|
m("n", "<leader>hu", gs.undo_stage_hunk)
|
||||||
m('n', '<leader>hR', gs.reset_buffer)
|
m("n", "<leader>hR", gs.reset_buffer)
|
||||||
m('n', '<leader>hp', gs.preview_hunk)
|
m("n", "<leader>hp", gs.preview_hunk)
|
||||||
m('n', '<leader>hb', function() gs.blame_line{full=true} end)
|
m("n", "<leader>hb", function() gs.blame_line{full=true} end)
|
||||||
-- m('n', '<leader>tb', gs.toggle_current_line_blame)
|
-- m("n", "<leader>tb", gs.toggle_current_line_blame)
|
||||||
m('n', '<leader>hd', gs.diffthis)
|
m("n", "<leader>hd", gs.diffthis)
|
||||||
m('n', '<leader>hD', function() gs.diffthis('~') end)
|
m("n", "<leader>hD", function() gs.diffthis("~") end)
|
||||||
-- m('n', '<leader>td', gs.toggle_deleted)
|
-- m("n", "<leader>td", gs.toggle_deleted)
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
config = function (lazyplug, opts)
|
config = function (lazyplug, opts)
|
||||||
|
|
Loading…
Reference in a new issue