1
0
Fork 0

Increase heading readability

pull/226/merge
Sorin Ionescu 12 years ago
parent 060d9064f8
commit 9a52ecb21b

@ -14,6 +14,10 @@ fi
# Load and initialize the completion system ignoring insecure directories. # Load and initialize the completion system ignoring insecure directories.
autoload -Uz compinit && compinit -i autoload -Uz compinit && compinit -i
#
# Options
#
setopt COMPLETE_IN_WORD # Complete from both ends of a word. setopt COMPLETE_IN_WORD # Complete from both ends of a word.
setopt ALWAYS_TO_END # Move cursor to the end of a completed word. setopt ALWAYS_TO_END # Move cursor to the end of a completed word.
setopt PATH_DIRS # Perform path search even on command names with slashes. setopt PATH_DIRS # Perform path search even on command names with slashes.
@ -26,6 +30,10 @@ unsetopt FLOW_CONTROL # Disable start/stop characters in shell editor.
# Treat these characters as part of a word. # Treat these characters as part of a word.
WORDCHARS='*?_-.[]~&;!#$%^(){}<>' WORDCHARS='*?_-.[]~&;!#$%^(){}<>'
#
# Styles
#
# Use caching to make completion for cammands such as dpkg and apt usable. # Use caching to make completion for cammands such as dpkg and apt usable.
zstyle ':completion::complete:*' use-cache on zstyle ':completion::complete:*' use-cache on
zstyle ':completion::complete:*' cache-path "$HOME/.zcache" zstyle ':completion::complete:*' cache-path "$HOME/.zcache"

@ -6,6 +6,10 @@
# Sorin Ionescu <sorin.ionescu@gmail.com> # Sorin Ionescu <sorin.ionescu@gmail.com>
# #
#
# Options
#
setopt AUTO_CD # Auto changes to a directory without typing cd. setopt AUTO_CD # Auto changes to a directory without typing cd.
setopt AUTO_PUSHD # Push the old directory onto the stack on cd. setopt AUTO_PUSHD # Push the old directory onto the stack on cd.
setopt PUSHD_IGNORE_DUPS # Do not store duplicates in the stack. setopt PUSHD_IGNORE_DUPS # Do not store duplicates in the stack.
@ -18,7 +22,10 @@ setopt EXTENDED_GLOB # Use extended globbing syntax.
unsetopt CLOBBER # Do not overwrite existing files with > and >>. unsetopt CLOBBER # Do not overwrite existing files with > and >>.
# Use >! and >>! to bypass. # Use >! and >>! to bypass.
#
# Aliases # Aliases
#
alias d='dirs -v' alias d='dirs -v'
for index ({1..9}) alias "$index"="cd +${index}"; unset index for index ({1..9}) alias "$index"="cd +${index}"; unset index

@ -12,7 +12,9 @@ if (( ! $+commands[dpkg] && ! $+commands[apt-get] )); then
return 1 return 1
fi fi
#
# Aliases # Aliases
#
# Cleans the cache. # Cleans the cache.
alias debc='sudo apt-get clean && sudo apt-get autoclean' alias debc='sudo apt-get clean && sudo apt-get autoclean'

