From fe274eebd72a40604d4cd4f264b5d96552fabcae Mon Sep 17 00:00:00 2001 From: Kevin Mok Date: Tue, 30 Jan 2018 00:35:55 -0500 Subject: [PATCH] Changed "c" function to "d" to work on launch - The alias c was apparently mapped to clear already and hence not working on launch. - Modified YCM/UltiSnips to work with Tab as trigger. - Added .gitconfig to dotfiles and updated script. --- dotfiles/.bash_aliases | 22 ++++++++++++++-------- dotfiles/.gitconfig | 5 +++++ dotfiles/.vimrc | 18 +++++++++++------- set-from-git.sh | 2 +- 4 files changed, 31 insertions(+), 16 deletions(-) create mode 100644 dotfiles/.gitconfig diff --git a/dotfiles/.bash_aliases b/dotfiles/.bash_aliases index 94fa909..e39b2c6 100644 --- a/dotfiles/.bash_aliases +++ b/dotfiles/.bash_aliases @@ -1,10 +1,10 @@ in_lab=false -cd_school="c ~/Documents/School"; +cd_school="d ~/Documents/School"; if [ -d "/h/u3/c7/" ]; then TERM=xterm-256color xmodmap -e "clear Lock" in_lab=true - cd_school="c ~"; + cd_school="d ~"; fi # system @@ -18,10 +18,10 @@ alias s="systemctl suspend" alias hst="history" # directories -c() { cd "$@" && ls -a ; } +d() { cd "$@" && ls -a ; } cd_up() { c $(printf "%0.s../" $(seq 1 $1 )) ; } alias "c."="cd_up" -alias cdd="c ~/Downloads" +alias cdd="d ~/Downloads" if $in_lab; then ff() { firefox $1 ; } zip() { tar -zcvf $1.tar.gz $1/ ; } @@ -41,6 +41,10 @@ else then dir="right" fi + if [ "$2" = "l" ] + then + dir="left" + fi # echo "xrandr --output \"$output\" --rotate \"$dir\"" xrandr --output "$output" --rotate "$dir" @@ -54,15 +58,17 @@ else alias spt="speedtest" alias pg="ping -c 5 google.ca" - alias rcg="c ~/Documents/coding/random-color-generator" - alias dcr="c ~/Documents/coding/dcr-logger" + alias mt="ok ~/Documents/School/136/calc-textbook.pdf" + alias 36t="ok ~/Documents/School/236/236-textbook.pdf" + + alias rcg="d ~/Documents/coding/random-color-generator" + alias dcr="d ~/Documents/coding/dcr-logger" fi # school alias sch="$cd_school" alias 136="$cd_school/136" alias pr2="$cd_school/136/par/2" -alias mt="ok \"$cd_school\"/136/calc-textbook.pdf" alias psy="$cd_school/psy" # 209 @@ -104,7 +110,7 @@ alias psy="$cd_school/psy" ok() { okular $1 ; } # config -alias lc="c ~/linux-config" +alias lc="d ~/linux-config" alias vb="vi ~/.bash_aliases" alias vv="vi ~/.vimrc" alias r=". ~/.bashrc" diff --git a/dotfiles/.gitconfig b/dotfiles/.gitconfig new file mode 100644 index 0000000..02fd049 --- /dev/null +++ b/dotfiles/.gitconfig @@ -0,0 +1,5 @@ +[user] + email = kevin.mok@live.ca + name = Kevin Mok +[color] + ui = auto diff --git a/dotfiles/.vimrc b/dotfiles/.vimrc index 3dccd53..934a036 100644 --- a/dotfiles/.vimrc +++ b/dotfiles/.vimrc @@ -36,13 +36,17 @@ Plug 'lervag/vimtex' Plug 'Valloric/YouCompleteMe' Plug 'honza/vim-snippets' Plug 'SirVer/ultisnips' -" let g:ycm_key_list_select_completion = ['', ''] -" let g:ycm_key_list_previous_completion = ['', ''] -let g:ycm_key_list_select_completion = [] -let g:ycm_key_list_previous_completion = [] -let g:UltiSnipsExpandTrigger = "" -let g:UltiSnipsJumpForwardTrigger = "" -let g:UltiSnipsJumpBackwardTrigger = "" +Plug 'ervandew/supertab' + +" make YCM compatible with UltiSnips (using supertab) +let g:ycm_key_list_select_completion = ['', ''] +let g:ycm_key_list_previous_completion = ['', ''] +let g:SuperTabDefaultCompletionType = '' + +" better key bindings for UltiSnipsExpandTrigger +let g:UltiSnipsExpandTrigger = "" +let g:UltiSnipsJumpForwardTrigger = "" +let g:UltiSnipsJumpBackwardTrigger = "" call plug#end() diff --git a/set-from-git.sh b/set-from-git.sh index f45a590..1807f8b 100755 --- a/set-from-git.sh +++ b/set-from-git.sh @@ -1,5 +1,5 @@ # home -files=".bash_aliases .bashrc .inputrc .vimrc .gvimrc" +files=".bash_aliases .bashrc .inputrc .vimrc .gvimrc .gitconfig" dotDir=~/linux-config/dotfiles for file in $files; do