From 768baa4f33bcad16102a216736cf2ca0ae0711ed Mon Sep 17 00:00:00 2001 From: Kevin Mok Date: Fri, 9 Feb 2018 14:43:47 -0500 Subject: [PATCH] Pull in all repos function and changes to Vim Vim: - Local mappings to type out math notes. - Mapping to toggle highlight searches and replace all. - Increase linespace to display underscores. --- .vimrc | 19 ++++++++++++++++++- aliases/.git_aliases | 6 ++++++ aliases/.pc_aliases | 2 ++ aliases/.school_aliases | 4 +++- 4 files changed, 29 insertions(+), 2 deletions(-) diff --git a/.vimrc b/.vimrc index 327f28c..692b59f 100644 --- a/.vimrc +++ b/.vimrc @@ -13,6 +13,7 @@ set autoindent set mouse=c set clipboard=unnamedplus set foldmethod=marker +set linespace=5 " }}} set x=y " autocmd VimResized * wincmd = @@ -73,12 +74,14 @@ let mapleader="\" nnoremap e o nnoremap f za nnoremap ff :set foldmethod=marker zM +nnoremap h :set hlsearch! hlsearch? nnoremap m :call cursor(0, len(getline('.'))/2) nnoremap p :LLPStartPreview nnoremap pli :PlugInstall nnoremap plc :PlugClean nnoremap plu :PlugUpdate nnoremap r :.,.+s///g +nnoremap R :%s///g nnoremap s :set syn=sh " }}} Mappings " @@ -86,7 +89,21 @@ nnoremap s :set syn=sh let maplocalleader="-" autocmd Filetype c inoremap s struct pixel -autocmd Filetype tex inoremap t $T$ +autocmd Filetype tex inoremap e \exists +autocmd Filetype tex inoremap fa \forall +autocmd Filetype tex inoremap g \geq +autocmd Filetype tex inoremap i \in +autocmd Filetype tex inoremap l \leq +autocmd Filetype tex inoremap lr \Leftrightarrow +autocmd Filetype tex inoremap n \neg +autocmd Filetype tex inoremap N \mathbb{N} +autocmd Filetype tex inoremap R \Rightarrow +autocmd Filetype tex inoremap st such that +autocmd Filetype tex inoremap t \times +autocmd Filetype tex inoremap T $T$ +autocmd Filetype tex inoremap v \vee +autocmd Filetype tex inoremap w \wedge autocmd Filetype tex inoremap x $x$-axis autocmd Filetype tex inoremap y $y$-axis +autocmd Filetype tex inoremap Z \mathbb{Z} " }}} Local Mappings " diff --git a/aliases/.git_aliases b/aliases/.git_aliases index 7c9c464..b1b5fc4 100644 --- a/aliases/.git_aliases +++ b/aliases/.git_aliases @@ -36,4 +36,10 @@ gmrgr() { git remote remove $1 } gunc() { git update-index --assume-unchanged $1 ; } +gpla() { + cmds="lc snp 9r sch" + for cmd in $cmds; do + eval $cmd && gst && gpl && gclear + done +} # Functions }}} diff --git a/aliases/.pc_aliases b/aliases/.pc_aliases index 1425407..a90035c 100644 --- a/aliases/.pc_aliases +++ b/aliases/.pc_aliases @@ -54,5 +54,7 @@ if [ "$(hostname)" == "X1-Carbon" ]; then xmodmap -e "keycode 119 = End" xmodmap -e "keycode 110 = Delete" xmodmap -e "keycode 115 = BackSpace" + + alias thn="thunar ." fi # Laptop }}} diff --git a/aliases/.school_aliases b/aliases/.school_aliases index 1dffde7..06e1b5c 100644 --- a/aliases/.school_aliases +++ b/aliases/.school_aliases @@ -42,7 +42,7 @@ cd_209="d ~/Documents/School/209"; alias 209="$cd_209" alias 9r="$cd_209/mokkar" alias l5="$cd_209/mokkar/lab5" -alias a2="$cd_209/mokkar/a2" +alias 9a="$cd_209/mokkar/a2" # alias cdf="ssh -t mokkar@cdf.utoronto.ca '. ./.bashrc; bash -l'" alias cdf="echo \". ./.bashrc\"&& ssh mokkar@cdf.utoronto.ca" mkex() { chmod 700 $1 ; } @@ -79,3 +79,5 @@ run() { alias mka="make all; ./bitmap_printer.out dog.bmp" # }}} # }}} + +alias 6a="$cd_school/236/a1"