mirror of
https://github.com/pratiktri/dotfiles.git
synced 2026-02-04 16:41:43 +05:30
NVIM Configuration Enhancements
- VIM: Keybindings for better coding - Gitignore in common is now a hardlinked to the root one - NVIM: Bash Alias added for Nvim - VIM: settings added from VIM-sensible and Primeagen - NVIM: Moved autocommands, keybindings & configurations specific to NVIM to lua/config - Wezterm, tmux configured. - Generic: Configurations moved inside $HOME/.config/ directory - Generic: All aliases renamed to similar names. - Generic: Relevant aliases added for reaching git root
This commit is contained in:
10
common/.config/nvim/lua/configs/autocommands.lua
Normal file
10
common/.config/nvim/lua/configs/autocommands.lua
Normal file
@@ -0,0 +1,10 @@
|
||||
-- [[ Highlight on yank ]]
|
||||
local highlight_group = vim.api.nvim_create_augroup('YankHighlight', { clear = true })
|
||||
vim.api.nvim_create_autocmd('TextYankPost', {
|
||||
callback = function()
|
||||
vim.highlight.on_yank()
|
||||
end,
|
||||
group = highlight_group,
|
||||
pattern = '*',
|
||||
})
|
||||
|
||||
2
common/.config/nvim/lua/configs/configs.lua
Normal file
2
common/.config/nvim/lua/configs/configs.lua
Normal file
@@ -0,0 +1,2 @@
|
||||
-- Nvim Specific Configs that don't apply to VIM
|
||||
|
||||
9
common/.config/nvim/lua/configs/keymaps.lua
Normal file
9
common/.config/nvim/lua/configs/keymaps.lua
Normal file
@@ -0,0 +1,9 @@
|
||||
-- <Ctrl-Alt-s> -> to save all files
|
||||
vim.keymap.set({ "n", "i", "v" }, "<C-M-s>", "<cmd>wa<CR>", {})
|
||||
-- <Ctrl-q> -> Save all files and quit Nvim
|
||||
vim.keymap.set({ "n", "i", "v" }, "<C-q>", "<cmd>wqa<CR>", {})
|
||||
|
||||
-- Remap for dealing with word wrap
|
||||
vim.keymap.set('n', 'k', "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true })
|
||||
vim.keymap.set('n', 'j', "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true })
|
||||
|
||||
Reference in New Issue
Block a user