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.
This commit is contained in:
@@ -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"
|
||||
|
||||
5
dotfiles/.gitconfig
Normal file
5
dotfiles/.gitconfig
Normal file
@@ -0,0 +1,5 @@
|
||||
[user]
|
||||
email = kevin.mok@live.ca
|
||||
name = Kevin Mok
|
||||
[color]
|
||||
ui = auto
|
||||
@@ -36,13 +36,17 @@ Plug 'lervag/vimtex'
|
||||
Plug 'Valloric/YouCompleteMe'
|
||||
Plug 'honza/vim-snippets'
|
||||
Plug 'SirVer/ultisnips'
|
||||
" let g:ycm_key_list_select_completion = ['<C-d>', '<Down>']
|
||||
" let g:ycm_key_list_previous_completion = ['<C-u>', '<Up>']
|
||||
let g:ycm_key_list_select_completion = []
|
||||
let g:ycm_key_list_previous_completion = []
|
||||
let g:UltiSnipsExpandTrigger = "<c-j>"
|
||||
let g:UltiSnipsJumpForwardTrigger = "<c-b>"
|
||||
let g:UltiSnipsJumpBackwardTrigger = "<c-z>"
|
||||
Plug 'ervandew/supertab'
|
||||
|
||||
" make YCM compatible with UltiSnips (using supertab)
|
||||
let g:ycm_key_list_select_completion = ['<C-n>', '<Down>']
|
||||
let g:ycm_key_list_previous_completion = ['<C-p>', '<Up>']
|
||||
let g:SuperTabDefaultCompletionType = '<C-n>'
|
||||
|
||||
" better key bindings for UltiSnipsExpandTrigger
|
||||
let g:UltiSnipsExpandTrigger = "<tab>"
|
||||
let g:UltiSnipsJumpForwardTrigger = "<tab>"
|
||||
let g:UltiSnipsJumpBackwardTrigger = "<s-tab>"
|
||||
|
||||
call plug#end()
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user