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
|
in_lab=false
|
||||||
cd_school="c ~/Documents/School";
|
cd_school="d ~/Documents/School";
|
||||||
if [ -d "/h/u3/c7/" ]; then
|
if [ -d "/h/u3/c7/" ]; then
|
||||||
TERM=xterm-256color
|
TERM=xterm-256color
|
||||||
xmodmap -e "clear Lock"
|
xmodmap -e "clear Lock"
|
||||||
in_lab=true
|
in_lab=true
|
||||||
cd_school="c ~";
|
cd_school="d ~";
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# system
|
# system
|
||||||
@@ -18,10 +18,10 @@ alias s="systemctl suspend"
|
|||||||
alias hst="history"
|
alias hst="history"
|
||||||
|
|
||||||
# directories
|
# directories
|
||||||
c() { cd "$@" && ls -a ; }
|
d() { cd "$@" && ls -a ; }
|
||||||
cd_up() { c $(printf "%0.s../" $(seq 1 $1 )) ; }
|
cd_up() { c $(printf "%0.s../" $(seq 1 $1 )) ; }
|
||||||
alias "c."="cd_up"
|
alias "c."="cd_up"
|
||||||
alias cdd="c ~/Downloads"
|
alias cdd="d ~/Downloads"
|
||||||
if $in_lab; then
|
if $in_lab; then
|
||||||
ff() { firefox $1 ; }
|
ff() { firefox $1 ; }
|
||||||
zip() { tar -zcvf $1.tar.gz $1/ ; }
|
zip() { tar -zcvf $1.tar.gz $1/ ; }
|
||||||
@@ -41,6 +41,10 @@ else
|
|||||||
then
|
then
|
||||||
dir="right"
|
dir="right"
|
||||||
fi
|
fi
|
||||||
|
if [ "$2" = "l" ]
|
||||||
|
then
|
||||||
|
dir="left"
|
||||||
|
fi
|
||||||
|
|
||||||
# echo "xrandr --output \"$output\" --rotate \"$dir\""
|
# echo "xrandr --output \"$output\" --rotate \"$dir\""
|
||||||
xrandr --output "$output" --rotate "$dir"
|
xrandr --output "$output" --rotate "$dir"
|
||||||
@@ -54,15 +58,17 @@ else
|
|||||||
alias spt="speedtest"
|
alias spt="speedtest"
|
||||||
alias pg="ping -c 5 google.ca"
|
alias pg="ping -c 5 google.ca"
|
||||||
|
|
||||||
alias rcg="c ~/Documents/coding/random-color-generator"
|
alias mt="ok ~/Documents/School/136/calc-textbook.pdf"
|
||||||
alias dcr="c ~/Documents/coding/dcr-logger"
|
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
|
fi
|
||||||
|
|
||||||
# school
|
# school
|
||||||
alias sch="$cd_school"
|
alias sch="$cd_school"
|
||||||
alias 136="$cd_school/136"
|
alias 136="$cd_school/136"
|
||||||
alias pr2="$cd_school/136/par/2"
|
alias pr2="$cd_school/136/par/2"
|
||||||
alias mt="ok \"$cd_school\"/136/calc-textbook.pdf"
|
|
||||||
alias psy="$cd_school/psy"
|
alias psy="$cd_school/psy"
|
||||||
|
|
||||||
# 209
|
# 209
|
||||||
@@ -104,7 +110,7 @@ alias psy="$cd_school/psy"
|
|||||||
ok() { okular $1 ; }
|
ok() { okular $1 ; }
|
||||||
|
|
||||||
# config
|
# config
|
||||||
alias lc="c ~/linux-config"
|
alias lc="d ~/linux-config"
|
||||||
alias vb="vi ~/.bash_aliases"
|
alias vb="vi ~/.bash_aliases"
|
||||||
alias vv="vi ~/.vimrc"
|
alias vv="vi ~/.vimrc"
|
||||||
alias r=". ~/.bashrc"
|
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 'Valloric/YouCompleteMe'
|
||||||
Plug 'honza/vim-snippets'
|
Plug 'honza/vim-snippets'
|
||||||
Plug 'SirVer/ultisnips'
|
Plug 'SirVer/ultisnips'
|
||||||
" let g:ycm_key_list_select_completion = ['<C-d>', '<Down>']
|
Plug 'ervandew/supertab'
|
||||||
" let g:ycm_key_list_previous_completion = ['<C-u>', '<Up>']
|
|
||||||
let g:ycm_key_list_select_completion = []
|
" make YCM compatible with UltiSnips (using supertab)
|
||||||
let g:ycm_key_list_previous_completion = []
|
let g:ycm_key_list_select_completion = ['<C-n>', '<Down>']
|
||||||
let g:UltiSnipsExpandTrigger = "<c-j>"
|
let g:ycm_key_list_previous_completion = ['<C-p>', '<Up>']
|
||||||
let g:UltiSnipsJumpForwardTrigger = "<c-b>"
|
let g:SuperTabDefaultCompletionType = '<C-n>'
|
||||||
let g:UltiSnipsJumpBackwardTrigger = "<c-z>"
|
|
||||||
|
" better key bindings for UltiSnipsExpandTrigger
|
||||||
|
let g:UltiSnipsExpandTrigger = "<tab>"
|
||||||
|
let g:UltiSnipsJumpForwardTrigger = "<tab>"
|
||||||
|
let g:UltiSnipsJumpBackwardTrigger = "<s-tab>"
|
||||||
|
|
||||||
call plug#end()
|
call plug#end()
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# home
|
# home
|
||||||
files=".bash_aliases .bashrc .inputrc .vimrc .gvimrc"
|
files=".bash_aliases .bashrc .inputrc .vimrc .gvimrc .gitconfig"
|
||||||
dotDir=~/linux-config/dotfiles
|
dotDir=~/linux-config/dotfiles
|
||||||
|
|
||||||
for file in $files; do
|
for file in $files; do
|
||||||
|
|||||||
Reference in New Issue
Block a user