Major config changes
Add alacritty config, as it is my main terminal now Change **a lot** of nvim configs Add tmux configuration Update zsh configs Add .gitconfig with custom pager Include tmux-plugin-manager as a submodule
This commit is contained in:
parent
bb8a0eaec7
commit
90ca95ad38
23 changed files with 529 additions and 51 deletions
|
@ -1,39 +1,25 @@
|
|||
local map = vim.keymap.set
|
||||
|
||||
-- Unbind used keys
|
||||
-- Unbind keys
|
||||
map('n', '<C-q>', '<NOP>')
|
||||
|
||||
-- Movements between splits
|
||||
map('n', '<C-h>', '<C-w>h')
|
||||
map('n', '<C-j>', '<C-w>j')
|
||||
map('n', '<C-k>', '<C-w>k')
|
||||
map('n', '<C-l>', '<C-w>l')
|
||||
map('v', 'K', '<NOP>')
|
||||
|
||||
-- Movement between buffers
|
||||
map({'n', 'v', 'i'}, '<A-h>', ':bp<CR>')
|
||||
map({'n', 'v', 'i'}, '<A-l>', ':bn<CR>')
|
||||
map({'n', 'v', 'i'}, '<A-u>', ':bp<CR>')
|
||||
map({'n', 'v', 'i'}, '<A-i>', ':bn<CR>')
|
||||
|
||||
-- Remap for dealing with word wrap
|
||||
map('n', 'k', "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true })
|
||||
map('n', 'j', "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true })
|
||||
map('n', 'k', 'v:count == 0 ? "gk" : "k"', { expr = true, silent = true })
|
||||
map('n', 'j', 'v:count == 0 ? "gj" : "j"', { expr = true, silent = true })
|
||||
|
||||
-- Exit buffers/nvim with <leader>
|
||||
map("n", "<leader>q", function() require('utils.close_buffer').close_buffer() end)
|
||||
map("n", "<leader><C-q>", function() require('utils.close_buffer').close_buffer(true) end)
|
||||
map("n", "<leader>Q", ":%bd | quit<CR>")
|
||||
map("n", "<leader>w", ":write<CR>")
|
||||
map('n', '<leader>q', function() require('utils.close_buffer').close_buffer() end)
|
||||
map('n', '<leader><C-q>', function() require('utils.close_buffer').close_buffer(true) end)
|
||||
map('n', '<leader>Q', ':%bd | quit<CR>')
|
||||
map('n', '<leader>w', ':write<CR>')
|
||||
|
||||
-- Copy and paste from clipboard
|
||||
map("n", "<leader>y", '"+yy')
|
||||
map("v", "<leader>y", '"+y')
|
||||
map({ "n", "v" }, "<leader>p", '"+p')
|
||||
map({ "n", "v" }, "<leader>P", '"+P')
|
||||
|
||||
-- Remap comments
|
||||
map("n", "<C-_>", require("Comment.api").toggle.linewise.current)
|
||||
map("i", "<C-_>", require("Comment.api").toggle.linewise.current)
|
||||
map("x", "<C-_>", function()
|
||||
vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes('<ESC>', true, false, true), 'nx', false)
|
||||
require("Comment.api").toggle.linewise(vim.fn.visualmode())
|
||||
end
|
||||
)
|
||||
map('n', '<leader>y', '"+yy<ESC>')
|
||||
map('v', '<leader>y', '"+y<ESC>')
|
||||
map({ 'n', 'v' }, '<leader>p', '"+p<ESC>')
|
||||
map({ 'n', 'v' }, '<leader>P', '"+P<ESC>')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue