diff options
author | Timmy Keller <tjk@tjkeller.xyz> | 2022-04-17 10:46:33 -0500 |
---|---|---|
committer | Timmy Keller <tjk@tjkeller.xyz> | 2022-04-17 10:46:33 -0500 |
commit | 06b0c7eb739fd430aacbb46f183cea4aaf17300a (patch) | |
tree | b87398a7ed71ed22d4c43c42f274fbff12c1d578 /nvim | |
parent | aff2302d113a71aee647ab71336e8d68bb844653 (diff) | |
download | dotconfig-06b0c7eb739fd430aacbb46f183cea4aaf17300a.tar.xz dotconfig-06b0c7eb739fd430aacbb46f183cea4aaf17300a.zip |
small changes to zsh and st configsa
Diffstat (limited to 'nvim')
-rwxr-xr-x | nvim/init.vim | 14 |
1 files changed, 10 insertions, 4 deletions
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 .<CR> cnoremap w!! execute 'silent! write !doas tee % >/dev/null' <bar> edit! " Capitalize every word on the line nmap gcc :s/\v<(.)(\w*)/\u\1\L\2/g<CR> +nmap gCC :%s/\v<(.)(\w*)/\u\1\L\2/g<CR> +" HTML shortcuts +nmap gwp I<p><ESC>l4xA</p><ESC> +nmap gwh1 I<h1><ESC>l5xA</h1><ESC> +nmap gwh2 I<h2><ESC>l5xA</h2><ESC> +nmap gwh3 I<h3><ESC>l5xA</h3><ESC> "" 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() |