diff options
| author | mitsuo <[email protected]> | 2021-10-19 23:21:36 -0500 |
|---|---|---|
| committer | mitsuo <[email protected]> | 2021-10-19 23:25:03 -0500 |
| commit | 9c03aadf1f5d6f1e51cdcafde007acbadb507f74 (patch) | |
| tree | 9ec363cb0eb779a90f8be26eaf6d1f4bb7a2604c | |
| parent | 0be5fb0d3d276a0e148dde68d79eaa08e10d82ff (diff) | |
| download | dotfiles-9c03aadf1f5d6f1e51cdcafde007acbadb507f74.tar.gz dotfiles-9c03aadf1f5d6f1e51cdcafde007acbadb507f74.tar.bz2 dotfiles-9c03aadf1f5d6f1e51cdcafde007acbadb507f74.zip | |
Add gt (Go TitleCase) mapping in Vim
- bashrc: Remove Conda shit (messed with my printer and scanner!
(hplip(1))
- bash_aliases:
- Add some Env. Var. like LINDO
- Add mpv_nhk
- Add youtube-dl_fast
- Add "path shorcut" to java8
| -rw-r--r-- | bash_aliases | 36 | ||||
| -rw-r--r-- | bashrc | 18 | ||||
| -rw-r--r-- | fun.vim | 23 | ||||
| -rw-r--r-- | vimrc | 12 |
4 files changed, 72 insertions, 17 deletions
diff --git a/bash_aliases b/bash_aliases index a6cacab..1456c94 100644 --- a/bash_aliases +++ b/bash_aliases @@ -18,34 +18,48 @@ alias lla='ll -A' alias ls='ls --color=auto --group-directories-first --classify' #alias less='less -Ri' # make less's searches case insensitive and # colorized -LESS=Ri # TODO move to an appropiate place + +# TODO move to an appropiate place: +LESS="-i --RAW-CONTROL-CHARS"; +export LESS + +LINDOAPI_HOME=/home/mitsuo/code/LINDO/lindoapi +export LINDOAPI_HOME +LINDOAPI_LICENSE_FILE="$LINDOAPI_HOME/license/lndapi130.lic" +export LINDOAPI_LICENSE_FILE alias gcc='gcc -g -std=c99 -lm' alias ed='ed -p "* "' alias diff='diff -s' + +# Precautionary +alias rm='rm -I' # Promt before removing more than 3 files +alias mv='mv -i' # Promt before overwrite +alias cp='cp -i' # same + + # Other program's options # ====================================================================== + #alias feh='feh -g 640x480 -S filename' # opens files sorted by filename alias feh='feh -g 640x480 --auto-zoom --scale-down --on-last-slide hold' alias feht='feh -Tthumb_s' alias fehfx='feh -Tfs --slideshow-delay' alias fehfrx='feh -Tfs --recursive --slideshow-delay' alias units='units --verbose' - - -# Precautionary -# ====================================================================== -alias rm='rm -I' # Promt before removing more than 3 files -alias mv='mv -i' # Promt before overwrite -alias cp='cp -i' # same - +alias tty-clock='tty-clock -cs' # Quick tools -# ====================================================================== alias pdfreduce='gs -sDEVICE=pdfwrite -dPDFSETTINGS=/ebook' alias youtube-dl_info='youtube-dl --get-filename --get-format --get-duration --get-description' -alias youtube-dl_fast='youtube-dl --format "best[height<=720]" -o '\''%(title)s.%(ext)s'\' +alias youtube-dl_fast='youtube-dl --format "best[height<=720][fps<=?30]" -o '\''%(title)s.%(ext)s'\' alias mpv_webcam='mpv av://v4l2:/dev/video0' # retrived from the Archwiki +alias mpv_nhk_720p='mpv "https://nhkwlive-ojp.akamaized.net/hls/live/2003459/nhkwlive-ojp-en/index_4M.m3u8"' +alias scan_dpto_europa='hp-scan --mode=color --device=hpaio:/net/OfficeJet_Pro_6970?ip=192.168.0.7' +#alias java8='~/code/openjdk8/jdk8u265-b01/bin/java' +#alias javac8='~/code/openjdk8/jdk8u265-b01/bin/javac' +alias inf265_jupyterlab='cd "/home/mitsuo/docs/courses/2021-1/INF265"; \ + jupyter lab' # Cosmetic @@ -61,6 +61,7 @@ if [ "$color_prompt" = yes ]; then # Blue timestamp and italic green pwd PS1='\[\033[34m\]|\D{%H:%M:%S}| \[\033[3;32m\][\w]\[\033[00m\]\n\$ ' else + # plain and simple PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' fi unset color_prompt force_color_prompt @@ -134,3 +135,20 @@ cowsay $(fortune 30% debian-hints 20% linux 20% science \ # Some environmental variables. export TLDR_CONFIG_DIR="$XDG_CONFIG_HOME" export GPG=TTY=$(tty) + +# Disable this shit that broke many things in my system ( RIP hplip :( ) +## >>> conda initialize >>> +## !! Contents within this block are managed by 'conda init' !! +#__conda_setup="$('/home/mitsuo/code/Anaconda/anaconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)" +#if [ $? -eq 0 ]; then +# eval "$__conda_setup" +#else +# if [ -f "/home/mitsuo/code/Anaconda/anaconda3/etc/profile.d/conda.sh" ]; then +# . "/home/mitsuo/code/Anaconda/anaconda3/etc/profile.d/conda.sh" +# else +# export PATH="/home/mitsuo/code/Anaconda/anaconda3/bin:$PATH" +# fi +#fi +#unset __conda_setup +## <<< conda initialize <<< + @@ -32,13 +32,14 @@ command LongestLineLength call LongestLineLength() function! Md2Pdf ( ) exe ":w" - exe ":! pandoc -o " . expand("%:r") . ".pdf -t latex -N --variable classoption=twosides --variable papersize=a4 --variable margin-left=1in --variable margin-right=1in --variable margin-top=1in --variable margin-bottom=1in --variable links-as-notes --variable colorlinks --variable pagestyle=plain --variable documentclass=article " . expand("%") - echo "pdf saved as " . expand("%:p:r") . ".pdf" + "-N for numbered headers + exe ":! pandoc -o \"" . expand("%:r") . ".pdf\" -t latex --variable classoption=twosides --variable papersize=a4 --variable margin-left=1in --variable margin-right=1in --variable margin-top=1in --variable margin-bottom=1in --variable links-as-notes --variable colorlinks --variable pagestyle=plain --variable documentclass=article -f markdown-implicit_figures \"" . expand("%") . "\"" + echo "pdf saved as \"" . expand("%:p:r") . ".pdf\"" endfunction function! Md2Pdfms ( ) exe ":w" - exe ":! pandoc -o " . expand("%:r") . ".pdf" . " -t ms -N " . expand("%") + exe ":! pandoc -o " . expand("%:r") . ".pdf" . " -t ms -f markdown-implicit_figures \"" . expand("%") . "\"" echo "pdf saved as " . expand("%:p:r") . ".pdf" endfunction @@ -50,7 +51,7 @@ command Md2Pdfms call Md2Pdfms() function! Md2Html ( ) exe ":w" - exe ":! pandoc -o " . expand("%:r") . ".html" . " -s -N " . expand("%") + exe ":! pandoc -o \"" . expand("%:r") . ".html\"" . " -s \"" . expand("%") . "\"" echo "html saved as " . expand("%:p:r") . ".html" endfunction @@ -66,3 +67,17 @@ function! CompRunProj ( ) endfunction command CompRunProj call CompRunProj() + + +" Function made to give feedback to students code in 1INF01 + +" export C code to syntax highlighted pdf +function! C2Pdf ( ) + exe ":set ts=4" + exe ":w" + exe ":ha > %.ps" + exe ":!ps2pdf %.ps" + exe ":!rm %.ps" +endfunction + +command C2Pdf call C2Pdf() @@ -143,9 +143,13 @@ map <F5> :source ~/.vim/vimrc<CR> map <S-F5> :e ~/.vim/vimrc<CR> map <F7> :tabp<CR> map <F8> :tabn<CR> -map <F9> :w<CR>:!./make.sh<CR> +map <F9> :w<CR>:make<CR> +"map <F10> :!./%:r<CR> +map <F10> :!./a.out<CR> +map <F11> :cnext<CR> +map <S-F11> :cprev<CR> " One has to do :E first in order for this to work -map <F12> :Rex<CR> +"map <F12> :Rex<CR> " <Leader> = '\' when 'mapleader' is empty " Change to the directory of the current file and generate tags recursively " there. @@ -164,6 +168,10 @@ nmap <M-J> <C-W>j nmap <M-K> <C-W>k nmap <M-L> <C-W>l +" Go Title Case (and clear highlighted matches) +" Ref.: vim.fandom.com +vmap gt :s/\<\(\w\)\(\w*\)\>/\u\1\L\2/g<CR><C-L> + " Yanking and pasting " ---------------------------------------------------------------------- |
