Browse Source

Autosave every 5s (Vim), HPS/309 aliases

Update packages.
red-hat-laptop
Kevin Mok 5 years ago
parent
commit
4c4f5b43fb
Signed by: Kevin-Mok GPG Key ID: AEA75288DC135CF5
  1. 19
      aliases/key_aliases
  2. 6
      fish/.config/fish/config.fish
  3. 8
      fish/.config/fish/functions/drop-grocery.fish
  4. 3
      fish/.config/fish/functions/find-vim-filetype.fish
  5. 1
      i3/.config/i3/config
  6. 1
      scripts/compile_commands.json
  7. 2
      txt/exclude-dirs-backup.txt
  8. 1
      txt/key_dirs.txt
  9. 9
      txt/key_files.txt
  10. 9
      txt/nzxt-aur.txt
  11. 7
      txt/nzxt-pkgs.txt
  12. 22
      vim/.vimrc

19
aliases/key_aliases

@ -65,6 +65,7 @@ fnd "find . -type f -name"
rmr "rm -rf"
rmd "rm ~/Downloads/*"
rmsw "rm ~/.local/share/nvim/swap/"
md "mkdir -p"
rsy "rsync -Pr"
@ -168,6 +169,8 @@ rx "redshift -x"
sn "sudo nvim"
sx "sxiv"
sxa "sxiv -a"
sxt "sxiv -t *"
vmd "vimdiff"
wg "wego"
wp "grep wallpaper ~/.cache/wal/colors.sh"
z "zathura --fork"
@ -200,6 +203,7 @@ wa "watson start"
wae "watson start && watson edit"
we "watson edit"
wl "watson log --day"
wla "watson log --all --tag="
ww "watson log"
# wlm "watson log --project coding --tag mfs"
wr "watson report --day"
@ -227,6 +231,9 @@ gba "git branch --no-merged && echo '' && git branch --merged"
gbu "git branch --no-merged"
gbm "git branch --merged"
gmg "git merge"
gmgt "git mergetool"
# }}} branch #
gr "git remote -v"
@ -416,17 +423,23 @@ hl "valgrind --tool=helgrind ./carsim light 10 20"
# }}} 369 #
# 309
wl0 "watson log --all --project=309 --tag=e3"
wr0 "watson report --all --project=309 --tag=e3"
# wl0 "watson log --all --project=309 --tag=e3"
# wr0 "watson report --all --project=309 --tag=e3"
nd "node"
ndm "nodemon"
knd "killall node"
mg "mongo"
mgd "mongod --dbpath mongo-data"
0ht "cd ~/school/309-proj && python3 -m http.server"
mgd "mongod --dbpath mongo-data"
nds "killall node && nodemon server.js"
hr "heroku"
hrt "heroku ps"
hrl "heroku logs --dyno web -n 1500 | rg up | awk '{ system(\"date -d \" \$1); \$1 = \"\"; print \$0 }' | paste -s -d' \n'"
wlh "watson log --all --project=hps --tag=essay"
wrh "watson report --all --project=hps --tag=essay"
# }}} school #

6
fish/.config/fish/config.fish

@ -42,9 +42,11 @@ abbr mt "math"
set -U spv_dir "/home/kevin/coding/spotify-lib-vis"
set -U mfs_dir "/home/kevin/coding/mf-site"
# set -U PATH /usr/local/sbin /usr/local/bin /usr/bin /usr/bin/site_perl /usr/bin/vendor_perl /usr/bin/core_perl /home/kevin/linux-config/scripts
# set -U PATH /usr/local/sbin /usr/local/bin /usr/bin /usr/bin/site_perl
# /usr/bin/vendor_perl /usr/bin/core_perl /home/kevin/linux-config/scripts
# /home/kevin/linux-config/scripts/colors
# (ruby -e 'print Gem.user_dir')/bin
set -x PATH $PATH /home/kevin/linux-config/scripts /home/kevin/go/bin
set -x PATH $PATH /home/kevin/linux-config/scripts /home/kevin/linux-config/scripts/colors /home/kevin/go/bin
set -x PASSWORD_STORE_CLIP_TIME 120
set -xU XSET_RATE 90
set -xU XSET_DELAY 200

8
fish/.config/fish/functions/drop-grocery.fish

@ -0,0 +1,8 @@
function drop-grocery
set collection 'stores'
switch $argv[1]
case f
set collection 'foods'
end
mongo GroceryAPI --eval "db.$collection.drop()"
end

3
fish/.config/fish/functions/find-vim-filetype.fish

@ -0,0 +1,3 @@
function find-vim-filetype
fd $argv[1] /usr/share/nvim/runtime/ftplugin
end

1
i3/.config/i3/config

@ -35,6 +35,7 @@ bindsym Mod4+a exec studio
# bindsym $mod+control+Return exec $def_term
bindsym control+Return exec $def_term
bindsym Mod4+c exec $browser
bindsym Mod4+e exec notify-send "HPS Word Count" "$(pdftotext /home/kevin/school/latex-notes/hps/essay.pdf - | wc -w)"
bindsym Mod4+f exec firefox
bindsym Mod4+$mod+f exec echo 'Kevin@fosstodon.org' | xclip -selection clipboard
bindsym Mod4+h exec echo 'kevin.mok@live.ca' | xclip -selection clipboard

1
scripts/compile_commands.json

@ -1 +0,0 @@
[]

2
txt/exclude-dirs-backup.txt

@ -2,7 +2,7 @@
/home/kevin/.AndroidStudio3.3
/home/kevin/Android
/home/kevin/.cache
/home/kevin/.local/share/Steam
/home/kevin/.local/share/Steam/steamapps/common
/lost+found
/mnt
/proc

1
txt/key_dirs.txt

@ -66,5 +66,6 @@ a43 /home/kevin/school/369/a4-3/fs3
hp /home/kevin/school/hps
hpe /home/kevin/school/latex-notes/hps
hper /home/kevin/school/hps/w5-6-historicism
# }}} sch *

9
txt/key_files.txt

@ -20,6 +20,7 @@ z /home/kevin/linux-config/aliases/zsh_aliases
# cdn {{{ *
cm /tmp/commit-msg.txt
cmd ./commit-msg.txt
hlg /home/kevin/coding/spotify-lib-vis/src/api/management/commands/update-history.log
id /home/kevin/coding/project-ideas/ideas.md
ig ./.gitignore
@ -40,10 +41,10 @@ wt /home/kevin/.config/watson/state.tmp
# sch {{{ *
0c /home/kevin/school/309-proj/sass/main.scss
0h /home/kevin/school/309-proj/index.html
0m /home/kevin/school/309-proj/js/main.js
0f /home/kevin/school/309-proj/js/food.js
0s /home/kevin/school/309-proj/js/stores.js
0h /home/kevin/school/309-proj/public/index.html
0m /home/kevin/school/309-proj/public/js/main.js
0f /home/kevin/school/309-proj/public/js/food.js
0s /home/kevin/school/309-proj/public/js/stores.js
0k /home/kevin/school/309-proj/json/kevin.md
# }}} sch *

9
txt/nzxt-aur.txt

@ -3,17 +3,24 @@ bear
browserpass
chromium-widevine
cliqz-bin
curseradio-git
discord
dragon-drag-and-drop-git
ffcast
flashplugin-focusfix
heroku-cli
htop-vim-git
i3blocks-git
insomnia
linux-kevin
linux-kevin-headers
linux-nzxt
linux-nzxt-headers
lua-cjson
mongodb-bin
mongodb-tools-bin
nerd-fonts-dejavu-complete
nerd-fonts-hack
nx3-all
peaclock
pipes.sh
@ -29,8 +36,10 @@ steamos-xpad-dkms
systemd-numlockontty
texlive-local-algorithmicx
texlive-local-algorithms
texlive-local-biblatex
texlive-local-enumitem
texlive-local-ifmtarg
texlive-local-logreq
texlive-local-multirow
texlive-local-numprint
texlive-local-pgfplots

7
txt/nzxt-pkgs.txt

