mirror of
https://github.com/boxpositron/absolute-vim.git
synced 2026-02-28 03:30:36 +00:00
- Add configuration for Jedi-Vim plugin in `lua/absolute/plugins/jedi.lua` - Create `lua/absolute/after/jedi.lua` to set Jedi-Vim mappings and options fix: fix lualine theme and add custom section - Update `lua/absolute/after/lualine.lua` to fix the lualine theme configuration - Add a custom section to display the Poetv status line in lualine feat: add keybindings for Poetv plugin - Add keybindings for activating and deactivating virtualenv in `lua/absolute/after/poet-v.lua` fix: fix remap keybindings - Update `lua/absolute/remap.lua` to fix and improve remap keybindings feat: add alternate escape keybinding - Add keybinding to use <C-c> as an alternate escape key in insert mode fix: disable Q keybinding - Disable the Q keybinding to prevent accidentally entering Ex mode feat: add keybinding for formatting document with LSP Formatter - Add keybinding to format the document using the LSP Formatter feat: add keybindings for navigation quick fixes - Add keybindings for navigating through quick fixes in the location list and the quickfix list feat: add keybinding for regex replace - Add keybinding to perform a regex replace in the entire file feat: add keybinding for sourcing file - Add keybinding to source the current file feat: add keybinding for toggling TMUX pane - Add keybinding to toggle the TMUX pane using MaximizerToggle command
91 lines
2.9 KiB
Lua
91 lines
2.9 KiB
Lua
local opts = { noremap = true, silent = true }
|
|
|
|
opts.desc = "Toggle File Explorer"
|
|
vim.keymap.set("n", "<leader>\\", "<cmd>NvimTreeToggle<CR>", opts) -- toggle file explorer
|
|
|
|
|
|
-- Move selected line / block of text in visual mode up
|
|
opts.desc = "Move selected line / block of text in visual mode up"
|
|
vim.keymap.set("v", "J", ":m '>+1<CR>gv=gv", opts)
|
|
|
|
-- Move selected line / block of text in visual mode down
|
|
opts.desc = "Move selected line / block of text in visual mode down"
|
|
vim.keymap.set("v", "K", ":m '<-2<CR>gv=gv", opts)
|
|
|
|
|
|
-- Join current line with the line below it
|
|
opts.desc = "Join current line with the line below it"
|
|
vim.keymap.set("n", "J", "mzJ`z", opts)
|
|
|
|
|
|
-- Move half page down
|
|
opts.desc = "Move half page down"
|
|
vim.keymap.set("n", "<C-d>", "<C-d>zz", opts)
|
|
|
|
-- Move half page up
|
|
opts.desc = "Move half page up"
|
|
vim.keymap.set("n", "<C-u>", "<C-u>zz", opts)
|
|
|
|
-- Navigate to next search result, center screen and expand folded text
|
|
opts.desc = "Navigate to next search result, center screen and expand folded text"
|
|
vim.keymap.set("n", "n", "nzzzv", opts)
|
|
|
|
-- Navigate to previous search result, center screen and expand folded text,
|
|
opts.desc = "Navigate to previous search result, center screen and expand folded text"
|
|
vim.keymap.set("n", "N", "Nzzzv", opts)
|
|
|
|
-- Delete selected text and paste from register
|
|
opts.desc = "Delete selected text and paste from register"
|
|
vim.keymap.set("x", "<leader>p", [["_dP]], opts)
|
|
|
|
-- Copy selected text into system clipboard
|
|
opts.desc = "Copy selected text into system clipboard"
|
|
vim.keymap.set({ "n", "v" }, "<leader>y", [["+y]], opts)
|
|
|
|
-- Copy current line into system clipboard
|
|
opts.desc = "Copy current line into system clipboard"
|
|
vim.keymap.set("n", "<leader>Y", [["+Y]], opts)
|
|
|
|
|
|
-- Delete (blackhole)
|
|
opts.desc = "Delete current line (blackhole)"
|
|
vim.keymap.set({ "n", "v" }, "<leader>d", [["_d]], opts)
|
|
|
|
|
|
-- Alternate Escape (Easy to Reach)
|
|
opts.desc = "Alternate Escape (Easy to Reach)"
|
|
vim.keymap.set("i", "<C-c>", "<Esc>", opts)
|
|
|
|
|
|
-- Disable Q - Nothing Good Ever Happens
|
|
-- Q is normally used to enable Ex mode. We dont want that
|
|
opts.desc = "Disable Q - Nothing Good Ever Happens"
|
|
vim.keymap.set("n", "Q", "<nop>", opts)
|
|
|
|
-- Format document with LSP Formatter
|
|
opts.desc = "Format document with LSP Formatter"
|
|
vim.keymap.set("n", "<leader>f", vim.lsp.buf.format, opts)
|
|
|
|
-- Navigation Quick Fixes
|
|
--
|
|
-- vim.keymap.set("n", "<C-k>", "<cmd>cnext<CR>zz", opts)
|
|
-- vim.keymap.set("n", "<C-j>", "<cmd>cprev<CR>zz", opts)
|
|
-- vim.keymap.set("n", "<leader>k", "<cmd>lnext<CR>zz", opts)
|
|
-- vim.keymap.set("n", "<leader>j", "<cmd>lprev<CR>zz", opts)
|
|
--
|
|
|
|
-- Search Regex Keymap
|
|
opts.desc = "Regex Replace"
|
|
vim.keymap.set("n", "<leader>s", [[:%s/\<<C-r><C-w>\>/<C-r><C-w>/gI<Left><Left><Left>]], opts)
|
|
|
|
|
|
-- Source File Keymap
|
|
opts.desc = "Source File"
|
|
vim.keymap.set("n", "<leader><leader>", function()
|
|
vim.cmd("so")
|
|
end, opts)
|
|
|
|
-- Manage VIM Maximizer
|
|
opts.desc = "Toggle TMUX Pane"
|
|
vim.keymap.set("n", "<leader>sm", "<cmd>MaximizerToggle<CR>", opts)
|