From e4c1487749d77cf456ab96ac7e86325934b43c40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=2EFernando=20S=C3=A1nchez?= Date: Sat, 1 Dec 2012 05:11:06 +0100 Subject: [PATCH] First commit --- README.md | 22 + bash_logout | 7 + bash_profile | 7 + bashrc | 187 ++++++ make.sh | 34 + not_dots/grub | 39 ++ profile | 26 + tmux.conf | 88 +++ vim/.netrwhist | 7 + vim/bundle/LaTeX-Box | 1 + vim/bundle/SpellCheck | 1 + vim/bundle/nerdtree | 1 + vim/bundle/snipmate-snippets | 1 + vim/bundle/taglist.vim | 1 + vim/bundle/tlib_vim | 1 + vim/bundle/vim-addon-mw-utils | 1 + vim/bundle/vim-fugitive | 1 + vim/bundle/vim-snipmate | 1 + vim/bundle/vundle | 1 + vim/colors/ir_black.vim | 213 +++++++ vim/colors/matrix.vim | 80 +++ vim/colors/reloaded.vim | 70 +++ vim/colors/revolutions.vim | 75 +++ vim/colors/solarized.vim | 1117 +++++++++++++++++++++++++++++++++ vim/colors/vividchalk.vim | 191 ++++++ vim/colors/wombat.vim | 51 ++ vim/ftplugin/tex.vim | 11 + vimrc | 141 +++++ zshrc | 70 +++ 29 files changed, 2446 insertions(+) create mode 100644 README.md create mode 100644 bash_logout create mode 100644 bash_profile create mode 100644 bashrc create mode 100644 make.sh create mode 100644 not_dots/grub create mode 100644 profile create mode 100644 tmux.conf create mode 100644 vim/.netrwhist create mode 160000 vim/bundle/LaTeX-Box create mode 160000 vim/bundle/SpellCheck create mode 160000 vim/bundle/nerdtree create mode 160000 vim/bundle/snipmate-snippets create mode 160000 vim/bundle/taglist.vim create mode 160000 vim/bundle/tlib_vim create mode 160000 vim/bundle/vim-addon-mw-utils create mode 160000 vim/bundle/vim-fugitive create mode 160000 vim/bundle/vim-snipmate create mode 160000 vim/bundle/vundle create mode 100644 vim/colors/ir_black.vim create mode 100644 vim/colors/matrix.vim create mode 100644 vim/colors/reloaded.vim create mode 100644 vim/colors/revolutions.vim create mode 100644 vim/colors/solarized.vim create mode 100644 vim/colors/vividchalk.vim create mode 100644 vim/colors/wombat.vim create mode 100644 vim/ftplugin/tex.vim create mode 100644 vimrc create mode 100644 zshrc diff --git a/README.md b/README.md new file mode 100644 index 0000000..c96cd01 --- /dev/null +++ b/README.md @@ -0,0 +1,22 @@ +# Balkian's dotfiles + +## Usage + +### Download +The Git Way: +```bash +git clone https://github.com/balkian/dotfiles.git +``` +The fast way: +```bash +cd; curl -#L https://github.com/balkian/dotfiles/tarball/master | tar -xzv --strip-components 1 --exclude={README.md} +``` +### Install + +Just run: +```bash +source .make.sh +``` + +## How it works +So far, this is the simplest way of keeping your dotfiles in a repository. The installation script will just back-up your files in a folder in your ~/ with the timestamp, so running it twice won't destroy your original files. diff --git a/bash_logout b/bash_logout new file mode 100644 index 0000000..de4f5f7 --- /dev/null +++ b/bash_logout @@ -0,0 +1,7 @@ +# ~/.bash_logout: executed by bash(1) when login shell exits. + +# when leaving the console clear the screen to increase privacy + +if [ "$SHLVL" = 1 ]; then + [ -x /usr/bin/clear_console ] && /usr/bin/clear_console -q +fi diff --git a/bash_profile b/bash_profile new file mode 100644 index 0000000..17bc7e0 --- /dev/null +++ b/bash_profile @@ -0,0 +1,7 @@ +if [ -f ~/.bashrc ]; then + source ~/.bashrc +fi + + +### Added by the Heroku Toolbelt +export PATH="/usr/local/heroku/bin:$PATH" diff --git a/bashrc b/bashrc new file mode 100644 index 0000000..81fb797 --- /dev/null +++ b/bashrc @@ -0,0 +1,187 @@ +# If not running interactively, don't do anything +[ -z "$PS1" ] && return + +#osx color terminal +export CLICOLOR=1 +# don't put duplicate lines in the history. See bash(1) for more options +# don't overwrite GNU Midnight Commander's setting of `ignorespace'. +#HISTCONTROL=$HISTCONTROL${HISTCONTROL+,}ignoredups +# ... or force ignoredups and ignorespace +HISTCONTROL=ignoreboth + +# append to the history file, don't overwrite it +shopt -s histappend + + +# make less more friendly for non-text input files, see lesspipe(1) +#[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)" + +#Already in bash.bashrc +# set variable identifying the chroot you work in (used in the prompt below) +#if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then +# debian_chroot=$(cat /etc/debian_chroot) +#fi +# check the window size after each command and, if necessary, +# update the values of LINES and COLUMNS. +#shopt -s checkwinsize + +#$PS0='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' +PS0='${debian_chroot:+($debian_chroot)}\u@\h:\W' + +# If this is an xterm set the title to user@host:dir +case "$TERM" in +xterm*|rxvt*) + PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1" + ;; +*) + ;; +esac + + +# Set up TERM variables. +# vt100 and xterm have no color in vim (at least on unixs), but if we call them xterm-color, they will. +# (vt100 for F-Secure SSH.) +# This may well be the case for some other terms, so I'm putting them here. +# Also set up a variable to indicate whether to set up the title functions. +# TODO gnome-terminal, or however it reports itself +case $TERM in + +screen) + TERM_IS_COLOR=true + TERM_NOT_RECOGNIZED_AS_COLOR_BY_VIM=false + TERM_NOT_RECOGNIZED_BY_SUN_UTILS=false + TERM_CAN_TITLE=true +;; + +xterm-color|color_xterm|rxvt|Eterm|screen*) # screen.linux|screen-w + TERM_IS_COLOR=true + TERM_NOT_RECOGNIZED_AS_COLOR_BY_VIM=false + TERM_NOT_RECOGNIZED_BY_SUN_UTILS=true + TERM_CAN_TITLE=true +;; + +linux) + TERM_IS_COLOR=true + TERM_NOT_RECOGNIZED_AS_COLOR_BY_VIM=false + TERM_NOT_RECOGNIZED_BY_SUN_UTILS=true + TERM_CAN_TITLE=false +;; + +xterm|vt100) + TERM_IS_COLOR=true + TERM_NOT_RECOGNIZED_AS_COLOR_BY_VIM=true + TERM_NOT_RECOGNIZED_BY_SUN_UTILS=false + TERM_CAN_TITLE=true +;; + +*xterm*|eterm|rxvt*) + TERM_IS_COLOR=true + TERM_NOT_RECOGNIZED_AS_COLOR_BY_VIM=true + TERM_NOT_RECOGNIZED_BY_SUN_UTILS=true + TERM_CAN_TITLE=true +;; + +*) + TERM_IS_COLOR=false + TERM_NOT_RECOGNIZED_AS_COLOR_BY_VIM=false + TERM_NOT_RECOGNIZED_BY_SUN_UTILS=false + TERM_CAN_TITLE=false +;; + +esac + +# dircolors... make sure that we have a color terminal, dircolors exists, and ls supports it. +if $TERM_IS_COLOR && ( dircolors --help && ls --color ) &> /dev/null; then +# For some reason, the unixs machines need me to use $HOME instead of ~ +# List files from highest priority to lowest. As soon as the loop finds one that works, it will exit. + export PROMPT_COMMAND='PS1="\\[\033[1;\`if [[ \$? = "0" ]]; then echo "32m\\]"; else echo "31m\\]"; fi\`☠ \\[\033[0m\]$PS0"' +for POSSIBLE_DIR_COLORS in "$HOME/.dir_colors" "/etc/DIR_COLORS"; do + [[ -f "$POSSIBLE_DIR_COLORS" ]] && [[ -r "$POSSIBLE_DIR_COLORS" ]] && eval `dircolors -b "$POSSIBLE_DIR_COLORS"` && break +done + +alias ls="ls --color=auto" +alias ll="ls --color=auto -l" +alias grep='grep --color=auto' +alias fgrep='fgrep --color=auto' +alias egrep='egrep --color=auto' +else +# No color, so put a slash at the end of directory names, etc. to differentiate. +alias ll="ls -lF" +fi + +# Alias definitions. +if [ -f ~/.bash_aliases ]; then + . ~/.bash_aliases +fi +alias cp="cp -i" + +# enable programmable completion features (you don't need to enable +# this, if it's already enabled in /etc/bash.bashrc and /etc/profile +# sources /etc/bash.bashrc). +#if [ -f /etc/bash_completion ] && ! shopt -oq posix; then +# . /etc/bash_completion +#fi + +# Set $TERM for libvte terminals that set $TERM wrong (like gnome-terminal) +{ [ "_$TERM" = "_xterm" ] && type ldd && type grep && type tput && [ -L "/proc/$PPID/exe" ] && { + if ldd /proc/$PPID/exe | grep libvte; then + if [ "`tput -Txterm-256color colors`" = "256" ]; then + TERM=xterm-256color + elif [ "`tput -Txterm-256color colors`" = "256" ]; then + TERM=xterm-256color + elif tput -T xterm; then + TERM=xterm + fi + fi +} +} >/dev/null 2>/dev/null + + +export PYTHONSTARTUP=~/.pythonrc.py + +parse_git_branch () +{ +git name-rev HEAD 2> /dev/null | sed 's#HEAD\ \(.*\)#(git::\1)#' +} +#parse_svn_branch() { +# parse_svn_url | sed -e 's#^'"$(parse_svn_repository_root)"'##g' | awk -F / #'{print "(svn::"$1 "/" $2 ")"}' +#} +#parse_svn_url() { +# svn info 2>/dev/null | sed -ne 's#^URL: ##p' +#} +#parse_svn_repository_root() { +# svn info 2>/dev/null | sed -ne 's#^Repository Root: ##p' +#} + +export EDITOR="vim" + +#setWindowTitle() { +# if [ ! -z "$TMUX" ];then +# echo -ne "\\033k$*\033\\" +# fi +# echo -ne "\e]2;$*\a" +#} +#updateWindowTitle() { +# setWindowTitle "${HOSTNAME%%.*}:${PWD/$HOME/~}" +#} + +# Add git and svn branch names +PS0="$PS0 \\[\033[1;32m\]\$(parse_git_branch)\\[\033[0m\]\$ " +#if [ "$TERM " = "xterm " ]; then +# export PROMPT_COMMAND="$PROMPT_COMMAND&&updateWindowTitle" +#fi +#[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function* +export PATH=$PATH:"/media/Data/code/personal-scripts/" +export CDPATH=$CDPATH:"/media/Data/" + +# TMUX +if which tmux 2>&1 >/dev/null; then + # if no session is started, start a new session + test -z ${TMUX} && tmux attach + # when quitting tmux, try to attach + if test -z ${TMUX}; then + exit; + fi +fi + +PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting diff --git a/make.sh b/make.sh new file mode 100644 index 0000000..7796117 --- /dev/null +++ b/make.sh @@ -0,0 +1,34 @@ +#!/bin/bash +############################ +# .make.sh +# This script creates symlinks from the home directory to any desired dotfiles in ~/dotfiles +############################ + +########## Variables + +dir=$(pwd) # dotfiles directory + +olddir=~/dotfiles$(date +%Y-%m-%d_%H:%M:%S) # old dotfiles backup directory +files=($(ls --ignore="not_dots" --ignore="README.md" --ignore="make.sh" $dir)) # list of files/folders to symlink in homedir + +########## + +# create dotfiles_old in homedir +echo "Creating $olddir for backup: of any existing dotfiles in ~" +mkdir -p $olddir +echo "...done" + +# change to the dotfiles directory +echo "Changing to the $dir directory" +cd $dir +echo "...done" + +# move any existing dotfiles in homedir to dotfiles_old directory, then create symlinks +for file in $files; do + echo "Moving any existing dotfiles from ~ to $olddir" + mv ~/.$file $olddir + echo "Creating symlink to $file in home directory." + ln -s $dir/$file ~/.$file +done + + diff --git a/not_dots/grub b/not_dots/grub new file mode 100644 index 0000000..6447203 --- /dev/null +++ b/not_dots/grub @@ -0,0 +1,39 @@ +# /etc/default/grub +# If you change this file, run 'update-grub' afterwards to update +# /boot/grub/grub.cfg. +# For full documentation of the options in this file, see: +# info -f grub -n 'Simple configuration' + +GRUB_DEFAULT=0 +#GRUB_HIDDEN_TIMEOUT=0 +GRUB_HIDDEN_TIMEOUT_QUIET=true +GRUB_TIMEOUT=10 +GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian` +GRUB_CMDLINE_LINUX_DEFAULT="quiet splash pcie_aspm=force i915.i915_enable_rc6=1 i915.i915_enable_fbc=1 i915.lvds_downclock=1 i915.semaphores=1 acpi_backlight=vendor" +#GRUB_CMDLINE_LINUX_DEFAULT="quiet splash pcie_aspm=force i915.i915_enable_rc6=1 i915.i915_enable_fbc=1 i915.lvds_downclock=1 i915.semaphores=1 acpi_osi=Linux acpi_backlight=vendor" +GRUB_CMDLINE_LINUX="" + +#GRUB_GFXMODE=1024x768 +#GRUB_GFXPAYLOAD_LINUX=1024x768 + +# Uncomment to enable BadRAM filtering, modify to suit your needs +# This works with Linux (no patch required) and with any kernel that obtains +# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...) +#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef" + +# Uncomment to disable graphical terminal (grub-pc only) +#GRUB_TERMINAL=console + +# The resolution used on graphical terminal +# note that you can use only modes which your graphic card supports via VBE +# you can see them in real GRUB with the command `vbeinfo' +#GRUB_GFXMODE=640x480 + +# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux +#GRUB_DISABLE_LINUX_UUID=true + +# Uncomment to disable generation of recovery mode menu entries +#GRUB_DISABLE_RECOVERY="true" + +# Uncomment to get a beep at grub start +#GRUB_INIT_TUNE="480 440 1" diff --git a/profile b/profile new file mode 100644 index 0000000..8ad8758 --- /dev/null +++ b/profile @@ -0,0 +1,26 @@ +# ~/.profile: executed by the command interpreter for login shells. +# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login +# exists. +# see /usr/share/doc/bash/examples/startup-files for examples. +# the files are located in the bash-doc package. + +# the default umask is set in /etc/profile; for setting the umask +# for ssh logins, install and configure the libpam-umask package. +#umask 022 + +# if running bash +if [ -n "$BASH_VERSION" ]; then + # include .bashrc if it exists + if [ -f "$HOME/.bashrc" ]; then + . "$HOME/.bashrc" + fi +fi + +# set PATH so it includes user's private bin if it exists +if [ -d "$HOME/bin" ] ; then + PATH="$HOME/bin:$PATH" +fi + +if [ -f $HOME/.Xmodmap ]; then + /usr/bin/xmodmap $HOME/.Xmodmap +fi diff --git a/tmux.conf b/tmux.conf new file mode 100644 index 0000000..3e2ed79 --- /dev/null +++ b/tmux.conf @@ -0,0 +1,88 @@ +#Bindings +set -g prefix C-a +unbind C-b + +# C-a a should send ctrl-a to the underlying shell (move to start of line) +bind-key a send-prefix + +# C-a C-a +bind-key C-a last-window + +unbind % +# use "v" and "s" to do vertical/horizontal splits, like vim +bind s split-window -v +bind v split-window -h + +# use the vim motion keys to move between panes +bind h select-pane -L +bind j select-pane -D +bind k select-pane -U +bind l select-pane -R + + +bind-key -t vi-copy 'v' begin-selection +bind-key -t vi-copy 'y' copy-selection + +# use vim motion keys while in copy mode +setw -g mode-keys vi +# use the vim resize keys. +# the number at the end is how much the pane will be resized, +# and 1 is fairly small -- you might want to tweak this. +bind - resize-pane -D 1 +bind + resize-pane -U 1 +bind < resize-pane -L 1 +bind > resize-pane -R 1 + + +# Set status bar +set -g status-bg black +set -g status-fg white +set -g status-left '#[fg=green]#H' +set -g status-right '#[fg=yellow]#(uptime | sed -e "s/load average/load/g\;s/ / /g")' # | cut -d "," -f 2-)' +set -g status-right-length 50 + +# Highlight active window +set-window-option -g window-status-current-bg red + +# Set window notifications +setw -g monitor-activity on +set -g visual-activity on + +# Automatically set window title +setw -g automatic-rename on + +# Mouse and panes +setw -g mode-mouse on +set-option -g mouse-select-pane on + + +# Start new-session as default +new-session + +# resize only if actively looking +setw -g aggressive-resize on + +set -g history-limit 100000 + +#Scrolling +set -g terminal-overrides 'xterm*:smcup@:rmcup@' +#set-window-option -g xterm-keys on + +##CLIPBOARD selection integration +##Requires prefix key before the command key +#Copy tmux paste buffer to CLIPBOARD +bind C-c run "tmux show-buffer | xclip -i -selection clipboard" +#Copy CLIPBOARD to tmux paste buffer and paste tmux paste buffer +bind C-v run "tmux set-buffer -- \"$(xclip -o -selection clipboard)\"; tmux paste-buffer" + +# set vi keys +setw -g mode-keys vi +unbind [ +bind Escape copy-mode +unbind p +bind p paste-buffer +bind-key -t vi-copy 'v' begin-selection +bind-key -t vi-copy 'y' copy-selection +unbind C-s +# copy tmux buffer to clipboard +#bind-key Y save-buffer ~/.tmux/buffer \; run-shell "xsel -i -p <~/.tmux/buffer && rm ~/.tmux/buffer" diff --git a/vim/.netrwhist b/vim/.netrwhist new file mode 100644 index 0000000..b869159 --- /dev/null +++ b/vim/.netrwhist @@ -0,0 +1,7 @@ +let g:netrw_dirhistmax =10 +let g:netrw_dirhist_cnt =5 +let g:netrw_dirhist_1='/media/Data/code/web4.0/hookio/hooks/test' +let g:netrw_dirhist_2='/media/Data/code/web4.0/hookio/hooks' +let g:netrw_dirhist_3='/media/Data/code/web4.0/hookio/hooks/test' +let g:netrw_dirhist_4='/media/Data/code/web4.0/hookio/hooks/hook.io-mailer' +let g:netrw_dirhist_5='/home/balkian/.config/google-googletalkplugin' diff --git a/vim/bundle/LaTeX-Box b/vim/bundle/LaTeX-Box new file mode 160000 index 0000000..aa152c4 --- /dev/null +++ b/vim/bundle/LaTeX-Box @@ -0,0 +1 @@ +Subproject commit aa152c49e12e5bacc4add2d3fa34bfa39b58ef5d diff --git a/vim/bundle/SpellCheck b/vim/bundle/SpellCheck new file mode 160000 index 0000000..95d3226 --- /dev/null +++ b/vim/bundle/SpellCheck @@ -0,0 +1 @@ +Subproject commit 95d3226236a0270d095877d588be246e91fd0897 diff --git a/vim/bundle/nerdtree b/vim/bundle/nerdtree new file mode 160000 index 0000000..a1433c4 --- /dev/null +++ b/vim/bundle/nerdtree @@ -0,0 +1 @@ +Subproject commit a1433c485eb254838c1db52e087d5ec4d1e77cfd diff --git a/vim/bundle/snipmate-snippets b/vim/bundle/snipmate-snippets new file mode 160000 index 0000000..b1c30e0 --- /dev/null +++ b/vim/bundle/snipmate-snippets @@ -0,0 +1 @@ +Subproject commit b1c30e017ef5c703e36ca7a79e102507a042b5a5 diff --git a/vim/bundle/taglist.vim b/vim/bundle/taglist.vim new file mode 160000 index 0000000..53041fb --- /dev/null +++ b/vim/bundle/taglist.vim @@ -0,0 +1 @@ +Subproject commit 53041fbc45398a9af631a20657e109707a455339 diff --git a/vim/bundle/tlib_vim b/vim/bundle/tlib_vim new file mode 160000 index 0000000..992c218 --- /dev/null +++ b/vim/bundle/tlib_vim @@ -0,0 +1 @@ +Subproject commit 992c21804d003faffcaec0014a5f61e2ce76f57e diff --git a/vim/bundle/vim-addon-mw-utils b/vim/bundle/vim-addon-mw-utils new file mode 160000 index 0000000..a1b611a --- /dev/null +++ b/vim/bundle/vim-addon-mw-utils @@ -0,0 +1 @@ +Subproject commit a1b611ab22745f8b877d8de4f09985a0ddf3acfd diff --git a/vim/bundle/vim-fugitive b/vim/bundle/vim-fugitive new file mode 160000 index 0000000..31dead6 --- /dev/null +++ b/vim/bundle/vim-fugitive @@ -0,0 +1 @@ +Subproject commit 31dead6d8088dc7073d0e2645517ebc68d6de06b diff --git a/vim/bundle/vim-snipmate b/vim/bundle/vim-snipmate new file mode 160000 index 0000000..220347a --- /dev/null +++ b/vim/bundle/vim-snipmate @@ -0,0 +1 @@ +Subproject commit 220347a0ddfa6ad4365b2f307518d2b33d080411 diff --git a/vim/bundle/vundle b/vim/bundle/vundle new file mode 160000 index 0000000..8e9b933 --- /dev/null +++ b/vim/bundle/vundle @@ -0,0 +1 @@ +Subproject commit 8e9b933ed4a851ef1413bbd03560553c4339fb2f diff --git a/vim/colors/ir_black.vim b/vim/colors/ir_black.vim new file mode 100644 index 0000000..f845a4c --- /dev/null +++ b/vim/colors/ir_black.vim @@ -0,0 +1,213 @@ +" ir_black color scheme +" More at: http://blog.infinitered.com + + +" ******************************************************************************** +" Standard colors used in all ir_black themes: +" Note, x:x:x are RGB values +" +" normal: #f6f3e8 +" +" string: #A8FF60 168:255:96 +" string inner (punc, code, etc): #00A0A0 0:160:160 +" number: #FF73FD 255:115:253 +" comments: #7C7C7C 124:124:124 +" keywords: #96CBFE 150:203:254 +" operators: white +" class: #FFFFB6 255:255:182 +" method declaration name: #FFD2A7 255:210:167 +" regular expression: #E9C062 233:192:98 +" regexp alternate: #FF8000 255:128:0 +" regexp alternate 2: #B18A3D 177:138:61 +" variable: #C6C5FE 198:197:254 +" +" Misc colors: +" red color (used for whatever): #FF6C60 255:108:96 +" light red: #FFB6B0 255:182:176 +" +" brown: #E18964 good for special +" +" lightpurpleish: #FFCCFF +" +" Interface colors: +" background color: black +" cursor (where underscore is used): #FFA560 255:165:96 +" cursor (where block is used): white +" visual selection: #1D1E2C +" current line: #151515 21:21:21 +" search selection: #07281C 7:40:28 +" line number: #3D3D3D 61:61:61 + + +" ******************************************************************************** +" The following are the preferred 16 colors for your terminal +" Colors Bright Colors +" Black #4E4E4E #7C7C7C +" Red #FF6C60 #FFB6B0 +" Green #A8FF60 #CEFFAB +" Yellow #FFFFB6 #FFFFCB +" Blue #96CBFE #B5DCFE +" Magenta #FF73FD #FF9CFE +" Cyan #C6C5FE #DFDFFE +" White #EEEEEE #FFFFFF + + +" ******************************************************************************** +set background=dark +hi clear + +if exists("syntax_on") + syntax reset +endif + +let colors_name = "ir_black" + + +"hi Example guifg=NONE guibg=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE + +" General colors +hi Normal guifg=#f6f3e8 guibg=black gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE +hi NonText guifg=#070707 guibg=black gui=NONE ctermfg=black ctermbg=NONE cterm=NONE + +hi Cursor guifg=black guibg=white gui=NONE ctermfg=black ctermbg=white cterm=reverse +hi LineNr guifg=#3D3D3D guibg=black gui=NONE ctermfg=darkgray ctermbg=NONE cterm=NONE + +hi VertSplit guifg=#202020 guibg=#202020 gui=NONE ctermfg=darkgray ctermbg=darkgray cterm=NONE +hi StatusLine guifg=#CCCCCC guibg=#202020 gui=italic ctermfg=white ctermbg=darkgray cterm=NONE +hi StatusLineNC guifg=black guibg=#202020 gui=NONE ctermfg=blue ctermbg=darkgray cterm=NONE + +hi Folded guifg=#a0a8b0 guibg=#384048 gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE +hi Title guifg=#f6f3e8 guibg=NONE gui=bold ctermfg=NONE ctermbg=NONE cterm=NONE +hi Visual guifg=NONE guibg=#262D51 gui=NONE ctermfg=NONE ctermbg=NONE cterm=REVERSE + +hi SpecialKey guifg=#808080 guibg=#343434 gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE + +hi WildMenu guifg=green guibg=yellow gui=NONE ctermfg=black ctermbg=yellow cterm=NONE +hi PmenuSbar guifg=black guibg=white gui=NONE ctermfg=black ctermbg=white cterm=NONE +"hi Ignore guifg=gray guibg=black gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE + +hi Error guifg=NONE guibg=NONE gui=undercurl ctermfg=white ctermbg=red cterm=NONE guisp=#FF6C60 " undercurl color +hi ErrorMsg guifg=white guibg=#FF6C60 gui=BOLD ctermfg=white ctermbg=red cterm=NONE +hi WarningMsg guifg=white guibg=#FF6C60 gui=BOLD ctermfg=white ctermbg=red cterm=NONE +hi LongLineWarning guifg=NONE guibg=#371F1C gui=underline ctermfg=NONE ctermbg=NONE cterm=underline + +" Message displayed in lower left, such as --INSERT-- +hi ModeMsg guifg=black guibg=#C6C5FE gui=BOLD ctermfg=black ctermbg=cyan cterm=BOLD + +if version >= 700 " Vim 7.x specific colors + hi CursorLine guifg=NONE guibg=#121212 gui=NONE ctermfg=NONE ctermbg=NONE cterm=BOLD + hi CursorColumn guifg=NONE guibg=#121212 gui=NONE ctermfg=NONE ctermbg=NONE cterm=BOLD + hi MatchParen guifg=#f6f3e8 guibg=#857b6f gui=BOLD ctermfg=white ctermbg=darkgray cterm=NONE + hi Pmenu guifg=#f6f3e8 guibg=#444444 gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE + hi PmenuSel guifg=#000000 guibg=#cae682 gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE + hi Search guifg=NONE guibg=#2F2F00 gui=underline ctermfg=NONE ctermbg=NONE cterm=underline +endif + +" Syntax highlighting +hi Comment guifg=#7C7C7C guibg=NONE gui=NONE ctermfg=darkgray ctermbg=NONE cterm=NONE +hi String guifg=#A8FF60 guibg=NONE gui=NONE ctermfg=green ctermbg=NONE cterm=NONE +hi Number guifg=#FF73FD guibg=NONE gui=NONE ctermfg=magenta ctermbg=NONE cterm=NONE + +hi Keyword guifg=#96CBFE guibg=NONE gui=NONE ctermfg=blue ctermbg=NONE cterm=NONE +hi PreProc guifg=#96CBFE guibg=NONE gui=NONE ctermfg=blue ctermbg=NONE cterm=NONE +hi Conditional guifg=#6699CC guibg=NONE gui=NONE ctermfg=blue ctermbg=NONE cterm=NONE " if else end + +hi Todo guifg=#8f8f8f guibg=NONE gui=NONE ctermfg=red ctermbg=NONE cterm=NONE +hi Constant guifg=#99CC99 guibg=NONE gui=NONE ctermfg=cyan ctermbg=NONE cterm=NONE + +hi Identifier guifg=#C6C5FE guibg=NONE gui=NONE ctermfg=cyan ctermbg=NONE cterm=NONE +hi Function guifg=#FFD2A7 guibg=NONE gui=NONE ctermfg=brown ctermbg=NONE cterm=NONE +hi Type guifg=#FFFFB6 guibg=NONE gui=NONE ctermfg=yellow ctermbg=NONE cterm=NONE +hi Statement guifg=#6699CC guibg=NONE gui=NONE ctermfg=lightblue ctermbg=NONE cterm=NONE + +hi Special guifg=#E18964 guibg=NONE gui=NONE ctermfg=white ctermbg=NONE cterm=NONE +hi Delimiter guifg=#00A0A0 guibg=NONE gui=NONE ctermfg=cyan ctermbg=NONE cterm=NONE +hi Operator guifg=white guibg=NONE gui=NONE ctermfg=white ctermbg=NONE cterm=NONE + +hi link Character Constant +hi link Boolean Constant +hi link Float Number +hi link Repeat Statement +hi link Label Statement +hi link Exception Statement +hi link Include PreProc +hi link Define PreProc +hi link Macro PreProc +hi link PreCondit PreProc +hi link StorageClass Type +hi link Structure Type +hi link Typedef Type +hi link Tag Special +hi link SpecialChar Special +hi link SpecialComment Special +hi link Debug Special + + +" Special for Ruby +hi rubyRegexp guifg=#B18A3D guibg=NONE gui=NONE ctermfg=brown ctermbg=NONE cterm=NONE +hi rubyRegexpDelimiter guifg=#FF8000 guibg=NONE gui=NONE ctermfg=brown ctermbg=NONE cterm=NONE +hi rubyEscape guifg=white guibg=NONE gui=NONE ctermfg=cyan ctermbg=NONE cterm=NONE +hi rubyInterpolationDelimiter guifg=#00A0A0 guibg=NONE gui=NONE ctermfg=blue ctermbg=NONE cterm=NONE +hi rubyControl guifg=#6699CC guibg=NONE gui=NONE ctermfg=blue ctermbg=NONE cterm=NONE "and break, etc +"hi rubyGlobalVariable guifg=#FFCCFF guibg=NONE gui=NONE ctermfg=lightblue ctermbg=NONE cterm=NONE "yield +hi rubyStringDelimiter guifg=#336633 guibg=NONE gui=NONE ctermfg=lightgreen ctermbg=NONE cterm=NONE +"rubyInclude +"rubySharpBang +"rubyAccess +"rubyPredefinedVariable +"rubyBoolean +"rubyClassVariable +"rubyBeginEnd +"rubyRepeatModifier +"hi link rubyArrayDelimiter Special " [ , , ] +"rubyCurlyBlock { , , } + +hi link rubyClass Keyword +hi link rubyModule Keyword +hi link rubyKeyword Keyword +hi link rubyOperator Operator +hi link rubyIdentifier Identifier +hi link rubyInstanceVariable Identifier +hi link rubyGlobalVariable Identifier +hi link rubyClassVariable Identifier +hi link rubyConstant Type + + +" Special for Java +" hi link javaClassDecl Type +hi link javaScopeDecl Identifier +hi link javaCommentTitle javaDocSeeTag +hi link javaDocTags javaDocSeeTag +hi link javaDocParam javaDocSeeTag +hi link javaDocSeeTagParam javaDocSeeTag + +hi javaDocSeeTag guifg=#CCCCCC guibg=NONE gui=NONE ctermfg=darkgray ctermbg=NONE cterm=NONE +hi javaDocSeeTag guifg=#CCCCCC guibg=NONE gui=NONE ctermfg=darkgray ctermbg=NONE cterm=NONE +"hi javaClassDecl guifg=#CCFFCC guibg=NONE gui=NONE ctermfg=white ctermbg=NONE cterm=NONE + + +" Special for XML +hi link xmlTag Keyword +hi link xmlTagName Conditional +hi link xmlEndTag Identifier + + +" Special for HTML +hi link htmlTag Keyword +hi link htmlTagName Conditional +hi link htmlEndTag Identifier + + +" Special for Javascript +hi link javaScriptNumber Number + + +" Special for Python +"hi link pythonEscape Keyword + + +" Special for CSharp +hi link csXmlTag Keyword + + +" Special for PHP diff --git a/vim/colors/matrix.vim b/vim/colors/matrix.vim new file mode 100644 index 0000000..da5c687 --- /dev/null +++ b/vim/colors/matrix.vim @@ -0,0 +1,80 @@ +" vim:set ts=8 sts=2 sw=2 tw=0: +" +" matrix.vim - MATRIX like colorscheme. +" +" Maintainer: MURAOKA Taro +" Last Change: 10-Jun-2003. + +set background=dark +hi clear +if exists("syntax_on") + syntax reset +endif +let g:colors_name = 'matrix' + +" the character under the cursor +hi Cursor guifg=#226622 guibg=#55ff55 +hi lCursor guifg=#226622 guibg=#55ff55 +" like Cursor, but used when in IME mode |CursorIM| +hi CursorIM guifg=#226622 guibg=#55ff55 +" directory names (and other special names in listings) +hi Directory guifg=#55ff55 guibg=#000000 +" diff mode: Added line |diff.txt| +hi DiffAdd guifg=#55ff55 guibg=#226622 gui=none +" diff mode: Changed line |diff.txt| +hi DiffChange guifg=#55ff55 guibg=#226622 gui=none +" diff mode: Deleted line |diff.txt| +hi DiffDelete guifg=#113311 guibg=#113311 gui=none +" diff mode: Changed text within a changed line |diff.txt| +hi DiffText guifg=#55ff55 guibg=#339933 gui=bold +" error messages on the command line +hi ErrorMsg guifg=#55ff55 guibg=#339933 +" the column separating vertically split windows +hi VertSplit guifg=#339933 guibg=#339933 +" line used for closed folds +hi Folded guifg=#44cc44 guibg=#113311 +" 'foldcolumn' +hi FoldColumn guifg=#44cc44 guibg=#226622 +" 'incsearch' highlighting; also used for the text replaced with +hi IncSearch guifg=#226622 guibg=#55ff55 gui=none +" line number for ":number" and ":#" commands, and when 'number' +hi LineNr guifg=#44cc44 guibg=#000000 +" 'showmode' message (e.g., "-- INSERT --") +hi ModeMsg guifg=#44cc44 guibg=#000000 +" |more-prompt| +hi MoreMsg guifg=#44cc44 guibg=#000000 +" '~' and '@' at the end of the window, characters from +hi NonText guifg=#44cc44 guibg=#113311 +" normal text +hi Normal guifg=#44cc44 guibg=#000000 +" |hit-enter| prompt and yes/no questions +hi Question guifg=#44cc44 guibg=#000000 +" Last search pattern highlighting (see 'hlsearch'). +hi Search guifg=#113311 guibg=#44cc44 gui=none +" Meta and special keys listed with ":map", also for text used +hi SpecialKey guifg=#44cc44 guibg=#000000 +" status line of current window +hi StatusLine guifg=#55ff55 guibg=#339933 gui=none +" status lines of not-current windows +hi StatusLineNC guifg=#113311 guibg=#339933 gui=none +" titles for output from ":set all", ":autocmd" etc. +hi Title guifg=#55ff55 guibg=#113311 gui=bold +" Visual mode selection +hi Visual guifg=#55ff55 guibg=#339933 gui=none +" Visual mode selection when vim is "Not Owning the Selection". +hi VisualNOS guifg=#44cc44 guibg=#000000 +" warning messages +hi WarningMsg guifg=#55ff55 guibg=#000000 +" current match in 'wildmenu' completion +hi WildMenu guifg=#226622 guibg=#55ff55 + +hi Comment guifg=#226622 guibg=#000000 +hi Constant guifg=#55ff55 guibg=#226622 +hi Special guifg=#44cc44 guibg=#226622 +hi Identifier guifg=#55ff55 guibg=#000000 +hi Statement guifg=#55ff55 guibg=#000000 gui=bold +hi PreProc guifg=#339933 guibg=#000000 +hi Type guifg=#55ff55 guibg=#000000 gui=bold +hi Underlined guifg=#55ff55 guibg=#000000 gui=underline +hi Error guifg=#55ff55 guibg=#339933 +hi Todo guifg=#113311 guibg=#44cc44 gui=none diff --git a/vim/colors/reloaded.vim b/vim/colors/reloaded.vim new file mode 100644 index 0000000..5d111b2 --- /dev/null +++ b/vim/colors/reloaded.vim @@ -0,0 +1,70 @@ +" Vim color file +" Maintainer: connorberry@yahoo.com +" Last Change: +" URL: www.narwhale.org + +set background=dark "or light +hi clear +if exists("syntax_on") + syntax reset +endif +let g:colors_name="reloaded" + + hi Normal ctermfg=Green ctermbg=Black + hi Normal guifg=Green guibg=Black + hi NonText ctermfg=DarkGreen ctermbg=Black + hi NonText guifg=DarkGreen guibg=Black + + hi Statement ctermfg=Green ctermbg=Black + hi Statement guifg=Green guibg=Black + hi Comment ctermfg=DarkGreen ctermbg=Black cterm=bold term=bold + hi Comment guifg=DarkGreen guibg=Black gui=bold term=bold + hi Constant ctermfg=Green ctermbg=DarkGreen + hi Constant guifg=Green guibg=DarkGreen + hi Identifier ctermfg=Green ctermbg=Black + hi Identifier guifg=Green guibg=Black + hi Type ctermfg=Green ctermbg=Black + hi Type guifg=Green guibg=Black + hi String ctermfg=Green ctermbg=DarkGreen + hi String guifg=Green guibg=DarkGreen + hi Boolean ctermfg=Green ctermbg=DarkGreen + hi Boolean guifg=Green guibg=DarkGreen + hi Number ctermfg=Green ctermbg=DarkGreen + hi Number guifg=Green guibg=DarkGreen + hi Folded ctermfg=DarkYellow ctermbg=Black cterm=underline term=none + hi Folded guifg=DarkYellow guibg=Black gui=underline term=none + hi Special ctermfg=Black ctermbg=DarkGreen + hi Special guifg=Black guibg=DarkGreen + hi PreProc ctermfg=DarkGreen ctermbg=Black cterm=bold term=bold + hi PreProc guifg=DarkGreen guibg=Black gui=bold term=bold + hi Scrollbar ctermfg=DarkYellow ctermbg=Black + hi Scrollbar guifg=DarkYellow guibg=Black + hi Cursor ctermfg=Black ctermbg=Green + hi Cursor guifg=Black guibg=Green + hi ErrorMsg ctermfg=Red ctermbg=Black cterm=bold term=bold + hi ErrorMsg guifg=Red guibg=Black gui=bold term=bold + hi WarningMsg ctermfg=Yellow ctermbg=Black + hi WarningMsg guifg=Yellow guibg=Black + hi VertSplit ctermfg=White ctermbg=Black + hi VertSplit guifg=White guibg=Black + hi Directory ctermfg=DarkGreen ctermbg=Black + hi Directory guifg=DarkGreen guibg=Black + hi Visual ctermfg=White ctermbg=DarkGray cterm=underline term=none + hi Visual guifg=White guibg=DarkGray gui=underline term=none + hi Title ctermfg=White ctermbg=DarkBlue + hi Title guifg=White guibg=DarkBlue + + hi StatusLine term=bold cterm=bold,underline ctermfg=Green ctermbg=Black + hi StatusLine term=bold gui=bold,underline guifg=Green guibg=Black + hi StatusLineNC term=bold cterm=bold,underline ctermfg=Gray ctermbg=Black + hi StatusLineNC term=bold gui=bold,underline guifg=Gray guibg=Black + hi LineNr term=bold cterm=bold ctermfg=Black ctermbg=DarkGreen + hi LineNr term=bold gui=bold guifg=Black guibg=DarkGreen + hi SpecialKey guifg=DarkGreen guibg=Black + hi SpecialKey ctermfg=DarkGreen ctermbg=Black + + hi cursorline guifg=Black guibg=DarkGreen + hi cursorline ctermfg=Black ctermbg=DarkGreen + hi cursorcolumn guifg=Black guibg=Green + hi cursorcolumn ctermfg=Black ctermbg=Green + diff --git a/vim/colors/revolutions.vim b/vim/colors/revolutions.vim new file mode 100644 index 0000000..15450c9 --- /dev/null +++ b/vim/colors/revolutions.vim @@ -0,0 +1,75 @@ +" MATRIX-REVOLUTIONS colorscheme +" Author: Christian MICHON +" Version: 1.0 +" Last Change: 23 Jun 2004 + +set background=dark +hi clear +if exists("syntax_on") + syntax reset +endif + +let g:colors_name = 'revolutions' + +hi Boolean guifg=#e6fff3 guibg=#43705a gui=none +hi Character guifg=#e6fff3 guibg=#43705a gui=none +hi Comment guifg=#43705a guibg=#000000 gui=underline +hi Conditional guifg=#e6fff3 guibg=#000000 gui=bold +hi Constant guifg=#e6fff3 guibg=#43705a gui=none +hi Cursor guifg=#43705a guibg=#e6fff3 gui=none +hi Debug guifg=#61a181 guibg=#000000 gui=none +hi Define guifg=#e6fff3 guibg=#000000 gui=none +hi Delimiter guifg=#61a181 guibg=#000000 gui=none +hi DiffAdd guifg=#e6fff3 guibg=#43705a gui=bold +hi DiffChange guifg=#e6fff3 guibg=#43705a gui=none +hi DiffDelete guifg=#e6fff3 guibg=#43705a gui=none +hi DiffText guifg=#000000 guibg=#e6fff3 gui=bold +hi Directory guifg=#e6fff3 guibg=#000000 gui=none +hi Error guifg=#e6fff3 guibg=#61a181 gui=bold +hi ErrorMsg guifg=#e6fff3 guibg=#61a181 gui=bold +hi Exception guifg=#e6fff3 guibg=#000000 gui=bold +hi Float guifg=#e6fff3 guibg=#43705a gui=none +hi FoldColumn guifg=#9bcfb5 guibg=#43705a gui=bold +hi Folded guifg=#9bcfb5 guibg=#43705a gui=bold +hi Function guifg=#e6fff3 guibg=#000000 gui=none +hi Identifier guifg=#e6fff3 guibg=#000000 gui=none +hi Ignore guifg=#000000 guibg=#000000 gui=none +hi Include guifg=#e6fff3 guibg=#000000 gui=none +hi IncSearch guifg=#1d3026 guibg=#61a181 gui=bold +hi Keyword guifg=#e6fff3 guibg=#000000 gui=bold +hi Label guifg=#e6fff3 guibg=#000000 gui=bold +hi lCursor guifg=#43705a guibg=#e6fff3 gui=none +hi LineNr guifg=#9bcfb5 guibg=#000000 gui=bold +hi Macro guifg=#e6fff3 guibg=#000000 gui=none +hi ModeMsg guifg=#9bcfb5 guibg=#000000 gui=bold +hi MoreMsg guifg=#9bcfb5 guibg=#000000 gui=bold +hi NonText guifg=#9bcfb5 guibg=#1d3026 gui=bold +hi Normal guifg=#9bcfb5 guibg=#000000 gui=none +hi Number guifg=#e6fff3 guibg=#000000 gui=none +hi Operator guifg=#e6fff3 guibg=#000000 gui=bold +hi PreCondit guifg=#e6fff3 guibg=#000000 gui=none +hi PreProc guifg=#61a181 guibg=#000000 gui=none +hi Question guifg=#9bcfb5 guibg=#000000 gui=bold +hi Repeat guifg=#e6fff3 guibg=#000000 gui=bold +hi Search guifg=#1d3026 guibg=#61a181 gui=bold +hi Special guifg=#61a181 guibg=#000000 gui=none +hi SpecialChar guifg=#61a181 guibg=#000000 gui=none +hi SpecialComment guifg=#61a181 guibg=#000000 gui=none +hi SpecialKey guifg=#9bcfb5 guibg=#000000 gui=none +hi Statement guifg=#e6fff3 guibg=#000000 gui=bold +hi StatusLine guifg=#e6fff3 guibg=#61a181 gui=bold +hi StatusLineNC guifg=#1d3026 guibg=#61a181 gui=bold +hi StorageClass guifg=#f070a0 guibg=#000000 gui=bold +hi String guifg=#e6fff3 guibg=#000000 gui=none +hi Structure guifg=#f070a0 guibg=#000000 gui=bold +hi Tag guifg=#61a181 guibg=#000000 gui=none +hi Title guifg=#e6fff3 guibg=#1d3026 gui=bold +hi Todo guifg=#1d3026 guibg=#9bcfb5 gui=none +hi Type guifg=#e6fff3 guibg=#000000 gui=bold +hi Typedef guifg=#f070a0 guibg=#000000 gui=bold +hi Underlined guifg=#e6fff3 guibg=#000000 gui=underline +hi VertSplit guifg=#61a181 guibg=#61a181 gui=none +hi Visual guifg=#e6fff3 guibg=#61a181 gui=none +hi VisualNOS guifg=#9bcfb5 guibg=#000000 gui=underline +hi WarningMsg guifg=#1d3026 guibg=#61a181 gui=bold +hi WildMenu guifg=#43705a guibg=#e6fff3 gui=none diff --git a/vim/colors/solarized.vim b/vim/colors/solarized.vim new file mode 100644 index 0000000..70f5223 --- /dev/null +++ b/vim/colors/solarized.vim @@ -0,0 +1,1117 @@ +" Name: Solarized vim colorscheme +" Author: Ethan Schoonover +" URL: http://ethanschoonover.com/solarized +" (see this url for latest release & screenshots) +" License: OSI approved MIT license (see end of this file) +" Created: In the middle of the night +" Modified: 2011 May 05 +" +" Usage "{{{ +" +" --------------------------------------------------------------------- +" ABOUT: +" --------------------------------------------------------------------- +" Solarized is a carefully designed selective contrast colorscheme with dual +" light and dark modes that runs in both GUI, 256 and 16 color modes. +" +" See the homepage above for screenshots and details. +" +" --------------------------------------------------------------------- +" OPTIONS: +" --------------------------------------------------------------------- +" See the "solarized.txt" help file included with this colorscheme (in the +" "doc" subdirectory) for information on options, usage, the Toggle Background +" function and more. If you have already installed Solarized, this is available +" from the Solarized menu and command line as ":help solarized" +" +" --------------------------------------------------------------------- +" INSTALLATION: +" --------------------------------------------------------------------- +" Two options for installation: manual or pathogen +" +" MANUAL INSTALLATION OPTION: +" --------------------------------------------------------------------- +" +" 1. Download the solarized distribution (available on the homepage above) +" and unarchive the file. +" 2. Move `solarized.vim` to your `.vim/colors` directory. +" 3. Move each of the files in each subdirectories to the corresponding .vim +" subdirectory (e.g. autoload/togglebg.vim goes into your .vim/autoload +" directory as .vim/autoload/togglebg.vim). +" +" RECOMMENDED PATHOGEN INSTALLATION OPTION: +" --------------------------------------------------------------------- +" +" 1. Download and install Tim Pope's Pathogen from: +" https://github.com/tpope/vim-pathogen +" +" 2. Next, move or clone the `vim-colors-solarized` directory so that it is +" a subdirectory of the `.vim/bundle` directory. +" +" a. **clone with git:** +" +" $ cd ~/.vim/bundle +" $ git clone git://github.com/altercation/vim-colors-solarized.git +" +" b. **or move manually into the pathogen bundle directory:** +" In the parent directory of vim-colors-solarized: +" +" $ mv vim-colors-solarized ~/.vim/bundle/ +" +" MODIFY VIMRC: +" +" After either Option 1 or Option 2 above, put the following two lines in your +" .vimrc: +" +" syntax enable +" set background=dark +" colorscheme solarized +" +" or, for the light background mode of Solarized: +" +" syntax enable +" set background=light +" colorscheme solarized +" +" I like to have a different background in GUI and terminal modes, so I can use +" the following if-then. However, I find vim's background autodetection to be +" pretty good and, at least with MacVim, I can leave this background value +" assignment out entirely and get the same results. +" +" if has('gui_running') +" set background=light +" else +" set background=dark +" endif +" +" See the Solarized homepage at http://ethanschoonover.com/solarized for +" screenshots which will help you select either the light or dark background. +" +" --------------------------------------------------------------------- +" COLOR VALUES +" --------------------------------------------------------------------- +" Download palettes and files from: http://ethanschoonover.com/solarized +" +" L\*a\*b values are canonical (White D65, Reference D50), other values are +" matched in sRGB space. +" +" SOLARIZED HEX 16/8 TERMCOL XTERM/HEX L*A*B sRGB HSB +" --------- ------- ---- ------- ----------- ---------- ----------- ----------- +" base03 #002b36 8/4 brblack 234 #1c1c1c 15 -12 -12 0 43 54 193 100 21 +" base02 #073642 0/4 black 235 #262626 20 -12 -12 7 54 66 192 90 26 +" base01 #586e75 10/7 brgreen 240 #4e4e4e 45 -07 -07 88 110 117 194 25 46 +" base00 #657b83 11/7 bryellow 241 #585858 50 -07 -07 101 123 131 195 23 51 +" base0 #839496 12/6 brblue 244 #808080 60 -06 -03 131 148 150 186 13 59 +" base1 #93a1a1 14/4 brcyan 245 #8a8a8a 65 -05 -02 147 161 161 180 9 63 +" base2 #eee8d5 7/7 white 254 #d7d7af 92 -00 10 238 232 213 44 11 93 +" base3 #fdf6e3 15/7 brwhite 230 #ffffd7 97 00 10 253 246 227 44 10 99 +" yellow #b58900 3/3 yellow 136 #af8700 60 10 65 181 137 0 45 100 71 +" orange #cb4b16 9/3 brred 166 #d75f00 50 50 55 203 75 22 18 89 80 +" red #dc322f 1/1 red 160 #d70000 50 65 45 220 50 47 1 79 86 +" magenta #d33682 5/5 magenta 125 #af005f 50 65 -05 211 54 130 331 74 83 +" violet #6c71c4 13/5 brmagenta 61 #5f5faf 50 15 -45 108 113 196 237 45 77 +" blue #268bd2 4/4 blue 33 #0087ff 55 -10 -45 38 139 210 205 82 82 +" cyan #2aa198 6/6 cyan 37 #00afaf 60 -35 -05 42 161 152 175 74 63 +" green #859900 2/2 green 64 #5f8700 60 -20 65 133 153 0 68 100 60 +" +" --------------------------------------------------------------------- +" COLORSCHEME HACKING +" --------------------------------------------------------------------- +" +" Useful commands for testing colorschemes: +" :source $VIMRUNTIME/syntax/hitest.vim +" :help highlight-groups +" :help cterm-colors +" :help group-name +" +" Useful links for developing colorschemes: +" http://www.vim.org/scripts/script.php?script_id=2937 +" http://vimcasts.org/episodes/creating-colorschemes-for-vim/ +" http://www.frexx.de/xterm-256-notes/" +" +" }}} +" Environment Specific Overrides "{{{ +" Allow or disallow certain features based on current terminal emulator or +" environment. + +" Terminals that support italics +let s:terms_italic=[ + \"rxvt", + \"gnome-terminal" + \] +" For reference only, terminals are known to be incomptible. +" Terminals that are in neither list need to be tested. +let s:terms_noitalic=[ + \"iTerm.app", + \"Apple_Terminal" + \] +if has("gui_running") + let s:terminal_italic=1 " TODO: could refactor to not require this at all +else + let s:terminal_italic=0 " terminals will be guilty until proven compatible + for term in s:terms_italic + if $TERM_PROGRAM =~ term + let s:terminal_italic=1 + endif + endfor +endif + +" }}} +" Default option values"{{{ +" --------------------------------------------------------------------- +" s:options_list is used to autogenerate a list of all non-default options +" using "call SolarizedOptions()" or with the "Generate .vimrc commands" +" Solarized menu option. See the "Menus" section below for the function itself. +let s:options_list=[ + \'" this block of commands has been autogenerated by solarized.vim and', + \'" includes the current, non-default Solarized option values.', + \'" To use, place these commands in your .vimrc file (replacing any', + \'" existing colorscheme commands). See also ":help solarized"', + \'', + \'" ------------------------------------------------------------------', + \'" Solarized Colorscheme Config', + \'" ------------------------------------------------------------------', + \] +let s:colorscheme_list=[ + \'syntax enable', + \'set background='.&background, + \'colorscheme solarized', + \] +let s:defaults_list=[ + \'" ------------------------------------------------------------------', + \'', + \'" The following items are available options, but do not need to be', + \'" included in your .vimrc as they are currently set to their defaults.', + \'' + \] +let s:lazycat_list=[ + \'" lazy method of appending this onto your .vimrc ":w! >> ~/.vimrc"', + \'" ------------------------------------------------------------------', + \] + +function! s:SetOption(name,default) + if type(a:default) == type(0) + let l:wrap='' + let l:ewrap='' + else + let l:wrap='"' + let l:ewrap='\"' + endif + if !exists("g:solarized_".a:name) || g:solarized_{a:name}==a:default + exe 'let g:solarized_'.a:name.'='.l:wrap.a:default.l:wrap.'"' + exe 'call add(s:defaults_list, "\" let g:solarized_'.a:name.'='.l:ewrap.g:solarized_{a:name}.l:ewrap.'")' + else + exe 'call add(s:options_list, "let g:solarized_'.a:name.'='.l:ewrap.g:solarized_{a:name}.l:ewrap.' \"default value is '.a:default.'")' + endif +endfunction + +if ($TERM_PROGRAM ==? "apple_terminal" && &t_Co < 256) + let s:solarized_termtrans_default = 1 +else + let s:solarized_termtrans_default = 0 +endif +call s:SetOption("termtrans",s:solarized_termtrans_default) +call s:SetOption("degrade",0) +call s:SetOption("bold",1) +call s:SetOption("underline",1) +call s:SetOption("italic",1) " note that we need to override this later if the terminal doesn't support +call s:SetOption("termcolors",16) +call s:SetOption("contrast","normal") +call s:SetOption("visibility","normal") +call s:SetOption("diffmode","normal") +call s:SetOption("hitrail",0) +call s:SetOption("menu",1) + +"}}} +" Colorscheme initialization "{{{ +" --------------------------------------------------------------------- +hi clear +if exists("syntax_on") + syntax reset +endif +let colors_name = "solarized" + +"}}} +" GUI & CSApprox hexadecimal palettes"{{{ +" --------------------------------------------------------------------- +" +" Set both gui and terminal color values in separate conditional statements +" Due to possibility that CSApprox is running (though I suppose we could just +" leave the hex values out entirely in that case and include only cterm colors) +" We also check to see if user has set solarized (force use of the +" neutral gray monotone palette component) +if (has("gui_running") && g:solarized_degrade == 0) + let s:vmode = "gui" + let s:base03 = "#002b36" + let s:base02 = "#073642" + let s:base01 = "#586e75" + let s:base00 = "#657b83" + let s:base0 = "#839496" + let s:base1 = "#93a1a1" + let s:base2 = "#eee8d5" + let s:base3 = "#fdf6e3" + let s:yellow = "#b58900" + let s:orange = "#cb4b16" + let s:red = "#dc322f" + let s:magenta = "#d33682" + let s:violet = "#6c71c4" + let s:blue = "#268bd2" + let s:cyan = "#2aa198" + "let s:green = "#859900" "original + let s:green = "#719e07" "experimental +elseif (has("gui_running") && g:solarized_degrade == 1) + " These colors are identical to the 256 color mode. They may be viewed + " while in gui mode via "let g:solarized_degrade=1", though this is not + " recommened and is for testing only. + let s:vmode = "gui" + let s:base03 = "#1c1c1c" + let s:base02 = "#262626" + let s:base01 = "#4e4e4e" + let s:base00 = "#585858" + let s:base0 = "#808080" + let s:base1 = "#8a8a8a" + let s:base2 = "#d7d7af" + let s:base3 = "#ffffd7" + let s:yellow = "#af8700" + let s:orange = "#d75f00" + let s:red = "#af0000" + let s:magenta = "#af005f" + let s:violet = "#5f5faf" + let s:blue = "#0087ff" + let s:cyan = "#00afaf" + let s:green = "#5f8700" +elseif g:solarized_termcolors != 256 && &t_Co >= 16 + let s:vmode = "cterm" + let s:base03 = "8" + let s:base02 = "0" + let s:base01 = "10" + let s:base00 = "11" + let s:base0 = "12" + let s:base1 = "14" + let s:base2 = "7" + let s:base3 = "15" + let s:yellow = "3" + let s:orange = "9" + let s:red = "1" + let s:magenta = "5" + let s:violet = "13" + let s:blue = "4" + let s:cyan = "6" + let s:green = "2" +elseif g:solarized_termcolors == 256 + let s:vmode = "cterm" + let s:base03 = "234" + let s:base02 = "235" + let s:base01 = "239" + let s:base00 = "240" + let s:base0 = "244" + let s:base1 = "245" + let s:base2 = "187" + let s:base3 = "230" + let s:yellow = "136" + let s:orange = "166" + let s:red = "124" + let s:magenta = "125" + let s:violet = "61" + let s:blue = "33" + let s:cyan = "37" + let s:green = "64" +else + let s:vmode = "cterm" + let s:bright = "* term=bold cterm=bold" +" let s:base03 = "0".s:bright +" let s:base02 = "0" +" let s:base01 = "2".s:bright +" let s:base00 = "3".s:bright +" let s:base0 = "4".s:bright +" let s:base1 = "6".s:bright +" let s:base2 = "7" +" let s:base3 = "7".s:bright +" let s:yellow = "3" +" let s:orange = "1".s:bright +" let s:red = "1" +" let s:magenta = "5" +" let s:violet = "5".s:bright +" let s:blue = "4" +" let s:cyan = "6" +" let s:green = "2" + let s:base03 = "DarkGray" " 0* + let s:base02 = "Black" " 0 + let s:base01 = "LightGreen" " 2* + let s:base00 = "LightYellow" " 3* + let s:base0 = "LightBlue" " 4* + let s:base1 = "LightCyan" " 6* + let s:base2 = "LightGray" " 7 + let s:base3 = "White" " 7* + let s:yellow = "DarkYellow" " 3 + let s:orange = "LightRed" " 1* + let s:red = "DarkRed" " 1 + let s:magenta = "DarkMagenta" " 5 + let s:violet = "LightMagenta" " 5* + let s:blue = "DarkBlue" " 4 + let s:cyan = "DarkCyan" " 6 + let s:green = "DarkGreen" " 2 + +endif +"}}} +" Formatting options and null values for passthrough effect "{{{ +" --------------------------------------------------------------------- + let s:none = "NONE" + let s:none = "NONE" + let s:t_none = "NONE" + let s:n = "NONE" + let s:c = ",undercurl" + let s:r = ",reverse" + let s:s = ",standout" + let s:ou = "" + let s:ob = "" +"}}} +" Background value based on termtrans setting "{{{ +" --------------------------------------------------------------------- +if (has("gui_running") || g:solarized_termtrans == 0) + let s:back = s:base03 +else + let s:back = "NONE" +endif +"}}} +" Alternate light scheme "{{{ +" --------------------------------------------------------------------- +if &background == "light" + let s:temp03 = s:base03 + let s:temp02 = s:base02 + let s:temp01 = s:base01 + let s:temp00 = s:base00 + let s:base03 = s:base3 + let s:base02 = s:base2 + let s:base01 = s:base1 + let s:base00 = s:base0 + let s:base0 = s:temp00 + let s:base1 = s:temp01 + let s:base2 = s:temp02 + let s:base3 = s:temp03 + if (s:back != "NONE") + let s:back = s:base03 + endif +endif +"}}} +" Optional contrast schemes "{{{ +" --------------------------------------------------------------------- +if g:solarized_contrast == "high" + let s:base01 = s:base00 + let s:base00 = s:base0 + let s:base0 = s:base1 + let s:base1 = s:base2 + let s:base2 = s:base3 + let s:back = s:back +endif +if g:solarized_contrast == "low" + let s:back = s:base02 + let s:ou = ",underline" +endif +"}}} +" Overrides dependent on user specified values and environment "{{{ +" --------------------------------------------------------------------- +if (g:solarized_bold == 0 || &t_Co == 8 ) + let s:b = "" + let s:bb = ",bold" +else + let s:b = ",bold" + let s:bb = "" +endif + +if g:solarized_underline == 0 + let s:u = "" +else + let s:u = ",underline" +endif + +if g:solarized_italic == 0 || s:terminal_italic == 0 + let s:i = "" +else + let s:i = ",italic" +endif +"}}} +" Highlighting primitives"{{{ +" --------------------------------------------------------------------- + +exe "let s:bg_none = ' ".s:vmode."bg=".s:none ."'" +exe "let s:bg_back = ' ".s:vmode."bg=".s:back ."'" +exe "let s:bg_base03 = ' ".s:vmode."bg=".s:base03 ."'" +exe "let s:bg_base02 = ' ".s:vmode."bg=".s:base02 ."'" +exe "let s:bg_base01 = ' ".s:vmode."bg=".s:base01 ."'" +exe "let s:bg_base00 = ' ".s:vmode."bg=".s:base00 ."'" +exe "let s:bg_base0 = ' ".s:vmode."bg=".s:base0 ."'" +exe "let s:bg_base1 = ' ".s:vmode."bg=".s:base1 ."'" +exe "let s:bg_base2 = ' ".s:vmode."bg=".s:base2 ."'" +exe "let s:bg_base3 = ' ".s:vmode."bg=".s:base3 ."'" +exe "let s:bg_green = ' ".s:vmode."bg=".s:green ."'" +exe "let s:bg_yellow = ' ".s:vmode."bg=".s:yellow ."'" +exe "let s:bg_orange = ' ".s:vmode."bg=".s:orange ."'" +exe "let s:bg_red = ' ".s:vmode."bg=".s:red ."'" +exe "let s:bg_magenta = ' ".s:vmode."bg=".s:magenta."'" +exe "let s:bg_violet = ' ".s:vmode."bg=".s:violet ."'" +exe "let s:bg_blue = ' ".s:vmode."bg=".s:blue ."'" +exe "let s:bg_cyan = ' ".s:vmode."bg=".s:cyan ."'" + +exe "let s:fg_none = ' ".s:vmode."fg=".s:none ."'" +exe "let s:fg_back = ' ".s:vmode."fg=".s:back ."'" +exe "let s:fg_base03 = ' ".s:vmode."fg=".s:base03 ."'" +exe "let s:fg_base02 = ' ".s:vmode."fg=".s:base02 ."'" +exe "let s:fg_base01 = ' ".s:vmode."fg=".s:base01 ."'" +exe "let s:fg_base00 = ' ".s:vmode."fg=".s:base00 ."'" +exe "let s:fg_base0 = ' ".s:vmode."fg=".s:base0 ."'" +exe "let s:fg_base1 = ' ".s:vmode."fg=".s:base1 ."'" +exe "let s:fg_base2 = ' ".s:vmode."fg=".s:base2 ."'" +exe "let s:fg_base3 = ' ".s:vmode."fg=".s:base3 ."'" +exe "let s:fg_green = ' ".s:vmode."fg=".s:green ."'" +exe "let s:fg_yellow = ' ".s:vmode."fg=".s:yellow ."'" +exe "let s:fg_orange = ' ".s:vmode."fg=".s:orange ."'" +exe "let s:fg_red = ' ".s:vmode."fg=".s:red ."'" +exe "let s:fg_magenta = ' ".s:vmode."fg=".s:magenta."'" +exe "let s:fg_violet = ' ".s:vmode."fg=".s:violet ."'" +exe "let s:fg_blue = ' ".s:vmode."fg=".s:blue ."'" +exe "let s:fg_cyan = ' ".s:vmode."fg=".s:cyan ."'" + +exe "let s:fmt_none = ' ".s:vmode."=NONE". " term=NONE". "'" +exe "let s:fmt_bold = ' ".s:vmode."=NONE".s:b. " term=NONE".s:b."'" +exe "let s:fmt_bldi = ' ".s:vmode."=NONE".s:b. " term=NONE".s:b."'" +exe "let s:fmt_undr = ' ".s:vmode."=NONE".s:u. " term=NONE".s:u."'" +exe "let s:fmt_undb = ' ".s:vmode."=NONE".s:u.s:b. " term=NONE".s:u.s:b."'" +exe "let s:fmt_undi = ' ".s:vmode."=NONE".s:u. " term=NONE".s:u."'" +exe "let s:fmt_uopt = ' ".s:vmode."=NONE".s:ou. " term=NONE".s:ou."'" +exe "let s:fmt_curl = ' ".s:vmode."=NONE".s:c. " term=NONE".s:c."'" +exe "let s:fmt_ital = ' ".s:vmode."=NONE".s:i. " term=NONE".s:i."'" +exe "let s:fmt_stnd = ' ".s:vmode."=NONE".s:s. " term=NONE".s:s."'" +exe "let s:fmt_revr = ' ".s:vmode."=NONE".s:r. " term=NONE".s:r."'" +exe "let s:fmt_revb = ' ".s:vmode."=NONE".s:r.s:b. " term=NONE".s:r.s:b."'" +" revbb (reverse bold for bright colors) is only set to actual bold in low +" color terminals (t_co=8, such as OS X Terminal.app) and should only be used +" with colors 8-15. +exe "let s:fmt_revbb = ' ".s:vmode."=NONE".s:r.s:bb. " term=NONE".s:r.s:bb."'" +exe "let s:fmt_revbbu = ' ".s:vmode."=NONE".s:r.s:bb.s:u." term=NONE".s:r.s:bb.s:u."'" + +if has("gui_running") + exe "let s:sp_none = ' guisp=".s:none ."'" + exe "let s:sp_back = ' guisp=".s:back ."'" + exe "let s:sp_base03 = ' guisp=".s:base03 ."'" + exe "let s:sp_base02 = ' guisp=".s:base02 ."'" + exe "let s:sp_base01 = ' guisp=".s:base01 ."'" + exe "let s:sp_base00 = ' guisp=".s:base00 ."'" + exe "let s:sp_base0 = ' guisp=".s:base0 ."'" + exe "let s:sp_base1 = ' guisp=".s:base1 ."'" + exe "let s:sp_base2 = ' guisp=".s:base2 ."'" + exe "let s:sp_base3 = ' guisp=".s:base3 ."'" + exe "let s:sp_green = ' guisp=".s:green ."'" + exe "let s:sp_yellow = ' guisp=".s:yellow ."'" + exe "let s:sp_orange = ' guisp=".s:orange ."'" + exe "let s:sp_red = ' guisp=".s:red ."'" + exe "let s:sp_magenta = ' guisp=".s:magenta."'" + exe "let s:sp_violet = ' guisp=".s:violet ."'" + exe "let s:sp_blue = ' guisp=".s:blue ."'" + exe "let s:sp_cyan = ' guisp=".s:cyan ."'" +else + let s:sp_none = "" + let s:sp_back = "" + let s:sp_base03 = "" + let s:sp_base02 = "" + let s:sp_base01 = "" + let s:sp_base00 = "" + let s:sp_base0 = "" + let s:sp_base1 = "" + let s:sp_base2 = "" + let s:sp_base3 = "" + let s:sp_green = "" + let s:sp_yellow = "" + let s:sp_orange = "" + let s:sp_red = "" + let s:sp_magenta = "" + let s:sp_violet = "" + let s:sp_blue = "" + let s:sp_cyan = "" +endif + +"}}} +" Basic highlighting"{{{ +" --------------------------------------------------------------------- +" note that link syntax to avoid duplicate configuration doesn't work with the +" exe compiled formats + +exe "hi! Normal" .s:fmt_none .s:fg_base0 .s:bg_back + +exe "hi! Comment" .s:fmt_ital .s:fg_base01 .s:bg_none +" *Comment any comment + +exe "hi! Constant" .s:fmt_none .s:fg_cyan .s:bg_none +" *Constant any constant +" String a string constant: "this is a string" +" Character a character constant: 'c', '\n' +" Number a number constant: 234, 0xff +" Boolean a boolean constant: TRUE, false +" Float a floating point constant: 2.3e10 + +exe "hi! Identifier" .s:fmt_none .s:fg_blue .s:bg_none +" *Identifier any variable name +" Function function name (also: methods for classes) +" +exe "hi! Statement" .s:fmt_none .s:fg_green .s:bg_none +" *Statement any statement +" Conditional if, then, else, endif, switch, etc. +" Repeat for, do, while, etc. +" Label case, default, etc. +" Operator "sizeof", "+", "*", etc. +" Keyword any other keyword +" Exception try, catch, throw + +exe "hi! PreProc" .s:fmt_none .s:fg_orange .s:bg_none +" *PreProc generic Preprocessor +" Include preprocessor #include +" Define preprocessor #define +" Macro same as Define +" PreCondit preprocessor #if, #else, #endif, etc. + +exe "hi! Type" .s:fmt_none .s:fg_yellow .s:bg_none +" *Type int, long, char, etc. +" StorageClass static, register, volatile, etc. +" Structure struct, union, enum, etc. +" Typedef A typedef + +exe "hi! Special" .s:fmt_none .s:fg_red .s:bg_none +" *Special any special symbol +" SpecialChar special character in a constant +" Tag you can use CTRL-] on this +" Delimiter character that needs attention +" SpecialComment special things inside a comment +" Debug debugging statements + +exe "hi! Underlined" .s:fmt_none .s:fg_violet .s:bg_none +" *Underlined text that stands out, HTML links + +exe "hi! Ignore" .s:fmt_none .s:fg_none .s:bg_none +" *Ignore left blank, hidden |hl-Ignore| + +exe "hi! Error" .s:fmt_bold .s:fg_red .s:bg_none +" *Error any erroneous construct + +exe "hi! Todo" .s:fmt_bold .s:fg_magenta.s:bg_none +" *Todo anything that needs extra attention; mostly the +" keywords TODO FIXME and XXX +" +"}}} +" Extended highlighting "{{{ +" --------------------------------------------------------------------- +if (g:solarized_visibility=="high") + exe "hi! SpecialKey" .s:fmt_revr .s:fg_red .s:bg_none + exe "hi! NonText" .s:fmt_bold .s:fg_red .s:bg_none +elseif (g:solarized_visibility=="low") + exe "hi! SpecialKey" .s:fmt_bold .s:fg_base02 .s:bg_none + exe "hi! NonText" .s:fmt_bold .s:fg_base02 .s:bg_none +else + exe "hi! SpecialKey" .s:fmt_bold .s:fg_base00 .s:bg_base02 + exe "hi! NonText" .s:fmt_bold .s:fg_base00 .s:bg_none +endif +exe "hi! StatusLine" .s:fmt_none .s:fg_base1 .s:bg_base02 .s:fmt_revbb +exe "hi! StatusLineNC" .s:fmt_none .s:fg_base00 .s:bg_base02 .s:fmt_revbb +exe "hi! Visual" .s:fmt_none .s:fg_base01 .s:bg_base03 .s:fmt_revbb +exe "hi! Directory" .s:fmt_none .s:fg_blue .s:bg_none +exe "hi! ErrorMsg" .s:fmt_revr .s:fg_red .s:bg_none +exe "hi! IncSearch" .s:fmt_stnd .s:fg_orange .s:bg_none +exe "hi! Search" .s:fmt_revr .s:fg_yellow .s:bg_none +exe "hi! MoreMsg" .s:fmt_none .s:fg_blue .s:bg_none +exe "hi! ModeMsg" .s:fmt_none .s:fg_blue .s:bg_none +exe "hi! LineNr" .s:fmt_none .s:fg_base01 .s:bg_base02 +exe "hi! Question" .s:fmt_bold .s:fg_cyan .s:bg_none +if ( has("gui_running") || &t_Co > 8 ) + exe "hi! VertSplit" .s:fmt_none .s:fg_base00 .s:bg_base00 +else + exe "hi! VertSplit" .s:fmt_revbb .s:fg_base00 .s:bg_base02 +endif +exe "hi! Title" .s:fmt_bold .s:fg_orange .s:bg_none +exe "hi! VisualNOS" .s:fmt_stnd .s:fg_none .s:bg_base02 .s:fmt_revbb +exe "hi! WarningMsg" .s:fmt_bold .s:fg_red .s:bg_none +exe "hi! WildMenu" .s:fmt_none .s:fg_base2 .s:bg_base02 .s:fmt_revbb +exe "hi! Folded" .s:fmt_undb .s:fg_base0 .s:bg_base02 .s:sp_base03 +exe "hi! FoldColumn" .s:fmt_none .s:fg_base0 .s:bg_base02 +if (g:solarized_diffmode=="high") +exe "hi! DiffAdd" .s:fmt_revr .s:fg_green .s:bg_none +exe "hi! DiffChange" .s:fmt_revr .s:fg_yellow .s:bg_none +exe "hi! DiffDelete" .s:fmt_revr .s:fg_red .s:bg_none +exe "hi! DiffText" .s:fmt_revr .s:fg_blue .s:bg_none +elseif (g:solarized_diffmode=="low") +exe "hi! DiffAdd" .s:fmt_undr .s:fg_green .s:bg_none .s:sp_green +exe "hi! DiffChange" .s:fmt_undr .s:fg_yellow .s:bg_none .s:sp_yellow +exe "hi! DiffDelete" .s:fmt_bold .s:fg_red .s:bg_none +exe "hi! DiffText" .s:fmt_undr .s:fg_blue .s:bg_none .s:sp_blue +else " normal + if has("gui_running") +exe "hi! DiffAdd" .s:fmt_bold .s:fg_green .s:bg_base02 .s:sp_green +exe "hi! DiffChange" .s:fmt_bold .s:fg_yellow .s:bg_base02 .s:sp_yellow +exe "hi! DiffDelete" .s:fmt_bold .s:fg_red .s:bg_base02 +exe "hi! DiffText" .s:fmt_bold .s:fg_blue .s:bg_base02 .s:sp_blue + else +exe "hi! DiffAdd" .s:fmt_none .s:fg_green .s:bg_base02 .s:sp_green +exe "hi! DiffChange" .s:fmt_none .s:fg_yellow .s:bg_base02 .s:sp_yellow +exe "hi! DiffDelete" .s:fmt_none .s:fg_red .s:bg_base02 +exe "hi! DiffText" .s:fmt_none .s:fg_blue .s:bg_base02 .s:sp_blue + endif +endif +exe "hi! SignColumn" .s:fmt_none .s:fg_base0 +exe "hi! Conceal" .s:fmt_none .s:fg_blue .s:bg_none +exe "hi! SpellBad" .s:fmt_curl .s:fg_none .s:bg_none .s:sp_red +exe "hi! SpellCap" .s:fmt_curl .s:fg_none .s:bg_none .s:sp_violet +exe "hi! SpellRare" .s:fmt_curl .s:fg_none .s:bg_none .s:sp_cyan +exe "hi! SpellLocal" .s:fmt_curl .s:fg_none .s:bg_none .s:sp_yellow +exe "hi! Pmenu" .s:fmt_none .s:fg_base0 .s:bg_base02 .s:fmt_revbb +exe "hi! PmenuSel" .s:fmt_none .s:fg_base01 .s:bg_base2 .s:fmt_revbb +exe "hi! PmenuSbar" .s:fmt_none .s:fg_base2 .s:bg_base0 .s:fmt_revbb +exe "hi! PmenuThumb" .s:fmt_none .s:fg_base0 .s:bg_base03 .s:fmt_revbb +exe "hi! TabLine" .s:fmt_undr .s:fg_base0 .s:bg_base02 .s:sp_base0 +exe "hi! TabLineFill" .s:fmt_undr .s:fg_base0 .s:bg_base02 .s:sp_base0 +exe "hi! TabLineSel" .s:fmt_undr .s:fg_base01 .s:bg_base2 .s:sp_base0 .s:fmt_revbbu +exe "hi! CursorColumn" .s:fmt_none .s:fg_none .s:bg_base02 +exe "hi! CursorLine" .s:fmt_uopt .s:fg_none .s:bg_base02 .s:sp_base1 +exe "hi! ColorColumn" .s:fmt_none .s:fg_none .s:bg_base02 +exe "hi! Cursor" .s:fmt_none .s:fg_base03 .s:bg_base0 +hi! link lCursor Cursor +exe "hi! MatchParen" .s:fmt_bold .s:fg_red .s:bg_base01 + +"}}} +" vim syntax highlighting "{{{ +" --------------------------------------------------------------------- +"exe "hi! vimLineComment" . s:fg_base01 .s:bg_none .s:fmt_ital +"hi! link vimComment Comment +"hi! link vimLineComment Comment +hi! link vimVar Identifier +hi! link vimFunc Function +hi! link vimUserFunc Function +hi! link helpSpecial Special +hi! link vimSet Normal +hi! link vimSetEqual Normal +exe "hi! vimCommentString" .s:fmt_none .s:fg_violet .s:bg_none +exe "hi! vimCommand" .s:fmt_none .s:fg_yellow .s:bg_none +exe "hi! vimCmdSep" .s:fmt_bold .s:fg_blue .s:bg_none +exe "hi! helpExample" .s:fmt_none .s:fg_base1 .s:bg_none +exe "hi! helpOption" .s:fmt_none .s:fg_cyan .s:bg_none +exe "hi! helpNote" .s:fmt_none .s:fg_magenta.s:bg_none +exe "hi! helpVim" .s:fmt_none .s:fg_magenta.s:bg_none +exe "hi! helpHyperTextJump" .s:fmt_undr .s:fg_blue .s:bg_none +exe "hi! helpHyperTextEntry".s:fmt_none .s:fg_green .s:bg_none +exe "hi! vimIsCommand" .s:fmt_none .s:fg_base00 .s:bg_none +exe "hi! vimSynMtchOpt" .s:fmt_none .s:fg_yellow .s:bg_none +exe "hi! vimSynType" .s:fmt_none .s:fg_cyan .s:bg_none +exe "hi! vimHiLink" .s:fmt_none .s:fg_blue .s:bg_none +exe "hi! vimHiGroup" .s:fmt_none .s:fg_blue .s:bg_none +exe "hi! vimGroup" .s:fmt_undb .s:fg_blue .s:bg_none +"}}} +" diff highlighting "{{{ +" --------------------------------------------------------------------- +hi! link diffAdded Statement +hi! link diffLine Identifier +"}}} +" git & gitcommit highlighting "{{{ +"git +"exe "hi! gitDateHeader" +"exe "hi! gitIdentityHeader" +"exe "hi! gitIdentityKeyword" +"exe "hi! gitNotesHeader" +"exe "hi! gitReflogHeader" +"exe "hi! gitKeyword" +"exe "hi! gitIdentity" +"exe "hi! gitEmailDelimiter" +"exe "hi! gitEmail" +"exe "hi! gitDate" +"exe "hi! gitMode" +"exe "hi! gitHashAbbrev" +"exe "hi! gitHash" +"exe "hi! gitReflogMiddle" +"exe "hi! gitReference" +"exe "hi! gitStage" +"exe "hi! gitType" +"exe "hi! gitDiffAdded" +"exe "hi! gitDiffRemoved" +"gitcommit +"exe "hi! gitcommitSummary" +exe "hi! gitcommitComment" .s:fmt_ital .s:fg_base01 .s:bg_none +hi! link gitcommitUntracked gitcommitComment +hi! link gitcommitDiscarded gitcommitComment +hi! link gitcommitSelected gitcommitComment +exe "hi! gitcommitUnmerged" .s:fmt_bold .s:fg_green .s:bg_none +exe "hi! gitcommitOnBranch" .s:fmt_bold .s:fg_base01 .s:bg_none +exe "hi! gitcommitBranch" .s:fmt_bold .s:fg_magenta .s:bg_none +hi! link gitcommitNoBranch gitcommitBranch +exe "hi! gitcommitDiscardedType".s:fmt_none .s:fg_red .s:bg_none +exe "hi! gitcommitSelectedType" .s:fmt_none .s:fg_green .s:bg_none +"exe "hi! gitcommitUnmergedType" +"exe "hi! gitcommitType" +"exe "hi! gitcommitNoChanges" +"exe "hi! gitcommitHeader" +exe "hi! gitcommitHeader" .s:fmt_none .s:fg_base01 .s:bg_none +exe "hi! gitcommitUntrackedFile".s:fmt_bold .s:fg_cyan .s:bg_none +exe "hi! gitcommitDiscardedFile".s:fmt_bold .s:fg_red .s:bg_none +exe "hi! gitcommitSelectedFile" .s:fmt_bold .s:fg_green .s:bg_none +exe "hi! gitcommitUnmergedFile" .s:fmt_bold .s:fg_yellow .s:bg_none +exe "hi! gitcommitFile" .s:fmt_bold .s:fg_base0 .s:bg_none +hi! link gitcommitDiscardedArrow gitcommitDiscardedFile +hi! link gitcommitSelectedArrow gitcommitSelectedFile +hi! link gitcommitUnmergedArrow gitcommitUnmergedFile +"exe "hi! gitcommitArrow" +"exe "hi! gitcommitOverflow" +"exe "hi! gitcommitBlank" +" }}} +" html highlighting "{{{ +" --------------------------------------------------------------------- +exe "hi! htmlTag" .s:fmt_none .s:fg_base01 .s:bg_none +exe "hi! htmlEndTag" .s:fmt_none .s:fg_base01 .s:bg_none +exe "hi! htmlTagN" .s:fmt_bold .s:fg_base1 .s:bg_none +exe "hi! htmlTagName" .s:fmt_bold .s:fg_blue .s:bg_none +exe "hi! htmlSpecialTagName".s:fmt_ital .s:fg_blue .s:bg_none +exe "hi! htmlArg" .s:fmt_none .s:fg_base00 .s:bg_none +exe "hi! javaScript" .s:fmt_none .s:fg_yellow .s:bg_none +"}}} +" perl highlighting "{{{ +" --------------------------------------------------------------------- +exe "hi! perlHereDoc" . s:fg_base1 .s:bg_back .s:fmt_none +exe "hi! perlVarPlain" . s:fg_yellow .s:bg_back .s:fmt_none +exe "hi! perlStatementFileDesc". s:fg_cyan.s:bg_back.s:fmt_none + +"}}} +" tex highlighting "{{{ +" --------------------------------------------------------------------- +exe "hi! texStatement" . s:fg_cyan .s:bg_back .s:fmt_none +exe "hi! texMathZoneX" . s:fg_yellow .s:bg_back .s:fmt_none +exe "hi! texMathMatcher" . s:fg_yellow .s:bg_back .s:fmt_none +exe "hi! texMathMatcher" . s:fg_yellow .s:bg_back .s:fmt_none +exe "hi! texRefLabel" . s:fg_yellow .s:bg_back .s:fmt_none +"}}} +" ruby highlighting "{{{ +" --------------------------------------------------------------------- +exe "hi! rubyDefine" . s:fg_base1 .s:bg_back .s:fmt_bold +"rubyInclude +"rubySharpBang +"rubyAccess +"rubyPredefinedVariable +"rubyBoolean +"rubyClassVariable +"rubyBeginEnd +"rubyRepeatModifier +"hi! link rubyArrayDelimiter Special " [ , , ] +"rubyCurlyBlock { , , } + +"hi! link rubyClass Keyword +"hi! link rubyModule Keyword +"hi! link rubyKeyword Keyword +"hi! link rubyOperator Operator +"hi! link rubyIdentifier Identifier +"hi! link rubyInstanceVariable Identifier +"hi! link rubyGlobalVariable Identifier +"hi! link rubyClassVariable Identifier +"hi! link rubyConstant Type +"}}} +" haskell syntax highlighting"{{{ +" --------------------------------------------------------------------- +" For use with syntax/haskell.vim : Haskell Syntax File +" http://www.vim.org/scripts/script.php?script_id=3034 +" See also Steffen Siering's github repository: +" http://github.com/urso/dotrc/blob/master/vim/syntax/haskell.vim +" --------------------------------------------------------------------- +" +" Treat True and False specially, see the plugin referenced above +let hs_highlight_boolean=1 +" highlight delims, see the plugin referenced above +let hs_highlight_delimiters=1 + +exe "hi! cPreCondit". s:fg_orange.s:bg_none .s:fmt_none + +exe "hi! VarId" . s:fg_blue .s:bg_none .s:fmt_none +exe "hi! ConId" . s:fg_yellow .s:bg_none .s:fmt_none +exe "hi! hsImport" . s:fg_magenta.s:bg_none .s:fmt_none +exe "hi! hsString" . s:fg_base00 .s:bg_none .s:fmt_none + +exe "hi! hsStructure" . s:fg_cyan .s:bg_none .s:fmt_none +exe "hi! hs_hlFunctionName" . s:fg_blue .s:bg_none +exe "hi! hsStatement" . s:fg_cyan .s:bg_none .s:fmt_none +exe "hi! hsImportLabel" . s:fg_cyan .s:bg_none .s:fmt_none +exe "hi! hs_OpFunctionName" . s:fg_yellow .s:bg_none .s:fmt_none +exe "hi! hs_DeclareFunction" . s:fg_orange .s:bg_none .s:fmt_none +exe "hi! hsVarSym" . s:fg_cyan .s:bg_none .s:fmt_none +exe "hi! hsType" . s:fg_yellow .s:bg_none .s:fmt_none +exe "hi! hsTypedef" . s:fg_cyan .s:bg_none .s:fmt_none +exe "hi! hsModuleName" . s:fg_green .s:bg_none .s:fmt_undr +exe "hi! hsModuleStartLabel" . s:fg_magenta.s:bg_none .s:fmt_none +hi! link hsImportParams Delimiter +hi! link hsDelimTypeExport Delimiter +hi! link hsModuleStartLabel hsStructure +hi! link hsModuleWhereLabel hsModuleStartLabel + +" following is for the haskell-conceal plugin +" the first two items don't have an impact, but better safe +exe "hi! hsNiceOperator" . s:fg_cyan .s:bg_none .s:fmt_none +exe "hi! hsniceoperator" . s:fg_cyan .s:bg_none .s:fmt_none + +"}}} +" pandoc markdown syntax highlighting "{{{ +" --------------------------------------------------------------------- + +"PandocHiLink pandocNormalBlock +exe "hi! pandocTitleBlock" .s:fg_blue .s:bg_none .s:fmt_none +exe "hi! pandocTitleBlockTitle" .s:fg_blue .s:bg_none .s:fmt_bold +exe "hi! pandocTitleComment" .s:fg_blue .s:bg_none .s:fmt_bold +exe "hi! pandocComment" .s:fg_base01 .s:bg_none .s:fmt_ital +exe "hi! pandocVerbatimBlock" .s:fg_yellow .s:bg_none .s:fmt_none +hi! link pandocVerbatimBlockDeep pandocVerbatimBlock +hi! link pandocCodeBlock pandocVerbatimBlock +hi! link pandocCodeBlockDelim pandocVerbatimBlock +exe "hi! pandocBlockQuote" .s:fg_blue .s:bg_none .s:fmt_none +exe "hi! pandocBlockQuoteLeader1" .s:fg_blue .s:bg_none .s:fmt_none +exe "hi! pandocBlockQuoteLeader2" .s:fg_cyan .s:bg_none .s:fmt_none +exe "hi! pandocBlockQuoteLeader3" .s:fg_yellow .s:bg_none .s:fmt_none +exe "hi! pandocBlockQuoteLeader4" .s:fg_red .s:bg_none .s:fmt_none +exe "hi! pandocBlockQuoteLeader5" .s:fg_base0 .s:bg_none .s:fmt_none +exe "hi! pandocBlockQuoteLeader6" .s:fg_base01 .s:bg_none .s:fmt_none +exe "hi! pandocListMarker" .s:fg_magenta.s:bg_none .s:fmt_none +exe "hi! pandocListReference" .s:fg_magenta.s:bg_none .s:fmt_undr + +" Definitions +" --------------------------------------------------------------------- +let s:fg_pdef = s:fg_violet +exe "hi! pandocDefinitionBlock" .s:fg_pdef .s:bg_none .s:fmt_none +exe "hi! pandocDefinitionTerm" .s:fg_pdef .s:bg_none .s:fmt_stnd +exe "hi! pandocDefinitionIndctr" .s:fg_pdef .s:bg_none .s:fmt_bold +exe "hi! pandocEmphasisDefinition" .s:fg_pdef .s:bg_none .s:fmt_ital +exe "hi! pandocEmphasisNestedDefinition" .s:fg_pdef .s:bg_none .s:fmt_bldi +exe "hi! pandocStrongEmphasisDefinition" .s:fg_pdef .s:bg_none .s:fmt_bold +exe "hi! pandocStrongEmphasisNestedDefinition" .s:fg_pdef.s:bg_none.s:fmt_bldi +exe "hi! pandocStrongEmphasisEmphasisDefinition" .s:fg_pdef.s:bg_none.s:fmt_bldi +exe "hi! pandocStrikeoutDefinition" .s:fg_pdef .s:bg_none .s:fmt_revr +exe "hi! pandocVerbatimInlineDefinition" .s:fg_pdef .s:bg_none .s:fmt_none +exe "hi! pandocSuperscriptDefinition" .s:fg_pdef .s:bg_none .s:fmt_none +exe "hi! pandocSubscriptDefinition" .s:fg_pdef .s:bg_none .s:fmt_none + +" Tables +" --------------------------------------------------------------------- +let s:fg_ptable = s:fg_blue +exe "hi! pandocTable" .s:fg_ptable.s:bg_none .s:fmt_none +exe "hi! pandocTableStructure" .s:fg_ptable.s:bg_none .s:fmt_none +hi! link pandocTableStructureTop pandocTableStructre +hi! link pandocTableStructureEnd pandocTableStructre +exe "hi! pandocTableZebraLight" .s:fg_ptable.s:bg_base03.s:fmt_none +exe "hi! pandocTableZebraDark" .s:fg_ptable.s:bg_base02.s:fmt_none +exe "hi! pandocEmphasisTable" .s:fg_ptable.s:bg_none .s:fmt_ital +exe "hi! pandocEmphasisNestedTable" .s:fg_ptable.s:bg_none .s:fmt_bldi +exe "hi! pandocStrongEmphasisTable" .s:fg_ptable.s:bg_none .s:fmt_bold +exe "hi! pandocStrongEmphasisNestedTable" .s:fg_ptable.s:bg_none .s:fmt_bldi +exe "hi! pandocStrongEmphasisEmphasisTable" .s:fg_ptable.s:bg_none .s:fmt_bldi +exe "hi! pandocStrikeoutTable" .s:fg_ptable.s:bg_none .s:fmt_revr +exe "hi! pandocVerbatimInlineTable" .s:fg_ptable.s:bg_none .s:fmt_none +exe "hi! pandocSuperscriptTable" .s:fg_ptable.s:bg_none .s:fmt_none +exe "hi! pandocSubscriptTable" .s:fg_ptable.s:bg_none .s:fmt_none + +" Headings +" --------------------------------------------------------------------- +let s:fg_phead = s:fg_orange +exe "hi! pandocHeading" .s:fg_phead .s:bg_none.s:fmt_bold +exe "hi! pandocHeadingMarker" .s:fg_yellow.s:bg_none.s:fmt_bold +exe "hi! pandocEmphasisHeading" .s:fg_phead .s:bg_none.s:fmt_bldi +exe "hi! pandocEmphasisNestedHeading" .s:fg_phead .s:bg_none.s:fmt_bldi +exe "hi! pandocStrongEmphasisHeading" .s:fg_phead .s:bg_none.s:fmt_bold +exe "hi! pandocStrongEmphasisNestedHeading" .s:fg_phead .s:bg_none.s:fmt_bldi +exe "hi! pandocStrongEmphasisEmphasisHeading".s:fg_phead .s:bg_none.s:fmt_bldi +exe "hi! pandocStrikeoutHeading" .s:fg_phead .s:bg_none.s:fmt_revr +exe "hi! pandocVerbatimInlineHeading" .s:fg_phead .s:bg_none.s:fmt_bold +exe "hi! pandocSuperscriptHeading" .s:fg_phead .s:bg_none.s:fmt_bold +exe "hi! pandocSubscriptHeading" .s:fg_phead .s:bg_none.s:fmt_bold + +" Links +" --------------------------------------------------------------------- +exe "hi! pandocLinkDelim" .s:fg_base01 .s:bg_none .s:fmt_none +exe "hi! pandocLinkLabel" .s:fg_blue .s:bg_none .s:fmt_undr +exe "hi! pandocLinkText" .s:fg_blue .s:bg_none .s:fmt_undb +exe "hi! pandocLinkURL" .s:fg_base00 .s:bg_none .s:fmt_undr +exe "hi! pandocLinkTitle" .s:fg_base00 .s:bg_none .s:fmt_undi +exe "hi! pandocLinkTitleDelim" .s:fg_base01 .s:bg_none .s:fmt_undi .s:sp_base00 +exe "hi! pandocLinkDefinition" .s:fg_cyan .s:bg_none .s:fmt_undr .s:sp_base00 +exe "hi! pandocLinkDefinitionID" .s:fg_blue .s:bg_none .s:fmt_bold +exe "hi! pandocImageCaption" .s:fg_violet .s:bg_none .s:fmt_undb +exe "hi! pandocFootnoteLink" .s:fg_green .s:bg_none .s:fmt_undr +exe "hi! pandocFootnoteDefLink" .s:fg_green .s:bg_none .s:fmt_bold +exe "hi! pandocFootnoteInline" .s:fg_green .s:bg_none .s:fmt_undb +exe "hi! pandocFootnote" .s:fg_green .s:bg_none .s:fmt_none +exe "hi! pandocCitationDelim" .s:fg_magenta.s:bg_none .s:fmt_none +exe "hi! pandocCitation" .s:fg_magenta.s:bg_none .s:fmt_none +exe "hi! pandocCitationID" .s:fg_magenta.s:bg_none .s:fmt_undr +exe "hi! pandocCitationRef" .s:fg_magenta.s:bg_none .s:fmt_none + +" Main Styles +" --------------------------------------------------------------------- +exe "hi! pandocStyleDelim" .s:fg_base01 .s:bg_none .s:fmt_none +exe "hi! pandocEmphasis" .s:fg_base0 .s:bg_none .s:fmt_ital +exe "hi! pandocEmphasisNested" .s:fg_base0 .s:bg_none .s:fmt_bldi +exe "hi! pandocStrongEmphasis" .s:fg_base0 .s:bg_none .s:fmt_bold +exe "hi! pandocStrongEmphasisNested" .s:fg_base0 .s:bg_none .s:fmt_bldi +exe "hi! pandocStrongEmphasisEmphasis" .s:fg_base0 .s:bg_none .s:fmt_bldi +exe "hi! pandocStrikeout" .s:fg_base01 .s:bg_none .s:fmt_revr +exe "hi! pandocVerbatimInline" .s:fg_yellow .s:bg_none .s:fmt_none +exe "hi! pandocSuperscript" .s:fg_violet .s:bg_none .s:fmt_none +exe "hi! pandocSubscript" .s:fg_violet .s:bg_none .s:fmt_none + +exe "hi! pandocRule" .s:fg_blue .s:bg_none .s:fmt_bold +exe "hi! pandocRuleLine" .s:fg_blue .s:bg_none .s:fmt_bold +exe "hi! pandocEscapePair" .s:fg_red .s:bg_none .s:fmt_bold +exe "hi! pandocCitationRef" .s:fg_magenta.s:bg_none .s:fmt_none +exe "hi! pandocNonBreakingSpace" . s:fg_red .s:bg_none .s:fmt_revr +hi! link pandocEscapedCharacter pandocEscapePair +hi! link pandocLineBreak pandocEscapePair + +" Embedded Code +" --------------------------------------------------------------------- +exe "hi! pandocMetadataDelim" .s:fg_base01 .s:bg_none .s:fmt_none +exe "hi! pandocMetadata" .s:fg_blue .s:bg_none .s:fmt_none +exe "hi! pandocMetadataKey" .s:fg_blue .s:bg_none .s:fmt_none +exe "hi! pandocMetadata" .s:fg_blue .s:bg_none .s:fmt_bold +hi! link pandocMetadataTitle pandocMetadata + +"}}} +" Utility autocommand "{{{ +" --------------------------------------------------------------------- +" In cases where Solarized is initialized inside a terminal vim session and +" then transferred to a gui session via the command `:gui`, the gui vim process +" does not re-read the colorscheme (or .vimrc for that matter) so any `has_gui` +" related code that sets gui specific values isn't executed. +" +" Currently, Solarized sets only the cterm or gui values for the colorscheme +" depending on gui or terminal mode. It's possible that, if the following +" autocommand method is deemed excessively poor form, that approach will be +" used again and the autocommand below will be dropped. +" +" However it seems relatively benign in this case to include the autocommand +" here. It fires only in cases where vim is transferring from terminal to gui +" mode (detected with the script scope s:vmode variable). It also allows for +" other potential terminal customizations that might make gui mode suboptimal. +" +autocmd GUIEnter * if (s:vmode != "gui") | exe "colorscheme " . g:colors_name | endif +"}}} +" Highlight Trailing Space {{{ +" Experimental: Different highlight when on cursorline +function! s:SolarizedHiTrail() + if g:solarized_hitrail==0 + hi! clear solarizedTrailingSpace + else + syn match solarizedTrailingSpace "\s*$" + exe "hi! solarizedTrailingSpace " .s:fmt_undr .s:fg_red .s:bg_none .s:sp_red + endif +endfunction +augroup SolarizedHiTrail + autocmd! + if g:solarized_hitrail==1 + autocmd! Syntax * call s:SolarizedHiTrail() + autocmd! ColorScheme * if g:colors_name == "solarized" | call s:SolarizedHiTrail() | else | augroup! s:SolarizedHiTrail | endif + endif +augroup END +" }}} +" Menus "{{{ +" --------------------------------------------------------------------- +" Turn off Solarized menu by including the following assignment in your .vimrc: +" +" let g:solarized_menu=0 + +function! s:SolarizedOptions() + new "new buffer + setf vim "vim filetype + let failed = append(0, s:defaults_list) + let failed = append(0, s:colorscheme_list) + let failed = append(0, s:options_list) + let failed = append(0, s:lazycat_list) + 0 "jump back to the top +endfunction +if !exists(":SolarizedOptions") + command SolarizedOptions :call s:SolarizedOptions() +endif + +function! SolarizedMenu() + if exists("g:loaded_solarized_menu") + try + silent! aunmenu Solarized + endtry + endif + let g:loaded_solarized_menu = 1 + + if g:colors_name == "solarized" && g:solarized_menu != 0 + + amenu &Solarized.&Contrast.&Low\ Contrast :let g:solarized_contrast="low" \| colorscheme solarized + amenu &Solarized.&Contrast.&Normal\ Contrast :let g:solarized_contrast="normal" \| colorscheme solarized + amenu &Solarized.&Contrast.&High\ Contrast :let g:solarized_contrast="high" \| colorscheme solarized + an &Solarized.&Contrast.-sep- + amenu &Solarized.&Contrast.&Help:\ Contrast :help 'solarized_contrast' + + amenu &Solarized.&Visibility.&Low\ Visibility :let g:solarized_visibility="low" \| colorscheme solarized + amenu &Solarized.&Visibility.&Normal\ Visibility :let g:solarized_visibility="normal" \| colorscheme solarized + amenu &Solarized.&Visibility.&High\ Visibility :let g:solarized_visibility="high" \| colorscheme solarized + an &Solarized.&Visibility.-sep- + amenu &Solarized.&Visibility.&Help:\ Visibility :help 'solarized_visibility' + + amenu &Solarized.&Background.&Toggle\ Background :ToggleBG + amenu &Solarized.&Background.&Dark\ Background :set background=dark \| colorscheme solarized + amenu &Solarized.&Background.&Light\ Background :set background=light \| colorscheme solarized + an &Solarized.&Background.-sep- + amenu &Solarized.&Background.&Help:\ ToggleBG :help togglebg + + if g:solarized_bold==0 | let l:boldswitch="On" | else | let l:boldswitch="Off" | endif + exe "amenu &Solarized.&Styling.&Turn\\ Bold\\ ".l:boldswitch." :let g:solarized_bold=(abs(g:solarized_bold-1)) \\| colorscheme solarized" + if g:solarized_italic==0 | let l:italicswitch="On" | else | let l:italicswitch="Off" | endif + exe "amenu &Solarized.&Styling.&Turn\\ Italic\\ ".l:italicswitch." :let g:solarized_italic=(abs(g:solarized_italic-1)) \\| colorscheme solarized" + if g:solarized_underline==0 | let l:underlineswitch="On" | else | let l:underlineswitch="Off" | endif + exe "amenu &Solarized.&Styling.&Turn\\ Underline\\ ".l:underlineswitch." :let g:solarized_underline=(abs(g:solarized_underline-1)) \\| colorscheme solarized" + + amenu &Solarized.&Diff\ Mode.&Low\ Diff\ Mode :let g:solarized_diffmode="low" \| colorscheme solarized + amenu &Solarized.&Diff\ Mode.&Normal\ Diff\ Mode :let g:solarized_diffmode="normal" \| colorscheme solarized + amenu &Solarized.&Diff\ Mode.&High\ Diff\ Mode :let g:solarized_diffmode="high" \| colorscheme solarized + + if g:solarized_hitrail==0 | let l:hitrailswitch="On" | else | let l:hitrailswitch="Off" | endif + exe "amenu &Solarized.&Experimental.&Turn\\ Highlight\\ Trailing\\ Spaces\\ ".l:hitrailswitch." :let g:solarized_hitrail=(abs(g:solarized_hitrail-1)) \\| colorscheme solarized" + an &Solarized.&Experimental.-sep- + amenu &Solarized.&Experimental.&Help:\ HiTrail :help 'solarized_hitrail' + + an &Solarized.-sep1- + + amenu &Solarized.&Autogenerate\ options :SolarizedOptions + + an &Solarized.-sep2- + + amenu &Solarized.&Help.&Solarized\ Help :help solarized + amenu &Solarized.&Help.&Toggle\ Background\ Help :help togglebg + amenu &Solarized.&Help.&Removing\ This\ Menu :help solarized-menu + + an 9999.77 &Help.&Solarized\ Colorscheme :help solarized + an 9999.78 &Help.&Toggle\ Background :help togglebg + an 9999.79 &Help.-sep3- + + endif +endfunction + +autocmd ColorScheme * if g:colors_name != "solarized" | silent! aunmenu Solarized | else | call SolarizedMenu() | endif + +"}}} +" License "{{{ +" --------------------------------------------------------------------- +" +" Copyright (c) 2011 Ethan Schoonover +" +" Permission is hereby granted, free of charge, to any person obtaining a copy +" of this software and associated documentation files (the "Software"), to deal +" in the Software without restriction, including without limitation the rights +" to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +" copies of the Software, and to permit persons to whom the Software is +" furnished to do so, subject to the following conditions: +" +" The above copyright notice and this permission notice shall be included in +" all copies or substantial portions of the Software. +" +" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +" AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +" OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +" THE SOFTWARE. +" +" vim:foldmethod=marker:foldlevel=0 +"}}} diff --git a/vim/colors/vividchalk.vim b/vim/colors/vividchalk.vim new file mode 100644 index 0000000..638a8f4 --- /dev/null +++ b/vim/colors/vividchalk.vim @@ -0,0 +1,191 @@ +" Vim color scheme +" Name: vividchalk.vim +" Author: Tim Pope +" Version: 2.0 +" GetLatestVimScripts: 1891 1 :AutoInstall: vividchalk.vim + +" Based on the Vibrank Ink theme for TextMate +" Distributable under the same terms as Vim itself (see :help license) + +if has("gui_running") + set background=dark +endif +hi clear +if exists("syntax_on") + syntax reset +endif + +let colors_name = "vividchalk" + +" First two functions adapted from inkpot.vim + +" map a urxvt cube number to an xterm-256 cube number +fun! s:M(a) + return strpart("0245", a:a, 1) + 0 +endfun + +" map a urxvt colour to an xterm-256 colour +fun! s:X(a) + if &t_Co == 88 + return a:a + else + if a:a == 8 + return 237 + elseif a:a < 16 + return a:a + elseif a:a > 79 + return 232 + (3 * (a:a - 80)) + else + let l:b = a:a - 16 + let l:x = l:b % 4 + let l:y = (l:b / 4) % 4 + let l:z = (l:b / 16) + return 16 + s:M(l:x) + (6 * s:M(l:y)) + (36 * s:M(l:z)) + endif + endif +endfun + +function! E2T(a) + return s:X(a:a) +endfunction + +function! s:choose(mediocre,good) + if &t_Co != 88 && &t_Co != 256 + return a:mediocre + else + return s:X(a:good) + endif +endfunction + +function! s:hifg(group,guifg,first,second,...) + if a:0 && &t_Co == 256 + let ctermfg = a:1 + else + let ctermfg = s:choose(a:first,a:second) + endif + exe "highlight ".a:group." guifg=".a:guifg." ctermfg=".ctermfg +endfunction + +function! s:hibg(group,guibg,first,second) + let ctermbg = s:choose(a:first,a:second) + exe "highlight ".a:group." guibg=".a:guibg." ctermbg=".ctermbg +endfunction + +hi link railsMethod PreProc +hi link rubyDefine Keyword +hi link rubySymbol Constant +hi link rubyAccess rubyMethod +hi link rubyAttribute rubyMethod +hi link rubyEval rubyMethod +hi link rubyException rubyMethod +hi link rubyInclude rubyMethod +hi link rubyStringDelimiter rubyString +hi link rubyRegexp Regexp +hi link rubyRegexpDelimiter rubyRegexp +"hi link rubyConstant Variable +"hi link rubyGlobalVariable Variable +"hi link rubyClassVariable Variable +"hi link rubyInstanceVariable Variable +hi link javascriptRegexpString Regexp +hi link javascriptNumber Number +hi link javascriptNull Constant +highlight link diffAdded String +highlight link diffRemoved Statement +highlight link diffLine PreProc +highlight link diffSubname Comment + +call s:hifg("Normal","#EEEEEE","White",87) +if &background == "light" || has("gui_running") + hi Normal guibg=Black ctermbg=Black +else + hi Normal guibg=Black ctermbg=NONE +endif +highlight StatusLine guifg=Black guibg=#aabbee gui=bold ctermfg=Black ctermbg=White cterm=bold +highlight StatusLineNC guifg=#444444 guibg=#aaaaaa gui=none ctermfg=Black ctermbg=Grey cterm=none +"if &t_Co == 256 + "highlight StatusLine ctermbg=117 +"else + "highlight StatusLine ctermbg=43 +"endif + +highlight Ignore ctermfg=Black +highlight WildMenu guifg=Black guibg=#ffff00 gui=bold ctermfg=Black ctermbg=Yellow cterm=bold +highlight Cursor guifg=Black guibg=White ctermfg=Black ctermbg=White +highlight CursorLine guibg=#333333 guifg=NONE +highlight CursorColumn guibg=#333333 guifg=NONE +highlight NonText guifg=#404040 ctermfg=8 +highlight SpecialKey guifg=#404040 ctermfg=8 +highlight Directory none +high link Directory Identifier +highlight ErrorMsg guibg=Red ctermbg=DarkRed guifg=NONE ctermfg=NONE +highlight Search guifg=NONE ctermfg=NONE gui=none cterm=none +call s:hibg("Search" ,"#555555","DarkBlue",81) +highlight IncSearch guifg=White guibg=Black ctermfg=White ctermbg=Black +highlight MoreMsg guifg=#00AA00 ctermfg=Green +highlight LineNr guifg=#DDEEFF ctermfg=White +call s:hibg("LineNr" ,"#222222","DarkBlue",80) +highlight Question none +high link Question MoreMsg +highlight Title guifg=Magenta ctermfg=Magenta +highlight VisualNOS gui=none cterm=none +call s:hibg("Visual" ,"#555577","LightBlue",83) +call s:hibg("VisualNOS" ,"#444444","DarkBlue",81) +call s:hibg("MatchParen","#1100AA","DarkBlue",18) +highlight WarningMsg guifg=Red ctermfg=Red +highlight Error ctermbg=DarkRed +highlight SpellBad ctermbg=DarkRed +" FIXME: Comments +highlight SpellRare ctermbg=DarkMagenta +highlight SpellCap ctermbg=DarkBlue +highlight SpellLocal ctermbg=DarkCyan + +call s:hibg("Folded" ,"#110077","DarkBlue",17) +call s:hifg("Folded" ,"#aaddee","LightCyan",63) +highlight FoldColumn none +high link FoldColumn Folded +highlight DiffAdd ctermbg=4 guibg=DarkBlue +highlight DiffChange ctermbg=5 guibg=DarkMagenta +highlight DiffDelete ctermfg=12 ctermbg=6 gui=bold guifg=Blue guibg=DarkCyan +highlight DiffText ctermbg=DarkRed +highlight DiffText cterm=bold ctermbg=9 gui=bold guibg=Red + +highlight Pmenu guifg=White ctermfg=White gui=bold cterm=bold +highlight PmenuSel guifg=White ctermfg=White gui=bold cterm=bold +call s:hibg("Pmenu" ,"#000099","Blue",18) +call s:hibg("PmenuSel" ,"#5555ff","DarkCyan",39) +highlight PmenuSbar guibg=Grey ctermbg=Grey +highlight PmenuThumb guibg=White ctermbg=White +highlight TabLine gui=underline cterm=underline +call s:hifg("TabLine" ,"#bbbbbb","LightGrey",85) +call s:hibg("TabLine" ,"#333333","DarkGrey",80) +highlight TabLineSel guifg=White guibg=Black ctermfg=White ctermbg=Black +highlight TabLineFill gui=underline cterm=underline +call s:hifg("TabLineFill","#bbbbbb","LightGrey",85) +call s:hibg("TabLineFill","#808080","Grey",83) + +hi Type gui=none +hi Statement gui=none +if !has("gui_mac") + " Mac GUI degrades italics to ugly underlining. + hi Comment gui=italic + hi railsUserClass gui=italic + hi railsUserMethod gui=italic +endif +hi Identifier cterm=none +" Commented numbers at the end are *old* 256 color values +"highlight PreProc guifg=#EDF8F9 +call s:hifg("Comment" ,"#9933CC","DarkMagenta",34) " 92 +" 26 instead? +call s:hifg("Constant" ,"#339999","DarkCyan",21) " 30 +call s:hifg("rubyNumber" ,"#CCFF33","Yellow",60) " 190 +call s:hifg("String" ,"#66FF00","LightGreen",44,82) " 82 +call s:hifg("Identifier" ,"#FFCC00","Yellow",72) " 220 +call s:hifg("Statement" ,"#FF6600","Brown",68) " 202 +call s:hifg("PreProc" ,"#AAFFFF","LightCyan",47) " 213 +call s:hifg("railsUserMethod","#AACCFF","LightCyan",27) +call s:hifg("Type" ,"#AAAA77","Grey",57) " 101 +call s:hifg("railsUserClass" ,"#AAAAAA","Grey",7) " 101 +call s:hifg("Special" ,"#33AA00","DarkGreen",24) " 7 +call s:hifg("Regexp" ,"#44B4CC","DarkCyan",21) " 74 +call s:hifg("rubyMethod" ,"#DDE93D","Yellow",77) " 191 +"highlight railsMethod guifg=#EE1122 ctermfg=1 diff --git a/vim/colors/wombat.vim b/vim/colors/wombat.vim new file mode 100644 index 0000000..9ad1e56 --- /dev/null +++ b/vim/colors/wombat.vim @@ -0,0 +1,51 @@ +" Maintainer: Lars H. Nielsen (dengmao@gmail.com) +" Last Change: January 22 2007 + +set background=dark + +hi clear + +if exists("syntax_on") + syntax reset +endif + +let colors_name = "wombat" + + +" Vim >= 7.0 specific colors +if version >= 700 + hi CursorLine guibg=#2d2d2d + hi CursorColumn guibg=#2d2d2d + hi MatchParen guifg=#f6f3e8 guibg=#857b6f gui=bold + hi Pmenu guifg=#f6f3e8 guibg=#444444 + hi PmenuSel guifg=#000000 guibg=#cae682 +endif + +" General colors +hi Cursor guifg=NONE guibg=#656565 gui=none +hi Normal guifg=#f6f3e8 guibg=#242424 gui=none +hi NonText guifg=#808080 guibg=#303030 gui=none +hi LineNr guifg=#857b6f guibg=#000000 gui=none +hi StatusLine guifg=#f6f3e8 guibg=#444444 gui=italic +hi StatusLineNC guifg=#857b6f guibg=#444444 gui=none +hi VertSplit guifg=#444444 guibg=#444444 gui=none +hi Folded guibg=#384048 guifg=#a0a8b0 gui=none +hi Title guifg=#f6f3e8 guibg=NONE gui=bold +hi Visual guifg=#f6f3e8 guibg=#444444 gui=none +hi SpecialKey guifg=#808080 guibg=#343434 gui=none + +" Syntax highlighting +hi Comment guifg=#99968b gui=italic +hi Todo guifg=#8f8f8f gui=italic +hi Constant guifg=#e5786d gui=none +hi String guifg=#95e454 gui=italic +hi Identifier guifg=#cae682 gui=none +hi Function guifg=#cae682 gui=none +hi Type guifg=#cae682 gui=none +hi Statement guifg=#8ac6f2 gui=none +hi Keyword guifg=#8ac6f2 gui=none +hi PreProc guifg=#e5786d gui=none +hi Number guifg=#e5786d gui=none +hi Special guifg=#e7f6da gui=none + + diff --git a/vim/ftplugin/tex.vim b/vim/ftplugin/tex.vim new file mode 100644 index 0000000..f146c96 --- /dev/null +++ b/vim/ftplugin/tex.vim @@ -0,0 +1,11 @@ +setlocal formatoptions+=wa + +function! SyncTexForward() + let execstr = "silent !okular --unique ".LatexBox_GetOutputFile()."\\#src:".line(".")."%:p &" + exec execstr +endfunction +nmap f :call SyncTexForward() +map ct yyp:s/begin/end/ + + + diff --git a/vimrc b/vimrc new file mode 100644 index 0000000..995c811 --- /dev/null +++ b/vimrc @@ -0,0 +1,141 @@ +" Balkian + +set nocompatible " be iMproved +filetype off " required! + +set rtp+=~/.vim/bundle/vundle/ +call vundle#rc() + +" let Vundle manage Vundle +" required! +Bundle 'gmarik/vundle' +Bundle 'LaTeX-Box-Team/LaTeX-Box' +Bundle 'tpope/vim-fugitive' +Bundle 'scrooloose/nerdtree' +Bundle 'taglist.vim' +Bundle "MarcWeber/vim-addon-mw-utils" +Bundle "tomtom/tlib_vim" +Bundle "honza/snipmate-snippets" +Bundle "garbas/vim-snipmate" +Bundle "SpellCheck" + + +filetype plugin indent on " required! + +highlight SpecialKey ctermfg=DarkGray +set listchars=tab:>-,trail:~ +set list +set tabstop=4 +set shiftwidth=4 +autocmd BufRead *.py set smartindent cinwords=if,elif,else,for,while,try,except,finally,def,class +autocmd Filetype javascript set ts=4 sts=4 sw=4 expandtab smartindent cinwords=if,elif,else,for,while,try,except,finally,def,class +set expandtab +set autoindent +set smartindent +syntax on +set ignorecase +set smartcase +set softtabstop=4 +set number +"set paste +set mouse=a +set autochdir +set showmatch +set incsearch +set hlsearch + +"Better Map Leader +let mapleader="," +noremap \ , + + +"Latex +let g:tex_flavor = "latex" +set suffixes+=.log,.aux,.bbl,.blg,.idx,.ilg,.ind,.out,.pdf + +let g:LatexBox_latexmk_options="-pvc" +let g:LatexBox_output_type="pdf" +let g:LatexBox_viewer="okular --unique" + + +let tlist_tex_settings = 'latex;l:labels;s:sections;t:subsections;u:subsubsections' + + +" Commenting blocks of code. +autocmd FileType c,cpp,java,scala,javascript let b:comment_leader = '// ' +autocmd FileType sh,ruby,python let b:comment_leader = '# ' +autocmd FileType conf,fstab let b:comment_leader = '# ' +autocmd FileType tex let b:comment_leader = '% ' +autocmd FileType mail let b:comment_leader = '> ' +autocmd FileType vim let b:comment_leader = '" ' +noremap ,cc :silent s/^/=escape(b:comment_leader,'\/')/:nohlsearch +noremap ,cu :silent s/^\V=escape(b:comment_leader,'\/')//e:nohlsearch + +imap "+gP +noremap :w +imap :w + +"Custom maps +noremap n :NERDTreeToggle +noremap t :TlistToggle +"Omni + +set completeopt=longest,menuone +inoremap pumvisible() ? "\" : "\u\" +inoremap pumvisible() ? '' : + \ '=pumvisible() ? "\Down>" : ""' +inoremap pumvisible() ? '' : + \ '=pumvisible() ? "\Down>" : ""' +inoremap (pumvisible() ? (col('.') > 1 ? 'i' : 'i') : '') . + \ '=pumvisible() ? "\C-n>\C-p>\Down>" : ""' +set spell spelllang=en_gb + +" tab navigation like firefox +nnoremap :tabprevious +nnoremap :tabnext +nnoremap :tabnew +inoremap :tabpreviousi +inoremap :tabnexti +"inoremap :tabnew + + +" Save sessions +function! RestoreSession() +if argc() == 0 "vim called without arguments + execute 'source ~/.vim/Session.vim' + end +endfunction + +nmap Sq :mksession! ~/.vim/Session.vim:qa! +nmap SQ :mksession! ~/.vim/Session.vim:wqa +nmap SO :so ~/.vim/Session.vim + +"autocmd VimEnter * call RestoreSession() + +"Make tabs and buffers work better +:se switchbuf=usetab,newtab +":tab sball + +" Color and shit +"colo vividchalk + +"Statusline + +set statusline=%t%h%m%r%y%{fugitive#statusline()}\%=[%{strlen(&fenc)?&fenc:'none'},%{&ff}]\ \ %c,%l/%L\ %P +set laststatus=2 + +" Forward search +" function! PDFForward() +" " if filereadable(b:RootFileName.".".b:Ext) +" +" " silent! call system("okular --unique \"".b:RootFileName.".".b:Ext."\"\#src:".line('.').expand("%")." &") +" +" silent! call system(g:LatexBox_viewer . " \"".LatexBox_GetOutputFile()."#src:".line('.')."".expand("%:p")."\" &") +" " else +" " echo "Output file not readable." +" " endif +" endfunction + +" Encryption +set cm=blowfish +" Transparent editing of gpg encrypted files. diff --git a/zshrc b/zshrc new file mode 100644 index 0000000..3148b28 --- /dev/null +++ b/zshrc @@ -0,0 +1,70 @@ +# Lines configured by zsh-newuser-install +HISTFILE=~/.histfile +HISTSIZE=1000 +SAVEHIST=1000 +setopt appendhistory autocd extendedglob nomatch notify share_history +bindkey -v +# End of lines configured by zsh-newuser-install +# The following lines were added by compinstall +zstyle :compinstall filename '/home/balkian/.zshrc' + +autoload -Uz compinit +compinit +# End of lines added by compinstall + +autoload -U colors +colors +setopt prompt_subst + +local smiley="%B%(?,%{$fg[green]%}☠%{$reset_color%},%{$fg[red]%}☠%{$reset_color%})%b" +PS0='${debian_chroot:+($debian_chroot)}%n@%M' + +parse_git_branch() +{ +git name-rev HEAD 2> /dev/null | sed 's#HEAD\ \(.*\)#(git::\1)#' +} + +if ( dircolors --help && ls --color ) &> /dev/null; then +# For some reason, the unixs machines need me to use $HOME instead of ~ +# List files from highest priority to lowest. As soon as the loop finds one that works, it will exit. +function precmd { +PROMPT="%~ %{$fg[green]%}%B$(parse_git_branch)%b%{$reset_color%} +${smiley} $PS0: "; +RPROMPT="%T"; +} + +for POSSIBLE_DIR_COLORS in "$HOME/.dir_colors" "/etc/DIR_COLORS"; do + [[ -f "$POSSIBLE_DIR_COLORS" ]] && [[ -r "$POSSIBLE_DIR_COLORS" ]] && eval `dircolors -b "$POSSIBLE_DIR_COLORS"` && break +done + +alias ls="ls --color=auto" +alias ll="ls --color=auto -l" +alias grep='grep --color=auto' +alias fgrep='fgrep --color=auto' +alias egrep='egrep --color=auto' +else +# No color, so put a slash at the end of directory names, etc. to differentiate. +alias ll="ls -lF" +fi +## Completions +#autoload -U compinit +#compinit -C +# +### case-insensitive (all),partial-word and then substring completion +zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' \ + 'r:|[._-]=* r:|=*' 'l:|=* r:|=*' + +bindkey -M vicmd 'r' history-incremental-search-backward + +# TMUX +# if [[ -z "$KONSOLE_DBUS_SERVICE" & `which tmux` ]]; then + # if no session is started, start a new session + if [[ -z "$KONSOLE_DBUS_SERVICE" && -n $(which tmux) ]]; then + stty -ixon + test -z ${TMUX} && tmux attach + # when quitting tmux, try to attach + if [[ -z ${TMUX} ]]; then + exit; + fi + fi +