Proper macvim setup.
This commit is contained in:
parent
b165c4c4ac
commit
13ab7d3f17
@ -1,7 +1,7 @@
|
|||||||
alias emacs="emacsclient -t"
|
alias emacs="emacsclient -t"
|
||||||
alias xemacs="\emacs --daemon > /dev/null 2&> /dev/null; emacsclient -c &"
|
alias xemacs="\emacs --daemon > /dev/null 2&> /dev/null; emacsclient -c &"
|
||||||
alias tmux="tmux -2"
|
alias tmux="tmux -2"
|
||||||
reload_tmux_conf="tmux source-file .tmux.conf"
|
alias reload_tmux_conf="tmux source-file .tmux.conf"
|
||||||
alias tmux_cb_to_remote_cb='tmux saveb - | linux_nc_paste_to_remote_clipboard'
|
alias tmux_cb_to_remote_cb='tmux saveb - | linux_nc_paste_to_remote_clipboard'
|
||||||
alias timestamp='date +%s'
|
alias timestamp='date +%s'
|
||||||
alias fn='find . -name '
|
alias fn='find . -name '
|
||||||
@ -47,3 +47,5 @@ done
|
|||||||
alias stfu="osascript -e 'set volume output muted true'"
|
alias stfu="osascript -e 'set volume output muted true'"
|
||||||
alias pumpitup="osascript -e 'set volume 7'"
|
alias pumpitup="osascript -e 'set volume 7'"
|
||||||
alias pip-upgrade="pip freeze --local | get_cols -F "=" 1 | xargs -n1 sudo pip install -U"
|
alias pip-upgrade="pip freeze --local | get_cols -F "=" 1 | xargs -n1 sudo pip install -U"
|
||||||
|
|
||||||
|
[[ -e /usr/local/Cellar/macvim ]] && alias vim="$(find /usr/local/Cellar/macvim -depth 1 | grep "[0-9]$")/MacVim.app/Contents/MacOS/Vim"
|
||||||
|
@ -25,9 +25,9 @@ function do_the_brew() {
|
|||||||
"python --with-brewed-openssl" \
|
"python --with-brewed-openssl" \
|
||||||
"htop" \
|
"htop" \
|
||||||
"greadlink" \
|
"greadlink" \
|
||||||
"vim --override-system-vi" \
|
|
||||||
"zsh" \
|
"zsh" \
|
||||||
"make" \
|
"make" \
|
||||||
|
"macvim --override-system-vim --custom-system-icons --with-features=huge --enable-rubyinterp --enable-pythoninterp --enable-perlinterp --enable-cscope" \
|
||||||
)
|
)
|
||||||
# `find`, `locate`, `updatedb`, and `xargs`, g-prefixed
|
# `find`, `locate`, `updatedb`, and `xargs`, g-prefixed
|
||||||
# core utilities (those that come with OS X are outdated)
|
# core utilities (those that come with OS X are outdated)
|
||||||
@ -75,12 +75,10 @@ function do_the_brew() {
|
|||||||
"rsync" \
|
"rsync" \
|
||||||
"svn" \
|
"svn" \
|
||||||
"unzip" \
|
"unzip" \
|
||||||
"macvim --override-system-vim --custom-system-icons" \
|
|
||||||
)
|
)
|
||||||
|
|
||||||
install_items=()
|
install_items=()
|
||||||
OPTIND=1
|
OPTIND=1
|
||||||
echo "${MISC[@]}"
|
|
||||||
while getopts "uebsmah" OPTCHAR;
|
while getopts "uebsmah" OPTCHAR;
|
||||||
do
|
do
|
||||||
case $OPTCHAR in
|
case $OPTCHAR in
|
||||||
|
@ -1,7 +0,0 @@
|
|||||||
INSTALL="sudo apt-get -y install"
|
|
||||||
$INSTALL zsh
|
|
||||||
$INSTALL tmux
|
|
||||||
$INSTALL emacs24-nox
|
|
||||||
$INSTALL nmap
|
|
||||||
$INSTALL python2.7
|
|
||||||
$INSTALL python-pip python-dev
|
|
41
setup.sh
41
setup.sh
@ -7,6 +7,16 @@ DOTFILES_DIRECTORY="$(dotfiles_abspath)/dotfiles"
|
|||||||
|
|
||||||
|
|
||||||
function symlink_dotfiles() {
|
function symlink_dotfiles() {
|
||||||
|
local overwrite=''
|
||||||
|
OPTIND=1
|
||||||
|
while getopts "o" OPTCHAR;
|
||||||
|
do
|
||||||
|
case $OPTCHAR in
|
||||||
|
o)
|
||||||
|
overwrite='yes'
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
cd $DOTFILES_DIRECTORY
|
cd $DOTFILES_DIRECTORY
|
||||||
[ -a ~/.dotfiles-backups ] && mv ~/.dotfiles-backups ~/.dotfiles-backups.old
|
[ -a ~/.dotfiles-backups ] && mv ~/.dotfiles-backups ~/.dotfiles-backups.old
|
||||||
mkdir ~/.dotfiles-backups
|
mkdir ~/.dotfiles-backups
|
||||||
@ -16,21 +26,30 @@ function symlink_dotfiles() {
|
|||||||
echo "linking $link_destination to $link_target"
|
echo "linking $link_destination to $link_target"
|
||||||
# Using only test -e doesn't work here because it will return
|
# Using only test -e doesn't work here because it will return
|
||||||
# false if the destination of the symbolic link at does not exist.
|
# false if the destination of the symbolic link at does not exist.
|
||||||
test -e $link_destination || test -L $link_destination && mv $link_destination ~/.dotfiles-backups
|
test -e $link_destination || test -L $link_destination && test $overwrite && mv $link_destination ~/.dotfiles-backups && ln -si $link_target $link_destination
|
||||||
ln -si $link_target $link_destination
|
|
||||||
done
|
done
|
||||||
[ -a ~/.dotfiles-backups.old ] && mv ~/.dotfiles-backups.old ~/.dotfiles-backups/.dotfiles-backups
|
[ -a ~/.dotfiles-backups.old ] && mv ~/.dotfiles-backups.old ~/.dotfiles-backups/.dotfiles-backups
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function symlink_dotfiles_prompt() {
|
function symlink_dotfiles_prompt() {
|
||||||
read -p "Symlinking files from $DOTFILES_DIRECTORY. This may overwrite existing files in your home directory. Do you wish to proceed? (y/n) " -n 1
|
read -p "Symlinking files from $DOTFILES_DIRECTORY. This ? (y/n) " -n 1
|
||||||
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
||||||
echo
|
echo
|
||||||
symlink_dotfiles
|
symlink_dotfiles
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function apt-get() {
|
||||||
|
INSTALL="sudo apt-get -y install"
|
||||||
|
$INSTALL zsh
|
||||||
|
$INSTALL tmux
|
||||||
|
$INSTALL emacs24-nox
|
||||||
|
$INSTALL nmap
|
||||||
|
$INSTALL python2.7
|
||||||
|
$INSTALL python-pip python-dev
|
||||||
|
}
|
||||||
|
|
||||||
function setup_help() {
|
function setup_help() {
|
||||||
echo "setup Usage:
|
echo "setup Usage:
|
||||||
-a Install apt-get packages.
|
-a Install apt-get packages.
|
||||||
@ -38,6 +57,7 @@ function setup_help() {
|
|||||||
-s Symlink dotfiles to home directory.
|
-s Symlink dotfiles to home directory.
|
||||||
-b Install brew packages.
|
-b Install brew packages.
|
||||||
-p Install python packages.
|
-p Install python packages.
|
||||||
|
-e Do absolutely everything with the most aggresive options.
|
||||||
-h display this help message."
|
-h display this help message."
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -46,7 +66,7 @@ function setup() {
|
|||||||
setup_help
|
setup_help
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
while getopts "aosbp" OPTCHAR;
|
while getopts "aosbpe" OPTCHAR;
|
||||||
do
|
do
|
||||||
case $OPTCHAR in
|
case $OPTCHAR in
|
||||||
a)
|
a)
|
||||||
@ -74,6 +94,19 @@ function setup() {
|
|||||||
fi
|
fi
|
||||||
install_python_packages $REPLY
|
install_python_packages $REPLY
|
||||||
;;
|
;;
|
||||||
|
e)
|
||||||
|
case uname in
|
||||||
|
Darwin)
|
||||||
|
do_the_brew -au
|
||||||
|
;;
|
||||||
|
Linux)
|
||||||
|
apt-get
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
install_python_packages -a
|
||||||
|
symlink_dotfiles
|
||||||
|
source resources/osx.sh
|
||||||
|
;;
|
||||||
h)
|
h)
|
||||||
setup_help
|
setup_help
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user