mirror of
				https://github.com/ItsDrike/dotfiles.git
				synced 2025-11-04 09:16:36 +00:00 
			
		
		
		
	Merge branch 'arch' into gentoo
This commit is contained in:
		
						commit
						3ea94ec58c
					
				
					 3 changed files with 47 additions and 20 deletions
				
			
		| 
						 | 
				
			
			@ -6,6 +6,7 @@ let config_dir = system('echo -n "${XDG_CONFIG_HOME:-$HOME/.config}/nvim"')
 | 
			
		|||
let rc_dir = config_dir.'/rc'
 | 
			
		||||
execute 'source '.rc_dir.'/base.vim'
 | 
			
		||||
execute 'source '.rc_dir.'/mappings.vim'
 | 
			
		||||
execute 'source '.rc_dir.'/abbreviations.vim'
 | 
			
		||||
execute 'source '.rc_dir.'/autocmd.vim'
 | 
			
		||||
execute 'source '.rc_dir.'/plugins.vim'
 | 
			
		||||
" Needs to be below plugins for colorscheme
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										11
									
								
								home/.config/nvim/rc/abbreviations.vim
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								home/.config/nvim/rc/abbreviations.vim
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,11 @@
 | 
			
		|||
cnoreabbrev Wq wq
 | 
			
		||||
cnoreabbrev wQ wq
 | 
			
		||||
cnoreabbrev WQ wq
 | 
			
		||||
cnoreabbrev Wa wa
 | 
			
		||||
cnoreabbrev W w
 | 
			
		||||
cnoreabbrev Q q
 | 
			
		||||
cnoreabbrev Qall qall
 | 
			
		||||
cnoreabbrev W! w!
 | 
			
		||||
cnoreabbrev Q! q!
 | 
			
		||||
cnoreabbrev Qall! qall!
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -1,3 +1,38 @@
 | 
			
		|||
" Unmap arrow keys in normal mode to remove bad habits
 | 
			
		||||
nnoremap <Down> <nop>
 | 
			
		||||
nnoremap <Left> <nop>
 | 
			
		||||
nnoremap <Right> <nop>
 | 
			
		||||
nnoremap <Up> <nop>
 | 
			
		||||
 | 
			
		||||
" Stop search highlight on esc (until next search)
 | 
			
		||||
map <silent> <esc> :noh<CR>
 | 
			
		||||
 | 
			
		||||
" System clipboard interactions
 | 
			
		||||
map <C-c> "+y
 | 
			
		||||
vnoremap <C-v> "+p
 | 
			
		||||
 | 
			
		||||
" Spell-check set to <leader>o, 'o' for 'orthography'
 | 
			
		||||
map <leader>o :setlocal spell! spelllang=en_US<CR>
 | 
			
		||||
 | 
			
		||||
" Use shift to move 10 lines up/down quickly
 | 
			
		||||
noremap <silent> K 10k
 | 
			
		||||
noremap <silent> J 10j
 | 
			
		||||
 | 
			
		||||
" Tab navigation
 | 
			
		||||
nnoremap <Tab> gt
 | 
			
		||||
nnoremap <S-Tab> gT
 | 
			
		||||
nnoremap <silent> <A-t> :tabnew<CR>
 | 
			
		||||
nnoremap <silent> <A-2> :tabmove +<CR>
 | 
			
		||||
nnoremap <silent> <A-1> :tabmove -<CR>
 | 
			
		||||
nnoremap <A-p> :tabp<CR>
 | 
			
		||||
nnoremap <A-n> :tabn<CR>
 | 
			
		||||
 | 
			
		||||
" Alias replace all
 | 
			
		||||
nnoremap <A-s> :%s//gI<Left><Left><Left>
 | 
			
		||||
 | 
			
		||||
" Save file as sudo when no write permissions
 | 
			
		||||
cmap w!! w !sudo tee > /dev/null %
 | 
			
		||||
 | 
			
		||||
" Remap splits navigation to just CTRL + hjkl
 | 
			
		||||
nnoremap <C-h> <C-w>h
 | 
			
		||||
nnoremap <C-j> <C-w>j
 | 
			
		||||
| 
						 | 
				
			
			@ -10,23 +45,3 @@ noremap <silent> <C-Right> :vertical resize -3<CR>
 | 
			
		|||
noremap <silent> <C-Up> :resize +3<CR>
 | 
			
		||||
noremap <silent> <C-Down> :resize -3<CR>
 | 
			
		||||
 | 
			
		||||
" Spell-check set to <leader>o, 'o' for 'orthography'
 | 
			
		||||
map <leader>o :setlocal spell! spelllang=en_US<CR>
 | 
			
		||||
 | 
			
		||||
" Stop search highlight (until next search)
 | 
			
		||||
map <silent> <esc> :noh<CR>
 | 
			
		||||
 | 
			
		||||
" System clipboard interactions
 | 
			
		||||
map <C-c> "+y
 | 
			
		||||
vnoremap <C-v> "+p
 | 
			
		||||
 | 
			
		||||
" Unmap arrow keys in normal mode to remove bad habits
 | 
			
		||||
nnoremap <Down> <nop>
 | 
			
		||||
nnoremap <Left> <nop>
 | 
			
		||||
nnoremap <Right> <nop>
 | 
			
		||||
nnoremap <Up> <nop>
 | 
			
		||||
 | 
			
		||||
" Use shift to move 10 lines up/down quickly
 | 
			
		||||
noremap <silent> K 10k
 | 
			
		||||
noremap <silent> J 10j
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue