Browse Source

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.
red-hat-laptop
Kevin Mok 7 years ago
parent
commit
768baa4f33
  1. 19
      .vimrc
  2. 6
      aliases/.git_aliases
  3. 2
      aliases/.pc_aliases
  4. 4
      aliases/.school_aliases

19
.vimrc

@ -13,6 +13,7 @@ set autoindent
set mouse=c set mouse=c
set clipboard=unnamedplus set clipboard=unnamedplus
set foldmethod=marker set foldmethod=marker
set linespace=5
" }}} set x=y " " }}} set x=y "
autocmd VimResized * wincmd = autocmd VimResized * wincmd =
@ -73,12 +74,14 @@ let mapleader="\<Space>"
nnoremap <leader>e o<ESC> nnoremap <leader>e o<ESC>
nnoremap <leader>f za nnoremap <leader>f za
nnoremap <leader>ff :set foldmethod=marker<CR> zM nnoremap <leader>ff :set foldmethod=marker<CR> zM
nnoremap <leader>h :set hlsearch! hlsearch?<CR>
nnoremap <leader>m :call cursor(0, len(getline('.'))/2)<CR> nnoremap <leader>m :call cursor(0, len(getline('.'))/2)<CR>
nnoremap <leader>p :LLPStartPreview<CR> nnoremap <leader>p :LLPStartPreview<CR>
nnoremap <leader>pli :PlugInstall<CR> nnoremap <leader>pli :PlugInstall<CR>
nnoremap <leader>plc :PlugClean<CR> nnoremap <leader>plc :PlugClean<CR>
nnoremap <leader>plu :PlugUpdate<CR> nnoremap <leader>plu :PlugUpdate<CR>
nnoremap <leader>r :.,.+s///g<left><left><left><left><left> nnoremap <leader>r :.,.+s///g<left><left><left><left><left>
nnoremap <leader>R :%s///g<left><left><left>
nnoremap <leader>s :set syn=sh<CR> nnoremap <leader>s :set syn=sh<CR>
" }}} Mappings " " }}} Mappings "
@ -86,7 +89,21 @@ nnoremap <leader>s :set syn=sh<CR>
let maplocalleader="-" let maplocalleader="-"
autocmd Filetype c inoremap <localleader>s struct pixel autocmd Filetype c inoremap <localleader>s struct pixel
autocmd Filetype tex inoremap <localleader>t $T$
autocmd Filetype tex inoremap <localleader>e \exists
autocmd Filetype tex inoremap <localleader>fa \forall
autocmd Filetype tex inoremap <localleader>g \geq
autocmd Filetype tex inoremap <localleader>i \in
autocmd Filetype tex inoremap <localleader>l \leq
autocmd Filetype tex inoremap <localleader>lr \Leftrightarrow
autocmd Filetype tex inoremap <localleader>n \neg
autocmd Filetype tex inoremap <localleader>N \mathbb{N}
autocmd Filetype tex inoremap <localleader>R \Rightarrow
autocmd Filetype tex inoremap <localleader>st such that
autocmd Filetype tex inoremap <localleader>t \times
autocmd Filetype tex inoremap <localleader>T $T$
autocmd Filetype tex inoremap <localleader>v \vee
autocmd Filetype tex inoremap <localleader>w \wedge
autocmd Filetype tex inoremap <localleader>x $x$-axis autocmd Filetype tex inoremap <localleader>x $x$-axis
autocmd Filetype tex inoremap <localleader>y $y$-axis autocmd Filetype tex inoremap <localleader>y $y$-axis
autocmd Filetype tex inoremap <localleader>Z \mathbb{Z}
" }}} Local Mappings " " }}} Local Mappings "

6
aliases/.git_aliases

@ -36,4 +36,10 @@ gmrgr() {
git remote remove $1 git remote remove $1
} }
gunc() { git update-index --assume-unchanged $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 }}} # Functions }}}

2
aliases/.pc_aliases

@ -54,5 +54,7 @@ if [ "$(hostname)" == "X1-Carbon" ]; then
xmodmap -e "keycode 119 = End" xmodmap -e "keycode 119 = End"
xmodmap -e "keycode 110 = Delete" xmodmap -e "keycode 110 = Delete"
xmodmap -e "keycode 115 = BackSpace" xmodmap -e "keycode 115 = BackSpace"
alias thn="thunar ."
fi fi
# Laptop }}} # Laptop }}}

4
aliases/.school_aliases

@ -42,7 +42,7 @@ cd_209="d ~/Documents/School/209";
alias 209="$cd_209" alias 209="$cd_209"
alias 9r="$cd_209/mokkar" alias 9r="$cd_209/mokkar"
alias l5="$cd_209/mokkar/lab5" 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="ssh -t mokkar@cdf.utoronto.ca '. ./.bashrc; bash -l'"
alias cdf="echo \". ./.bashrc\"&& ssh mokkar@cdf.utoronto.ca" alias cdf="echo \". ./.bashrc\"&& ssh mokkar@cdf.utoronto.ca"
mkex() { chmod 700 $1 ; } mkex() { chmod 700 $1 ; }
@ -79,3 +79,5 @@ run() {
alias mka="make all; ./bitmap_printer.out dog.bmp" alias mka="make all; ./bitmap_printer.out dog.bmp"
# }}} # }}}
# }}} # }}}
alias 6a="$cd_school/236/a1"
Loading…
Cancel
Save