@ -7,6 +7,7 @@ automake
bash
bat
bc
biber
bison
bookworm
broadcom-wl
@ -19,6 +20,7 @@ cmatrix
colordiff
compton
coreutils
cowsay
cryptsetup
device-mapper
dhcpcd
@ -112,7 +114,6 @@ pgadmin4
pkgconf
postgresql
procps-ng
psensor
psmisc
pulseaudio
python-dbus
@ -131,6 +132,8 @@ scrot
sed
shadow
shellcheck
sl
smartmontools
sqlitebrowser
sshpass
steam
@ -170,6 +173,8 @@ wireless_tools
wkhtmltopdf
wpa_actiond
wpa_supplicant
xautomation
xbindkeys
xclip
xf86-input-evdev
xf86-input-keyboard

22
vim/.vimrc

@ -22,10 +22,11 @@ set tabstop=4
" set t_Co=256
" set timeoutlen=500
set timeoutlen=350
set tw=80
" set tw=80
set tw=75
set undodir=~/.vim/undo
set undofile
set updatetime=1000
set updatetime=5000
autocmd VimResized * wincmd =
filetype plugin on
@ -47,17 +48,17 @@ au CursorHold,CursorHoldI * checktime
" commands for file types {{{ "
autocmd BufNewFile,BufRead .* set syntax=sh
autocmd FileType *css,htmldjango,html,javascript,markdown,tex,text,yaml set tabstop=2 shiftwidth=2
autocmd FileType *css,htmldjango,html,javascript,json,markdown,tex,text,yaml set tabstop=2 shiftwidth=2
" autocmd BufNewFile,BufRead *.md set filetype=markdown
autocmd Filetype markdown set textwidth=0
" autocmd Filetype html set foldmarker=0
autocmd Filetype markdown map <F8> :LivedownToggle<CR>
autocmd Filetype json nnoremap <leader>j :%!python -m json.tool<CR>
autocmd Filetype json set foldmethod=marker
autocmd FileType sh map <F8> :!clear && shellcheck %<CR>
" autocmd FileType tex map <F8> :VimtexCompile<CR>:VimtexView<CR>
autocmd FileType tex map <F8> :VimtexCompile<CR>
autocmd VimEnter *.tex VimtexCompile
autocmd FileType markdown,tex,text set spell spelllang=en_us
autocmd VimLeave *.tex !tex-clean %:p
" " auto-reload vimrc {{{ "
@ -113,7 +114,8 @@ Plug 'vim-scripts/L9'
" automatically save buffers upon returning to normal mode
Plug '907th/vim-auto-save'
let g:auto_save = 1
autocmd VimEnter *.tex let g:auto_save = 0
let g:auto_save_events = ["CursorHold", "CursorHoldI"]
" autocmd VimEnter *.tex let g:auto_save = 0
" provides various functionality for writing LaTeX in Vim
Plug 'lervag/vimtex'
@ -126,6 +128,9 @@ Plug 'lervag/vimtex'
\ 'global' : 0,
\ 'unused' : 0,
\}
" let g:vimtex_compiler_latexmk = {
" \ 'continuous' : 0,
" \}
" auto-completion for various languages
Plug 'Valloric/YouCompleteMe'
@ -275,7 +280,8 @@ nnoremap <leader>fi :YcmCompleter FixIt<CR>
nnoremap <leader>ft /TODO<CR>
nnoremap <leader>g :YcmCompleter GoTo<CR>
" vimdiff split
nnoremap <leader>gd :Gvdiff HEAD
nnoremap <leader>gd :Gvdiff HEAD~
nnoremap <leader>gdm :Gvdiff master<CR>
" toggle search highlighting
nnoremap <leader>h :set hlsearch! hlsearch?<CR>
" help
@ -386,6 +392,8 @@ autocmd BufNewFile,BufRead *.h nnoremap <localleader>x 0iextern <Esc>f{hc$;<Esc>
autocmd Filetype fish inoremap <localleader>1 $argv[1]
autocmd Filetype fish inoremap <localleader>2 $argv[2]
autocmd Filetype javascript inoremap <localleader>x process.exit()
autocmd Filetype markdown nnoremap <localleader>x 0f[lrx
" nnoremap <localleader>x 0f[lrx

Loading…
Cancel
Save