This repository has been archived on 2025-10-10. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
.nvim/lua/keybindings.lua
Guz013 0b3c95f039 file-tree explorer, bar and tabs, tmux integration and remaps
Added barbar.nvim for a visual hint of opened buffers/tabs in neovim;
Added neovim-neo-tree for a visual representation of the working
directory, useful for things like directory based routing;
Added better integration with tmux;
Created file for custom remaps.
Created TODO list for things that need to be added to the setup.
2023-11-02 20:47:39 -03:00

30 lines
850 B
Lua

-- Move when highlithed
vim.keymap.set('v', 'J', ":m '>+1<CR>gv=gv");
vim.keymap.set('v', 'K', ":m '<-2<CR>gv=gv");
-- Make cursor stay in place when using J
vim.keymap.set('n', 'J', 'mzJ`z');
-- Make cursor stay in the middle when jumping
-- with ctrl+d and ctrl+u
vim.keymap.set('n', '<C-d>', '<C-d>zz');
vim.keymap.set('n', '<C-u>', '<C-u>zz');
-- Just to be sure, whatever
vim.keymap.set('n', '<C-c>', '<Esc>');
-- Don't press Q
vim.keymap.set('n', 'Q', '<nop>');
-- Delete to the void
vim.keymap.set('n', '<leader>d', '\"_d');
vim.keymap.set('v', '<leader>d', '\"_d');
-- Replace current word in entire file
vim.keymap.set("n", "<leader>s", [[:%s/\<<C-r><C-w>\>/<C-r><C-w>/gI<Left><Left><Left>]])
-- Turn file into a linux executable
vim.keymap.set('n', '<leader>x', '<cmd>!chmod +x %<CR>', { silent = true });
-- Thank you ThePrimeagen