Added ;;; command in vimrc and fixed "k -"

This commit is contained in:
Austen Adler 2014-07-21 00:50:13 -04:00
parent b9a2ad89b6
commit e23f078245
2 changed files with 4 additions and 3 deletions

6
bashrc
View File

@ -101,14 +101,14 @@ alias rmgit="git remote rm origin;git remote rm https;git remote rm oOrigin;git
function mcl(){ mkdir "$@"&&cl "$@"; } function mcl(){ mkdir "$@"&&cl "$@"; }
function cl(){ cd "$@" && ls; } function cl(){ cd "$@" && ls; }
function k(){ function k(){
echo "$@"
if [ -d "$@" ] ; then if [ -d "$@" ] ; then
cd "$@" && ls cd "$@" && ls
elif [ "$@" == "-" ] ; then
cd - && ls
else else
vim "$@" vim "$@"
fi fi
#elif [ -f "$@" ] ; then
# vim "$@"
#fi
} }
complete -f k complete -f k
function ovim(){ vim +"SessionOpen $@"; } function ovim(){ vim +"SessionOpen $@"; }

1
vimrc
View File

@ -97,6 +97,7 @@ inoremap <> <><Left>
inoremap {} <Right>{}<Left><CR><Esc>O inoremap {} <Right>{}<Left><CR><Esc>O
inoremap {% {% %}<Left><Left><Left> inoremap {% {% %}<Left><Left><Left>
inoremap [] []<Left> inoremap [] []<Left>
inoremap ;;; <Esc>A
inoremap ;; <Esc>m`A;<Esc>``a inoremap ;; <Esc>m`A;<Esc>``a
inoremap ;;<Space> <Esc>A;<Esc>o inoremap ;;<Space> <Esc>A;<Esc>o
nnoremap ;; m"A;<Esc>`" nnoremap ;; m"A;<Esc>`"