diff --git a/.gitmodules b/.gitmodules index 757d527..e497ae6 100644 --- a/.gitmodules +++ b/.gitmodules @@ -282,10 +282,6 @@ path = vim/bundle/vim-scripts-Specky url = https://github.com/vim-scripts/Specky.git ignore = dirty -[submodule "zsh/zsh-syntax-highlighting"] - path = zsh/zsh-syntax-highlighting - url = https://github.com/zsh-users/zsh-syntax-highlighting.git - ignore = dirty [submodule "vim/bundle/tpope-vim-bundler"] path = vim/bundle/tpope-vim-bundler url = https://github.com/tpope/vim-bundler diff --git a/Rakefile b/Rakefile index 0d72628..5a0e096 100644 --- a/Rakefile +++ b/Rakefile @@ -21,15 +21,19 @@ task :install => [:submodule_init, :submodules] do file_operation(Dir.glob('vimify/*')) if want_to_install?('vimification of command line tools') file_operation(Dir.glob('{vim,vimrc}')) if want_to_install?('vim configuration (highly recommended)') - if want_to_install?('zsh enhancements & prezto') - install_prezto - end + Rake::Task["install_prezto"].execute install_fonts if RUBY_PLATFORM.downcase.include?("darwin") success_msg("installed") end +task :install_prezto do + if want_to_install?('zsh enhancements & prezto') + install_prezto + end +end + task :update => [:install] do #TODO: for now, we do the same as install. But it would be nice #not to clobber zsh files @@ -107,6 +111,9 @@ def install_prezto file_operation(Dir.glob('zsh/prezto/runcoms/z*'), :copy) end + puts "Overriding prezto ~/.zpreztorc with YADR's zpreztorc to enable additional modules..." + run %{ ln -nfs "$HOME/.yadr/zsh/prezto-override/zpreztorc" "${ZDOTDIR:-$HOME}/.zpreztorc" } + puts "Creating directories for your customizations" run %{ mkdir -p $HOME/.zsh.before } run %{ mkdir -p $HOME/.zsh.after } diff --git a/zsh/highlighting.zsh b/zsh/highlighting.zsh deleted file mode 100644 index 752671e..0000000 --- a/zsh/highlighting.zsh +++ /dev/null @@ -1 +0,0 @@ -source $HOME/.yadr/zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh diff --git a/zsh/prezto-override/zpreztorc b/zsh/prezto-override/zpreztorc new file mode 100644 index 0000000..afb7514 --- /dev/null +++ b/zsh/prezto-override/zpreztorc @@ -0,0 +1,121 @@ +# +# Sets Prezto options. +# +# Authors: +# Sorin Ionescu +# + +# +# General +# + +# Set case-sensitivity for completion, history lookup, etc. +zstyle ':prezto:*:*' case-sensitive 'no' + +# Color output (auto set to 'no' on dumb terminals). +zstyle ':prezto:*:*' color 'yes' + +# Set the Zsh modules to load (man zshmodules). +# zstyle ':prezto:load' zmodule 'attr' 'stat' + +# Set the Zsh functions to load (man zshcontrib). +# zstyle ':prezto:load' zfunction 'zargs' 'zmv' + +# Set the Prezto modules to load (browse modules). +# The order matters. +zstyle ':prezto:load' pmodule \ + 'environment' \ + 'terminal' \ + 'editor' \ + 'history' \ + 'directory' \ + 'spectrum' \ + 'utility' \ + 'completion' \ + 'prompt' \ + 'syntax-highlighting' \ + 'history-substring-search' + +# +# Editor +# + +# Set the key mapping style to 'emacs' or 'vi'. +zstyle ':prezto:module:editor' keymap 'vi' + +# Auto convert .... to ../.. +# zstyle ':prezto:module:editor' dot-expansion 'yes' + +# +# Git +# + +# Ignore submodules when they are 'dirty', 'untracked', 'all', or 'none'. +# zstyle ':prezto:module:git:ignore' submodule 'all' + +# +# GNU Utility +# + +# Set the command prefix on non-GNU systems. +# zstyle ':prezto:module:gnu-utility' prefix 'g' + +# +# Pacman +# + +# Set the Pacman frontend. +# zstyle ':prezto:module:pacman' frontend 'yaourt' + +# +# Prompt +# + +# Set the prompt theme to load. +# Setting it to 'random' loads a random theme. +# Auto set to 'off' on dumb terminals. +zstyle ':prezto:module:prompt' theme 'sorin' + +# +# Screen +# + +# Auto start a session when Zsh is launched. +# zstyle ':prezto:module:screen' auto-start 'yes' + +# +# SSH-Agent +# + +# Enable ssh-agent forwarding. +zstyle ':prezto:module:ssh-agent' forwarding 'yes' + +# Set ssh-agent identities to load. +# zstyle ':prezto:module:ssh-agent' identities 'id_rsa' 'id_rsa2' 'id_github' + +# +# Syntax Highlighting +# + +# Set syntax highlighters. +# By default main, brackets, and cursor are enabled. +zstyle ':prezto:module:syntax-highlighting' highlighters \ + 'main' \ + 'brackets' \ + 'pattern' \ + 'cursor' \ + 'root' + +# +# Terminal +# + +# Auto set the tab and window titles. +zstyle ':prezto:module:terminal' auto-title 'yes' + +# +# Tmux +# + +# Auto start a session when Zsh is launched. +# zstyle ':prezto:module:tmux' auto-start 'yes' diff --git a/zsh/zvm.zsh b/zsh/zmv.zsh similarity index 100% rename from zsh/zvm.zsh rename to zsh/zmv.zsh diff --git a/zsh/zsh-syntax-highlighting b/zsh/zsh-syntax-highlighting deleted file mode 160000 index 4519467..0000000 --- a/zsh/zsh-syntax-highlighting +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 45194671af8e1d6b37b16e214a58674762ab8e49