From 879e920a8dd8c1ca3c391ad3eef2758d09d85b3d Mon Sep 17 00:00:00 2001 From: Augusto Gunsch Date: Mon, 17 Jan 2022 19:30:15 -0300 Subject: [PATCH] General improvements --- config/nvim/init.vim | 15 ++++++++------- home/aliases | 4 ++-- home/xinitrc | 1 + 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/config/nvim/init.vim b/config/nvim/init.vim index f8eadd3..3ecbd7e 100644 --- a/config/nvim/init.vim +++ b/config/nvim/init.vim @@ -11,9 +11,6 @@ colorscheme torte set list set listchars=tab:*·,lead:·,trail:~,extends:>,precedes:< set noet -set ts=8 -set sw=8 -set nohlsearch filetype indent off hi Whitespace ctermfg=233 hi SignColumn ctermbg=233 @@ -27,10 +24,12 @@ hi FoldColumn ctermbg=233 ctermfg=247 let mapleader = " " let maplocalleader = "," -nnoremap set et:set ts=4:set sw=4 -nnoremap set noet:set ts=8:set sw=8 +nnoremap set etset ts=4set sw=4 +nnoremap set noet nnoremap ToggleDiagOff:Gdiffsplit nnoremap ToggleDiag +nnoremap %!expand -t4%!sed 's/[ \t]*$//' +nnoremap %!unexpand -t4%!sed 's/[ \t]*$//' noremap - ddp nnoremap _ ddkP @@ -45,8 +44,6 @@ nnoremap dL 0D vnoremap " a"``> nnoremap H 0 nnoremap L $ -" auto indent -"vnoremap :lua vim.lsp.buf.range_formatting() call plug#begin('~/.config/nvim/plugged') @@ -71,6 +68,10 @@ call plug#end() nnoremap silent NERDTreeToggle +augroup python + autocmd FileType python :iabbrev frompdb from pdb import set_trace; set_trace() +augroup END + augroup nerdtree " Exit Vim if NERDTree is the only window remaining in the only tab. autocmd BufEnter * if tabpagenr('$') == 1 && winnr('$') == 1 && exists('b:NERDTree') && b:NERDTree.isTabTree() | quit | endif diff --git a/home/aliases b/home/aliases index 76ce8cd..2751ff4 100644 --- a/home/aliases +++ b/home/aliases @@ -28,7 +28,7 @@ alias feh="feh -." alias info="info --vi-keys" # grepa -alias grepa="grep -I -n --color=always -r --exclude-dir=venv" +alias grepa="grep -I -n --color=always -r --exclude-dir=venv --exclude-dir=node_modules" # less alias less="less -R" @@ -52,6 +52,6 @@ goto() { file="$(echo "$open" | cut -d: -f1 -)" line="$(echo "$open" | cut -d: -f2 -)" - vim "$file" -c "normal! $line"gg + vim "$file" -c "cd %:p:h" -c "normal! $line"gg fi } diff --git a/home/xinitrc b/home/xinitrc index 12addde..bfca811 100755 --- a/home/xinitrc +++ b/home/xinitrc @@ -1,3 +1,4 @@ +xrandr --dpi 96 xset s off -dpms customkeys xdg-mime default mupdf.desktop application/pdf