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:
Pratik Tripathy
2023-12-28 14:38:03 +05:30
parent 14bca30695
commit 0402ee5481
35 changed files with 679 additions and 297 deletions

View File

@@ -13,6 +13,14 @@ inoremap <Down> <ESC>:echoe "Use j"<CR>
" Unbind some useless/annoying default key bindings.
nmap Q <Nop>
" Don't do anything on pressing space itself
nnoremap <Space> <Nop>
vnoremap <Space> <Nop>
" Make space-bar the leader-key
let mapleader = " "
let maplocalleader = " "
" Center the cursor when moving through document
nnoremap <C-d> <C-d>zz
nnoremap <C-u> <C-u>zz
@@ -24,6 +32,14 @@ nnoremap ]s ]szz
nnoremap n nzzzv
nnoremap N Nzzzv
" Move visually selected lines around with J & K
vnoremap J :m '>+1<CR>gv=gv
vnoremap K :m '<-2<CR>gv=gv
" Keeps the cursor at the same place when doing J
" And not move to end of the line
nnoremap J mzJ`z:delmarks z<CR>
" Better window/split navigation
map <C-j> <C-w>j
map <C-k> <C-w>k
@@ -31,10 +47,7 @@ map <C-h> <C-w>h
map <C-l> <C-w>l
" Clear searches
nnoremap <Leader>/ :call clearmatches()<CR>:noh<CR>
" Make space-bar the leader-key
let mapleader = " "
nnoremap <leader>/ :call clearmatches()<CR>:noh<CR>
" Changes the pwd to the opened file's directory
nnoremap <leader>cd :lcd %:h<CR>
@@ -44,7 +57,10 @@ map <leader>j <Plug>(easymotion-s)
" Map nerdtree to <Leader>e
" Changes the pwd and opens the VCS root
nnoremap <leader>e :lcd %:h<CR> :NERDTreeToggleVCS<CR>
nnoremap <leader>e :tcd %:h<CR> :NERDTreeToggleVCS<CR>
let g:NERDTreeShowHidden = 1
let g:NERDTreeWinSize = 20
let g:NERDTreeWinSize = 25
" <ctrl-q> to save everything and quit Neovim
nnoremap <C-q> :wqa<CR>