From 06b0c7eb739fd430aacbb46f183cea4aaf17300a Mon Sep 17 00:00:00 2001 From: Timmy Keller Date: Sun, 17 Apr 2022 10:46:33 -0500 Subject: small changes to zsh and st configsa --- nvim/init.vim | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'nvim') diff --git a/nvim/init.vim b/nvim/init.vim index ab3a9d3..e017191 100755 --- a/nvim/init.vim +++ b/nvim/init.vim @@ -81,14 +81,20 @@ vnoremap . :normal . cnoremap w!! execute 'silent! write !doas tee % >/dev/null' edit! " Capitalize every word on the line nmap gcc :s/\v<(.)(\w*)/\u\1\L\2/g +nmap gCC :%s/\v<(.)(\w*)/\u\1\L\2/g +" HTML shortcuts +nmap gwp I

l4xA

+nmap gwh1 I

l5xA

+nmap gwh2 I

l5xA

+nmap gwh3 I

l5xA

"" Extra functionality " Colorscheme for root and normal users (since vimrc is just symlinked to the root user's home) if ($USER) == 'root' - colorscheme zellner + colorscheme koehler else if empty($DISPLAY) - colorscheme default + colorscheme koehler else set bg=dark let g:gruvbox_contrast_dark = 'hard' @@ -131,8 +137,8 @@ endif " Automatically deletes all trailing whitespace on save function DelWS() - :norm m` + let l:save_view = winsaveview() :%s/\s*$//e - :norm g`` + call winrestview(l:save_view) endfunction autocmd BufWritePre * call DelWS() -- cgit v1.2.3