new structure

This commit is contained in:
00xJ4CK committed 2024-12-31 02:19:32 +05:45
1 parent d3f06cbee8
commit 2a0e6f86c6
72 files changed
+2659 -2947

No files matched your search

+13 -68
View File
@@ -18,18 +18,6 @@ vim.g.maplocalleader = ' '
map({ 'n', 'v' }, '<leader>/', 'gcc', { desc = 'Comment toggle', remap = true })
map({ 'v', 'x' }, '<leader>/', 'gc', { desc = 'Comment toggle', remap = true })
-- save file
map({ 'x', 'i', 'n', 's' }, '<C-s>', '<cmd>w<cr>', { desc = 'Save File' })
-- Shortcut for surrounding a word (inner) with a '
map('n', 'S', '<nop>') -- Don't keep S mapping
map('n', 'Sq', "Siw'", { desc = "Wrap word with '", remap = true })
map('n', 'Sp', 'SiW(', { desc = 'Wrap word with ()', remap = true })
map('n', 'Sb', 'Saw}', { desc = 'Wrap word with {}', remap = true })
-- Remove all text
map('n', '<leader>r', '<cmd>%d+<cr>', { desc = 'General | Remove All Text', silent = true })
-- Able to use semicolon in normal mode
map('n', ';', ':', { desc = '; Command mode' })
@@ -79,6 +67,12 @@ map({ 'v', 'x' }, 'K', ":move '<-2<CR>gv-gv", opts)
-- Clear search, diff update and redraw
map({ 'i', 'n' }, '<esc>', '<cmd>noh<cr><esc>', { desc = 'Escape and clear hlsearch' })
-- Cursor navigation on insert mode
map('i', '<M-h>', '<left>', { desc = 'Move Cursor Left' })
map('i', '<M-l>', '<right>', { desc = 'Move Cursor Left' })
map('i', '<M-j>', '<down>', { desc = 'Move Cursor Left' })
map('i', '<M-k>', '<up>', { desc = 'Move Cursor Left' })
-- Consistent n/N search navigation
map('n', 'n', "'Nn'[v:searchforward]", { expr = true, desc = 'Next search result' })
map('x', 'n', "'Nn'[v:searchforward]", { expr = true, desc = 'Next search result' })
@@ -96,59 +90,10 @@ map('i', ',', ',<c-g>u')
map('i', '.', '.<c-g>u')
map('i', ';', ';<c-g>u')
map('n', 'd', '"_d', { desc = 'Delete without replacing clipboad' })
map('n', 'x', '"_x', { desc = 'Cut without replacing clipboad' })
map('n', 'c', '"_c', { desc = 'Change without replacing clipboad' })
map('v', 'p', '"_dP', { desc = 'Paste without replacing clipboard' })
map('n', '<leader>oz', function()
---@diagnostic disable-next-line: undefined-field
if vim.opt.foldcolumn:get() == '0' then
vim.opt.foldcolumn = '1'
else
vim.opt.foldcolumn = '0'
end
end, { desc = 'Toggle foldcolumn' })
map('n', '<leader>op', function()
vim.g.minipairs_disable = not vim.g.minipairs_disable and true or false
end, { desc = 'Toggle mini.pairs' })
-- -- Indent backward
-- vim.keymap.set("n", "<", "<<", { desc = "General | Indent backward", silent = true })
--
-- -- Indent forward
-- vim.keymap.set("n", ">", ">>", { desc = "General | Indent forward", silent = true })
--
-- -- Move the line up
-- vim.keymap.set("n", "<A-j>", "<cmd>m .+1<CR>==", { desc = "General | Move the line up", silent = true })
--
-- -- Move the line down
-- vim.keymap.set("n", "<A-k>", "<cmd>m .-2<CR>==", { desc = "General | Move the line down", silent = true })
--
-- -- Move the line up (Insert Mode)
-- vim.keymap.set("i", "<A-j>", "<Esc>:m .+1<CR>==gi", { desc = "General | Move the line up", silent = true })
--
-- -- Move the line down (Insert Mode)
-- vim.keymap.set("i", "<A-k>", "<Esc>:m .-2<CR>==gi", { desc = "General | Move the line down", silent = true })
--
-- -- Better Down (Visual Mode)
-- vim.keymap.set("v", "j", "v:count == 0 ? 'gj' : 'j'", { desc = "General | Better Down", expr = true, silent = true })
--
-- -- Better Up (Visual Mode)
-- vim.keymap.set("v", "k", "v:count == 0 ? 'gk' : 'k'", { desc = "General | Better Up", expr = true, silent = true })
--
-- -- Better Paste (Visual Mode)
-- vim.keymap.set("v", "p", '"_dP', { desc = "General | Better Paste", silent = true })
--
-- -- Indent backward (Visual Mode)
-- vim.keymap.set("v", "<", "<gv", { desc = "General | Indent backward", silent = true })
--
-- -- Indent forward (Visual Mode)
-- vim.keymap.set("v", ">", ">gv", { desc = "General | Indent forward", silent = true })
--
-- -- Move the selected text up (Visual Mode)
-- vim.keymap.set("v", "<A-j>", "<cmd>m '>+1<CR>gv=gv", { desc = "General | Move the selected text up", silent = true })
--
-- -- Move the selected text down (Visual Mode)
-- vim.keymap.set("v", "<A-k>", "<cmd>m '<-2<CR>gv=gv", { desc = "General | Move the selected text down", silent = true })
-- Move Lines
vim.keymap.set('n', '<A-j>', ':m .+1<CR>==', { desc = 'Move lines', silent = true })
vim.keymap.set('v', '<A-j>', ":m '>+1<CR>gv=gv", { desc = 'Move lines', silent = true })
vim.keymap.set('i', '<A-j>', '<Esc>:m .+1<CR>==gi', { desc = 'Move lines', silent = true })
vim.keymap.set('n', '<A-k>', ':m .-2<CR>==', { desc = 'Move lines', silent = true })
vim.keymap.set('v', '<A-k>', ":m '<-2<CR>gv=gv", { desc = 'Move lines', silent = true })
vim.keymap.set('i', '<A-k>', '<Esc>:m .-2<CR>==gi', { desc = 'Move lines', silent = true })