This commit is contained in:
Paul Trowbridge 2023-04-07 21:56:17 -04:00
commit 064ef8cdb2
5 changed files with 24 additions and 4 deletions

View File

@ -91,7 +91,8 @@ fi
alias ll='ls -alFh'
alias la='ls -A'
alias l='ls -CF'
alias lb='lsblk -o+FSAVAIL,FSUSED,FSUSE%,MODEL,PARTTYPENAME,STATE'
#alias lb='lsblk -o+FSAVAIL,FSUSED,FSUSE%,MODEL,PARTTYPENAME,STATE'
alias lb='lsblk -o+FSTYPE,FSAVAIL,FSUSED,FSUSE%,MODEL'
alias opg="lsof 2>/dev/null +D . | grep 'pg.*swp$' | awk '{print \$9}' | sed 's/\.swp//g' | sed 's/\/\./\//g'"
alias osw="lsof 2>/dev/null +D . | awk '\$NF ~ /swp$/ {print \$9}' | sed 's/\.swp//g' | sed 's/\/\./\//g'"
alias xpg="lsof 2>/dev/null +D . | grep 'pg.*swp$' | awk '{print \$9}' | sed 's/\.swp//g' | sed 's/\/\./\//g' | xargs -r $PG -f"
@ -102,6 +103,7 @@ alias mns='fzf | xargs -I {} sqlcmd.exe -S usmidsql01 -i {}'
alias nv='~/nvim-linux64/bin/nvim'
alias gs='git status'
alias gd='git difftool'
alias gl="git log --graph"
# Add an "alert" alias for long running commands. Use like so:
# sleep 10; alert

View File

@ -2,7 +2,7 @@
email = paul@hptrow.me
name = Paul Trowbridge
[core]
autocrlf = false
autocrlf = true
editor = vim
[push]
default = simple
@ -18,5 +18,7 @@
directory = /var/www/kimai2
directory = /var/www/html/resume/
directory = /var/www/html/resume
directory = /opt/forecast_api/
directory = /opt/forecast_api
[pull]
rebase = false

View File

@ -1,4 +1,4 @@
-- Switch pagers with :x and :xx commands
\set x '\\setenv PAGER ''less -S'''
\set xx '\\setenv PAGER \'pspg -bX --no-mouse\''
\timing
\timing on

View File

@ -29,3 +29,4 @@ set -g @themepack 'powerline/default/cyan'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'

17
.vimrc
View File

@ -9,7 +9,7 @@ Plugin 'gmarik/Vundle.vim'
Plugin 'vim-airline/vim-airline'
Plugin 'kien/ctrlp.vim'
Plugin 'scrooloose/nerdtree'
Plugin 'edkolev/tmuxline.vim'
"Plugin 'edkolev/tmuxline.vim'
Plugin 'vim-airline/vim-airline-themes'
Plugin 'leafgarland/typescript-vim'
Plugin 'peitalin/vim-jsx-typescript'
@ -66,9 +66,24 @@ set mouse=a
set visualbell
set t_vb=
nnoremap \\ :noh<cr> " Clear higlighting
set nowrap
"nnoremap <esc> :noh<return><esc>
" Resize windows
nnoremap <silent> <Up> 5<C-W>+
nnoremap <silent> <Down> 5<C-W>-
nnoremap <silent> <Right> 10<C-W>>
nnoremap <silent> <Left> 10<C-W><
"----------funcion to comment out every line except current---------------
function! CommentOutUnselectedLines()
let l:highlighted_lines = sort(getpos("'<")[1], getpos("'>")[1])
let l:line_count = line("$")
let l:comment_char = "--"
for l:line_number in range(1, l:line_count)
if index(l:highlighted_lines, l:line_number) == -1
execute l:line_number . "s/^/" . l:comment_char . "/"
endif
endfor
endfunction
nnoremap <Leader>cc :call CommentOutUnselectedLines()<CR>