Added timer bash function, added vim-rsi for readline shortcuts, added movement keys in insert mode to vim

This commit is contained in:
jon
2022-07-16 09:07:48 -05:00
parent bd33f3ea9d
commit 2839131f9f
2 changed files with 21 additions and 0 deletions

View File

@@ -113,6 +113,16 @@ stopwatch () {
date1=`date +%s`; while true; do echo -ne "$(date -u --date @$((`date +%s` - $date1)) +%H:%M:%S)\r"; done
}
timer() {
start="$(( $(date '+%s') + $1))"
while [ $start -ge $(date +%s) ]; do
time="$(( $start - $(date +%s) ))"
printf '%s\r' "$(date -u -d "@$time" +%H:%M:%S)"
sleep 0.1
done
notify-send "Timer Finished" "Timer Finished - $1 seconds elapsed"
}
n ()
{
# Block nesting of nnn in subshells

View File

@@ -34,6 +34,16 @@ set textwidth=79
set shiftwidth=4
set fileformat=unix
" move in insert mode
inoremap <C-h> <Left>
inoremap <C-j> <Down>
inoremap <C-k> <Up>
inoremap <C-l> <Right>
cnoremap <C-h> <Left>
cnoremap <C-j> <Down>
cnoremap <C-k> <Up>
cnoremap <C-l> <Right>
"highlight cursorline cterm=none ctermbg=darkred ctermfg=white guibg=darkred guifg=white
hi cursorline cterm=none term=none ctermbg=236
set cursorline
@@ -123,6 +133,7 @@ Plug 'junegunn/goyo.vim'
Plug 'junegunn/fzf.vim'
Plug 'scrooloose/nerdtree'
Plug 'chrisbra/Colorizer'
Plug 'tpope/vim-rsi'
" Colors
Plug 'arzg/vim-substrata'