@ -45,6 +45,10 @@ if [[ "$TERM" == 'dumb' ]]; then
return 1 return 1
fi fi
#
# Options
#
# Beep on error in line editor. # Beep on error in line editor.
setopt BEEP setopt BEEP
@ -52,6 +56,10 @@ setopt BEEP
autoload -Uz edit-command-line autoload -Uz edit-command-line
zle -N edit-command-line zle -N edit-command-line
#
# Variables
#
# Use human-friendly identifiers. # Use human-friendly identifiers.
zmodload zsh/terminfo zmodload zsh/terminfo
typeset -gA key_info typeset -gA key_info
@ -93,6 +101,10 @@ for key in "$key_info[@]"; do
fi fi
done done
#
# Functions
#
# Displays editor information. # Displays editor information.
function editor-info { function editor-info {
# Clean up previous $editor_info. # Clean up previous $editor_info.
@ -191,7 +203,10 @@ zle -N prepend-sudo
# Reset to default key bindings. # Reset to default key bindings.
bindkey -d bindkey -d
# Emacs key bindings. #
# Emacs Key Bindings
#
for key ("$key_info[Escape]"{B,b}) bindkey -M emacs "$key" emacs-backward-word for key ("$key_info[Escape]"{B,b}) bindkey -M emacs "$key" emacs-backward-word
for key ("$key_info[Escape]"{F,f}) bindkey -M emacs "$key" emacs-forward-word for key ("$key_info[Escape]"{F,f}) bindkey -M emacs "$key" emacs-forward-word
bindkey -M emacs "$key_info[Escape]$key_info[Left]" emacs-backward-word bindkey -M emacs "$key_info[Escape]$key_info[Left]" emacs-backward-word
@ -220,7 +235,9 @@ if (( $+widgets[history-incremental-pattern-search-backward] )); then
history-incremental-pattern-search-forward history-incremental-pattern-search-forward
fi fi
# Vi key bindings. #
# Vi Key Bindings
#
# Edit command in an external editor. # Edit command in an external editor.
bindkey -M vicmd "v" edit-command-line bindkey -M vicmd "v" edit-command-line
@ -241,7 +258,10 @@ else
bindkey -M vicmd "/" history-incremental-search-forward bindkey -M vicmd "/" history-incremental-search-forward
fi fi
# Emacs and Vi key bindings. #
# Emacs and Vi Key Bindings
#
for keymap in 'emacs' 'viins'; do for keymap in 'emacs' 'viins'; do
bindkey -M "$keymap" "$key_info[Home]" beginning-of-line bindkey -M "$keymap" "$key_info[Home]" beginning-of-line
bindkey -M "$keymap" "$key_info[End]" end-of-line bindkey -M "$keymap" "$key_info[End]" end-of-line
@ -295,6 +315,10 @@ if zstyle -t ':omz:module:editor' dot-expansion; then
bindkey -M isearch . self-insert 2> /dev/null bindkey -M isearch . self-insert 2> /dev/null
fi fi
#
# Layout
#
# Set the key layout. # Set the key layout.
zstyle -s ':omz:module:editor' keymap 'keymap' zstyle -s ':omz:module:editor' keymap 'keymap'
if [[ "$keymap" == (emacs|) ]]; then if [[ "$keymap" == (emacs|) ]]; then

@ -5,16 +5,25 @@
# Sorin Ionescu <sorin.ionescu@gmail.com> # Sorin Ionescu <sorin.ionescu@gmail.com>
# #
#
# Smart URLs # Smart URLs
#
autoload -Uz url-quote-magic autoload -Uz url-quote-magic
zle -N self-insert url-quote-magic zle -N self-insert url-quote-magic
#
# General # General
#
setopt BRACE_CCL # Allow brace character class list expansion. setopt BRACE_CCL # Allow brace character class list expansion.
setopt RC_QUOTES # Allow 'Henry''s Garage' instead of 'Henry'\''s Garage'. setopt RC_QUOTES # Allow 'Henry''s Garage' instead of 'Henry'\''s Garage'.
unsetopt MAIL_WARNING # Don't print a warning message if a mail file has been accessed. unsetopt MAIL_WARNING # Don't print a warning message if a mail file has been accessed.
#
# Jobs # Jobs
#
setopt LONG_LIST_JOBS # List jobs in the long format by default. setopt LONG_LIST_JOBS # List jobs in the long format by default.
setopt AUTO_RESUME # Attempt to resume existing job before creating a new process. setopt AUTO_RESUME # Attempt to resume existing job before creating a new process.
setopt NOTIFY # Report status of background jobs immediately. setopt NOTIFY # Report status of background jobs immediately.
@ -22,13 +31,19 @@ unsetopt BG_NICE # Don't run all background jobs at a lower priority.
unsetopt HUP # Don't kill jobs on shell exit. unsetopt HUP # Don't kill jobs on shell exit.
unsetopt CHECK_JOBS # Don't report on jobs when shell exit. unsetopt CHECK_JOBS # Don't report on jobs when shell exit.
#
# Grep # Grep
#
if zstyle -t ':omz:environment:grep' color; then if zstyle -t ':omz:environment:grep' color; then
export GREP_COLOR='37;45' export GREP_COLOR='37;45'
export GREP_OPTIONS='--color=auto' export GREP_OPTIONS='--color=auto'
fi fi
#
# Termcap # Termcap
#
if zstyle -t ':omz:environment:termcap' color; then if zstyle -t ':omz:environment:termcap' color; then
export LESS_TERMCAP_mb=$'\E[01;31m' # Begins blinking. export LESS_TERMCAP_mb=$'\E[01;31m' # Begins blinking.
export LESS_TERMCAP_md=$'\E[01;31m' # Begins bold. export LESS_TERMCAP_md=$'\E[01;31m' # Begins bold.

@ -8,6 +8,10 @@
source "${0:h}/external/zsh-history-substring-search.zsh" source "${0:h}/external/zsh-history-substring-search.zsh"
#
# Styles
#
if zstyle -t ':omz:module:history-substring-search' case-sensitive; then if zstyle -t ':omz:module:history-substring-search' case-sensitive; then
unset HISTORY_SUBSTRING_SEARCH_GLOBBING_FLAGS unset HISTORY_SUBSTRING_SEARCH_GLOBBING_FLAGS
fi fi
@ -16,6 +20,10 @@ if ! zstyle -t ':omz:module:history-substring-search' color; then
unset HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_{FOUND,NOT_FOUND} unset HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_{FOUND,NOT_FOUND}
fi fi
#
# Key Bindings
#
bindkey -M emacs "$key_info[Control]P" history-substring-search-up bindkey -M emacs "$key_info[Control]P" history-substring-search-up
bindkey -M emacs "$key_info[Control]N" history-substring-search-down bindkey -M emacs "$key_info[Control]N" history-substring-search-down
bindkey -M vicmd "k" history-substring-search-up bindkey -M vicmd "k" history-substring-search-up

@ -6,10 +6,18 @@
# Sorin Ionescu <sorin.ionescu@gmail.com> # Sorin Ionescu <sorin.ionescu@gmail.com>
# #
#
# Variables
#
HISTFILE="$HOME/.zhistory" # The path to the history file. HISTFILE="$HOME/.zhistory" # The path to the history file.
HISTSIZE=10000 # The maximum number of events to save in the internal history. HISTSIZE=10000 # The maximum number of events to save in the internal history.
SAVEHIST=10000 # The maximum number of events to save in the history file. SAVEHIST=10000 # The maximum number of events to save in the history file.
#
# Options
#
setopt BANG_HIST # Treat the '!' character specially during expansion. setopt BANG_HIST # Treat the '!' character specially during expansion.
setopt EXTENDED_HISTORY # Write the history file in the ':start:elapsed;command' format. setopt EXTENDED_HISTORY # Write the history file in the ':start:elapsed;command' format.
setopt INC_APPEND_HISTORY # Write to the history file immediately, not when the shell exits. setopt INC_APPEND_HISTORY # Write to the history file immediately, not when the shell exits.
@ -23,7 +31,9 @@ setopt HIST_SAVE_NO_DUPS # Do not write a duplicate event to the history
setopt HIST_VERIFY # Do not execute immediately upon history expansion. setopt HIST_VERIFY # Do not execute immediately upon history expansion.
setopt HIST_BEEP # Beep when accessing non-existent history. setopt HIST_BEEP # Beep when accessing non-existent history.
#
# Aliases # Aliases
#
# Lists the ten most used commands. # Lists the ten most used commands.
alias history-stat="history . | awk '{print \$2}' | sort | uniq -c | sort -n -r | head" alias history-stat="history . | awk '{print \$2}' | sort | uniq -c | sort -n -r | head"

@ -11,7 +11,9 @@ if [[ "$OSTYPE" != darwin* ]]; then
return 1 return 1
fi fi
#
# Paths # Paths
#
# Set the list of directories that info searches for manuals. # Set the list of directories that info searches for manuals.
infopath=( infopath=(
@ -31,7 +33,10 @@ path=(
$path $path
) )
#
# Aliases # Aliases
#
alias portc='sudo port clean --all installed' alias portc='sudo port clean --all installed'
alias porti='sudo port install' alias porti='sudo port install'
alias ports='port search' alias ports='port search'

@ -10,12 +10,20 @@ if [[ "$OSTYPE" != darwin* ]]; then
return 1 return 1
fi fi
#
# Aliases
#
# Change directory to the current Finder directory. # Change directory to the current Finder directory.
alias cdf='cd "$(pfd)"' alias cdf='cd "$(pfd)"'
# Push directory to the current Finder directory. # Push directory to the current Finder directory.
alias pushdf='pushd "$(pfd)"' alias pushdf='pushd "$(pfd)"'
#
# Functions
#
# Open files in Quick Look. # Open files in Quick Look.
function ql { function ql {
(( $# > 0 )) && qlmanage -p "$@" &> /dev/null (( $# > 0 )) && qlmanage -p "$@" &> /dev/null

@ -14,6 +14,10 @@ if (( ! $+commands[pacman] )); then
return 1 return 1
fi fi
#
# Frontend
#
# Get the Pacman frontend. # Get the Pacman frontend.
zstyle -s ':omz:module:pacman' frontend '_pacman_frontend' zstyle -s ':omz:module:pacman' frontend '_pacman_frontend'
@ -25,7 +29,9 @@ if (( $+commands[$_pacman_frontend] )); then
fi fi
fi fi
#
# Aliases # Aliases
#
# Installs packages from repositories. # Installs packages from repositories.
alias paci='sudo pacman --sync' alias paci='sudo pacman --sync'

@ -5,6 +5,10 @@
# Sorin Ionescu <sorin.ionescu@gmail.com> # Sorin Ionescu <sorin.ionescu@gmail.com>
# #
#
# Aliases
#
# Disable color. # Disable color.
if ! zstyle -t ':omz:module:pacman:yaourt' color; then if ! zstyle -t ':omz:module:pacman:yaourt' color; then
alias pacman='pacman --nocolor' alias pacman='pacman --nocolor'

@ -10,6 +10,10 @@ if (( ! $+commands[perl] )); then
return 1 return 1
fi fi
#
# Local Module Installation
#
if [[ "$OSTYPE" == darwin* ]]; then if [[ "$OSTYPE" == darwin* ]]; then
# Perl is slow; cache its output. # Perl is slow; cache its output.
cache_file="${0:h}/cache.zsh" cache_file="${0:h}/cache.zsh"
@ -35,7 +39,9 @@ if [[ "$OSTYPE" == darwin* ]]; then
unset env_var unset env_var
fi fi
#
# Aliases # Aliases
#
# General # General
alias pd='perldoc' alias pd='perldoc'

@ -12,7 +12,10 @@ if (( ! $+commands[rails] )); then
return 1 return 1
fi fi
#
# Aliases (Compatible with Rails 2) # Aliases (Compatible with Rails 2)
#
alias rc='_rails-command console' alias rc='_rails-command console'
alias rdc='_rails-command dbconsole' alias rdc='_rails-command dbconsole'
alias rdm='rake db:migrate' alias rdm='rake db:migrate'
@ -27,7 +30,10 @@ alias rs='_rails-command server'
alias rsd='_rails-command server --debugger' alias rsd='_rails-command server --debugger'
alias rx='_rails-command destroy' alias rx='_rails-command destroy'
#
# Functions # Functions
#
function _rails-command { function _rails-command {
if [[ -e "script/server" ]]; then if [[ -e "script/server" ]]; then
ruby script/"$@" ruby script/"$@"

@ -10,7 +10,10 @@ if (( ! $+commands[rsync] )); then
return 1 return 1
fi fi
#
# Aliases # Aliases
#
_rsync_cmd='rsync --verbose --progress --human-readable --compress --archive --hard-links --one-file-system' _rsync_cmd='rsync --verbose --progress --human-readable --compress --archive --hard-links --one-file-system'
# Mac OS X and HFS+ Enhancements # Mac OS X and HFS+ Enhancements

@ -36,7 +36,9 @@ else
fi fi
fi fi
#
# Aliases # Aliases
#
# Bundler # Bundler
if (( $+commands[bundle] )); then if (( $+commands[bundle] )); then

@ -10,7 +10,10 @@ if (( ! $+commands[screen] )); then
return 1 return 1
fi fi
#
# Auto Start # Auto Start
#
if [[ -z "$STY" ]] && zstyle -t ':omz:module:screen' auto-start; then if [[ -z "$STY" ]] && zstyle -t ':omz:module:screen' auto-start; then
session="$( session="$(
screen -list 2> /dev/null \ screen -list 2> /dev/null \
@ -25,7 +28,11 @@ if [[ -z "$STY" ]] && zstyle -t ':omz:module:screen' auto-start; then
fi fi
fi fi
#
# Aliases # Aliases
#
alias sl="screen -list" alias sl="screen -list"
alias sn="screen -U -S" alias sn="screen -U -S"
alias sr="screen -a -A -U -D -R" alias sr="screen -a -A -U -D -R"

@ -11,7 +11,10 @@ if (( ! $+commands[tmux] )); then
return 1 return 1
fi fi
#
# Auto Start # Auto Start
#
if [[ -z "$TMUX" ]] && zstyle -t ':omz:module:tmux' auto-start; then if [[ -z "$TMUX" ]] && zstyle -t ':omz:module:tmux' auto-start; then
tmux_session='#OMZ' tmux_session='#OMZ'
@ -33,6 +36,9 @@ if [[ -z "$TMUX" ]] && zstyle -t ':omz:module:tmux' auto-start; then
exec tmux new-session -t "$tmux_session" exec tmux new-session -t "$tmux_session"
fi fi
#
# Aliases # Aliases
#
alias ta="tmux attach-session" alias ta="tmux attach-session"
alias tl="tmux list-sessions" alias tl="tmux list-sessions"

@ -13,7 +13,9 @@ omodload 'spectrum'
# Correct commands. # Correct commands.
setopt CORRECT setopt CORRECT
#
# Aliases # Aliases
#
# Disable correction. # Disable correction.
alias ack='nocorrect ack' alias ack='nocorrect ack'
@ -128,7 +130,9 @@ fi
# Serves a directory via HTTP. # Serves a directory via HTTP.
alias http-serve='python -m SimpleHTTPServer' alias http-serve='python -m SimpleHTTPServer'
#
# Functions # Functions
#
# Makes a directory and changes to it. # Makes a directory and changes to it.
function mkdcd { function mkdcd {

@ -11,7 +11,10 @@ if (( ! $+commands[yum] )); then
return 1 return 1
fi fi
#
# Aliases # Aliases
#
alias yumc='sudo yum clean all' # Cleans the cache. alias yumc='sudo yum clean all' # Cleans the cache.
alias yumh='yum history' # Displays history. alias yumh='yum history' # Displays history.
alias yumi='sudo yum install' # Installs package(s). alias yumi='sudo yum install' # Installs package(s).
@ -23,4 +26,3 @@ alias yums='yum search' # Searches for a package.
alias yumu='sudo yum update' # Updates packages. alias yumu='sudo yum update' # Updates packages.
alias yumU='sudo yum upgrade' # Upgrades packages. alias yumU='sudo yum upgrade' # Upgrades packages.

@ -8,7 +8,10 @@
# Set the path to Oh My Zsh. # Set the path to Oh My Zsh.
export OMZ="$HOME/.oh-my-zsh" export OMZ="$HOME/.oh-my-zsh"
#
# Paths # Paths
#
typeset -gU cdpath fpath mailpath manpath path typeset -gU cdpath fpath mailpath manpath path
typeset -gUT INFOPATH infopath typeset -gUT INFOPATH infopath
@ -49,22 +52,33 @@ for path_file in /etc/paths.d/*(.N); do
done done
unset path_file unset path_file
#
# Language # Language
#
if [[ -z "$LANG" ]]; then if [[ -z "$LANG" ]]; then
eval "$(locale)" eval "$(locale)"
fi fi
#
# Editors # Editors
#
export EDITOR='nano' export EDITOR='nano'
export VISUAL='nano' export VISUAL='nano'
export PAGER='less' export PAGER='less'
# Browser (Default) #
# Browser
#
if [[ "$OSTYPE" == darwin* ]]; then if [[ "$OSTYPE" == darwin* ]]; then
export BROWSER='open' export BROWSER='open'
fi fi
#
# Less # Less
#
# Set the default Less options. # Set the default Less options.
# Mouse-wheel scrolling has been disabled by -X (disable screen clearing). # Mouse-wheel scrolling has been disabled by -X (disable screen clearing).

Loading…
Cancel
Save