General improvements

This commit is contained in:
Augusto Gunsch 2022-01-17 19:30:15 -03:00
parent 3c03102ece
commit 879e920a8d
No known key found for this signature in database
GPG Key ID: F7EEFE29825C72DC
3 changed files with 11 additions and 9 deletions

View File

@ -11,9 +11,6 @@ colorscheme torte
set list set list
set listchars=tab:*·,lead,trail:~,extends:>,precedes:< set listchars=tab:*·,lead,trail:~,extends:>,precedes:<
set noet set noet
set ts=8
set sw=8
set nohlsearch
filetype indent off filetype indent off
hi Whitespace ctermfg=233 hi Whitespace ctermfg=233
hi SignColumn ctermbg=233 hi SignColumn ctermbg=233
@ -27,10 +24,12 @@ hi FoldColumn ctermbg=233 ctermfg=247
let mapleader = " " let mapleader = " "
let maplocalleader = "," let maplocalleader = ","
nnoremap <silent> <F12> <cmd>set et<cr>:set ts=4<cr>:set sw=4<cr> nnoremap <silent> <F12> <cmd>set et<cr><cmd>set ts=4<cr><cmd>set sw=4<cr>
nnoremap <silent> <F11> <cmd>set noet<cr>:set ts=8<cr>:set sw=8<cr> nnoremap <silent> <F11> <cmd>set noet<cr>
nnoremap <silent> <F2> <cmd>ToggleDiagOff<cr>:Gdiffsplit<cr> nnoremap <silent> <F2> <cmd>ToggleDiagOff<cr>:Gdiffsplit<cr>
nnoremap <silent> <F5> <cmd>ToggleDiag<cr> nnoremap <silent> <F5> <cmd>ToggleDiag<cr>
nnoremap <silent> <F6> <cmd>%!expand -t4<cr><cmd>%!sed 's/[ \t]*$//'<cr>
nnoremap <silent> <F7> <cmd>%!unexpand -t4<cr><cmd>%!sed 's/[ \t]*$//'<cr>
noremap - ddp noremap - ddp
nnoremap _ ddkP nnoremap _ ddkP
@ -45,8 +44,6 @@ nnoremap dL 0D
vnoremap <leader>" <esc>a"<esc>`<i"<esc>`> vnoremap <leader>" <esc>a"<esc>`<i"<esc>`>
nnoremap H 0 nnoremap H 0
nnoremap L $ nnoremap L $
" auto indent
"vnoremap <c-q> <esc>:lua vim.lsp.buf.range_formatting()<cr>
call plug#begin('~/.config/nvim/plugged') call plug#begin('~/.config/nvim/plugged')
@ -71,6 +68,10 @@ call plug#end()
nnoremap <C-n> <cmd>silent NERDTreeToggle<CR> nnoremap <C-n> <cmd>silent NERDTreeToggle<CR>
augroup python
autocmd FileType python :iabbrev <buffer> frompdb from pdb import set_trace; set_trace()
augroup END
augroup nerdtree augroup nerdtree
" Exit Vim if NERDTree is the only window remaining in the only tab. " 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 autocmd BufEnter * if tabpagenr('$') == 1 && winnr('$') == 1 && exists('b:NERDTree') && b:NERDTree.isTabTree() | quit | endif

View File

@ -28,7 +28,7 @@ alias feh="feh -."
alias info="info --vi-keys" alias info="info --vi-keys"
# grepa # 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 # less
alias less="less -R" alias less="less -R"
@ -52,6 +52,6 @@ goto() {
file="$(echo "$open" | cut -d: -f1 -)" file="$(echo "$open" | cut -d: -f1 -)"
line="$(echo "$open" | cut -d: -f2 -)" line="$(echo "$open" | cut -d: -f2 -)"
vim "$file" -c "normal! $line"gg vim "$file" -c "cd %:p:h" -c "normal! $line"gg
fi fi
} }

View File

@ -1,3 +1,4 @@
xrandr --dpi 96
xset s off -dpms xset s off -dpms
customkeys customkeys
xdg-mime default mupdf.desktop application/pdf xdg-mime default mupdf.desktop application/pdf