Added new vim colorscheme, updated prompt

Added smyck colorscheme, which I foud on reddit today.
Also, copied the prompt from zholman's dotfiles
This commit is contained in:
Nick Nisi
2012-05-01 16:28:44 -05:00
parent 7436670b87
commit 8c3757f789
5 changed files with 202 additions and 2 deletions

View File

@@ -0,0 +1,94 @@
" ----------------------------------------------------------------------------
" Vim color file
" Maintainer: John-Paul Bader <contact@smyck.org>
" Last Change: 2012 April
" License: Beer Ware
" ----------------------------------------------------------------------------
let g:colors_name = "smyck"
highlight clear Normal
set background=dark
set linespace=2
" Syntaxeinstellungen zuruecksetzen, wenn Syntax Highlighting aktiviert ist
if exists("syntax_on")
syntax reset
endif
hi Normal cterm=none ctermbg=none ctermfg=15 gui=none guibg=#242424 guifg=#F7F7F7
hi LineNr cterm=none ctermbg=none ctermfg=8 gui=none guibg=#242424 guifg=#8F8F8F
hi StatusLine cterm=none ctermbg=8 ctermfg=15 gui=none guibg=#5D5D5D guifg=#FBFBFB
hi StatusLineNC cterm=none ctermbg=15 ctermfg=8 gui=none guibg=#5D5D5D guifg=#FBFBFB
hi Search cterm=none ctermbg=6 ctermfg=15 gui=none guibg=#2EB5C1 guifg=#F7F7F7
hi IncSearch cterm=none ctermbg=3 ctermfg=8 gui=none guibg=#F6DC69 guifg=#8F8F8F
hi ColumnMargin cterm=none ctermbg=0 gui=none guibg=#000000
hi Error cterm=none ctermbg=1 ctermfg=15 gui=none guifg=#F7F7F7
hi ErrorMsg cterm=none ctermbg=1 ctermfg=15 gui=none guifg=#F7F7F7
hi Folded cterm=none ctermbg=8 ctermfg=2 gui=none guibg=#8F8F8F guifg=#C4E858
hi FoldColumn cterm=none ctermbg=8 ctermfg=2 gui=none guibg=#8F8F8F guifg=#C4E858
hi NonText cterm=bold ctermbg=none ctermfg=8 gui=bold guifg=#8F8F8F
hi ModeMsg cterm=bold ctermbg=none ctermfg=10 gui=none
hi Pmenu cterm=none ctermbg=8 ctermfg=15 gui=none guibg=#8F8F8F guifg=#F7F7F7
hi PmenuSel cterm=none ctermbg=15 ctermfg=8 gui=none guibg=#F7F7F7 guifg=#8F8F8F
hi PmenuSbar cterm=none ctermbg=15 ctermfg=8 gui=none guibg=#F7F7F7 guifg=#8F8F8F
hi SpellBad cterm=none ctermbg=1 ctermfg=15 gui=none guifg=#F7F7F7
hi SpellCap cterm=none ctermbg=4 ctermfg=15 gui=none guifg=#F7F7F7
hi SpellRare cterm=none ctermbg=4 ctermfg=15 gui=none guifg=#F7F7F7
hi SpellLocal cterm=none ctermbg=4 ctermfg=15 gui=none guifg=#F7F7F7
hi Visual cterm=none ctermbg=15 ctermfg=8 gui=none guibg=#F7F7F7 guifg=#8F8F8F
hi Directory cterm=none ctermbg=none ctermfg=4 gui=none guibg=#242424 guifg=#88CCE7
hi SpecialKey cterm=none ctermbg=none ctermfg=8 gui=none guifg=#8F8F8F
hi DiffAdd cterm=bold ctermbg=2 ctermfg=15
hi DiffChange cterm=bold ctermbg=4 ctermfg=15
hi DiffDelete cterm=bold ctermbg=1 ctermfg=15
hi DiffText cterm=bold ctermbg=3 ctermfg=8
hi MatchParen cterm=none ctermbg=6 ctermfg=15 gui=none guibg=#2EB5C1 guifg=#F7F7F7
hi CursorLine cterm=none ctermbg=238 ctermfg=none gui=none guibg=#424242
hi Title cterm=none ctermbg=none ctermfg=4 gui=none guifg=#88CCE7
" ----------------------------------------------------------------------------
" Syntax Highlighting
" ----------------------------------------------------------------------------
hi Keyword cterm=none ctermbg=none ctermfg=10 gui=none guifg=#D1FA71
hi Comment cterm=none ctermbg=none ctermfg=8 gui=none guifg=#8F8F8F
hi Delimiter cterm=none ctermbg=none ctermfg=15 gui=none guifg=#F7F7F7
hi Identifier cterm=none ctermbg=none ctermfg=12 gui=none guifg=#96D9F1
hi Structure cterm=none ctermbg=none ctermfg=12 gui=none guifg=#9DEEF2
hi Ignore cterm=none ctermbg=none ctermfg=8 gui=none guifg=bg
hi Constant cterm=none ctermbg=none ctermfg=12 gui=none guifg=#96D9F1
hi PreProc cterm=none ctermbg=none ctermfg=10 gui=none guifg=#D1FA71
hi Type cterm=none ctermbg=none ctermfg=12 gui=none guifg=#96D9F1
hi Statement cterm=none ctermbg=none ctermfg=10 gui=none guifg=#D1FA71
hi Special cterm=none ctermbg=none ctermfg=6 gui=none guifg=#d7d7d7
hi String cterm=none ctermbg=none ctermfg=3 gui=none guifg=#F6DC69
hi Number cterm=none ctermbg=none ctermfg=3 gui=none guifg=#F6DC69
hi Underlined cterm=underline gui=underline
hi Symbol cterm=none ctermbg=none ctermfg=9 gui=none guifg=#FAB1AB
hi Method cterm=none ctermbg=none ctermfg=15 gui=none guifg=#F7F7F7
hi Interpolation cterm=none ctermbg=none ctermfg=6 gui=none guifg=#2EB5C1
" Erlang
hi link erlangAtom Keyword
hi link erlangBitType Keyword
hi link rubyBeginend Keyword
hi link rubyClass Keyword
hi link rubyModule Keyword
hi link rubyKeyword Keyword
hi link rubyOperator Method
hi link rubyIdentifier Keyword
hi link rubyClassVariable Symbol
hi link rubyInstanceVariable Constant
hi link rubyGlobalVariable Constant
hi link rubyClassVariable Method
hi link rubyConstant Constant
hi link rubySymbol Symbol
hi link rubyFunction Constant
hi link rubyControl Keyword
hi link rubyConditional Keyword
hi link rubyInterpolation Interpolation
hi link rubyInterpolationDelimiter Interpolation
hi link rubyRailsMethod Method

View File

@@ -112,7 +112,7 @@ set tm=500
syntax on
set background=dark
colorscheme jellybeans
"colorscheme jellybeans
"colorscheme xorium
"colorscheme molokai
"colorscheme ir_black
@@ -121,6 +121,7 @@ colorscheme jellybeans
"colorscheme vividchalk
"colorscheme desert
"colorscheme solarized
colorscheme smyck
set number " show line numbers
@@ -175,6 +176,8 @@ nnoremap K :q<cr>
" remove extra whitespace
nmap <leader><space> :%s/\s\+$<cr>
nmap <leader>, :w<cr>
" set paste toggle
set pastetoggle=<F6>

View File

@@ -16,7 +16,8 @@ setopt APPEND_HISTORY
setopt COMPLETE_ALIASES
export PS1='%3~ ☠ '
#export PS1='%3~ ☠ '
#export PS1='%3~$(git_info_for_prompt) ☠ '
# make terminal command navigation sane again
bindkey '^[^[[D' backward-word

83
zsh/prompt.zsh Normal file
View File

@@ -0,0 +1,83 @@
autoload colors && colors
# cheers, @ehrenmurdick
# http://github.com/ehrenmurdick/config/blob/master/zsh/prompt.zsh
git_branch() {
echo $(/usr/bin/git symbolic-ref HEAD 2>/dev/null | awk -F/ {'print $NF'})
}
git_dirty() {
st=$(/usr/bin/git status 2>/dev/null | tail -n 1)
if [[ $st == "" ]]
then
echo ""
else
if [[ $st == "nothing to commit (working directory clean)" ]]
then
echo "on %{$fg_bold[green]%}$(git_prompt_info)%{$reset_color%}"
else
echo "on %{$fg_bold[red]%}$(git_prompt_info)%{$reset_color%}"
fi
fi
}
git_prompt_info () {
ref=$(/usr/bin/git symbolic-ref HEAD 2>/dev/null) || return
# echo "(%{\e[0;33m%}${ref#refs/heads/}%{\e[0m%})"
echo "${ref#refs/heads/}"
}
unpushed () {
/usr/bin/git cherry -v @{upstream} 2>/dev/null
}
need_push () {
if [[ $(unpushed) == "" ]]
then
echo " "
else
echo " with %{$fg_bold[magenta]%}unpushed%{$reset_color%} "
fi
}
rb_prompt(){
if $(which rbenv &> /dev/null)
then
echo "%{$fg_bold[yellow]%}$(rbenv version | awk '{print $1}')%{$reset_color%}"
else
echo ""
fi
}
# This keeps the number of todos always available the right hand side of my
# command line. I filter it to only count those tagged as "+next", so it's more
# of a motivation to clear out the list.
todo(){
if $(which todo.sh &> /dev/null)
then
num=$(echo $(todo.sh ls +next | wc -l))
let todos=num-2
if [ $todos != 0 ]
then
echo "$todos"
else
echo ""
fi
else
echo ""
fi
}
directory_name(){
echo "%{$fg_bold[cyan]%}%1/%\/%{$reset_color%}"
}
export PROMPT=$'\n$(rb_prompt) in $(directory_name) $(git_dirty)$(need_push)\n '
set_prompt () {
export RPROMPT="%{$fg_bold[cyan]%}$(todo)%{$reset_color%}"
}
precmd() {
title "zsh" "%m" "%55<...<%~"
set_prompt
}

19
zsh/window.zsh Normal file
View File

@@ -0,0 +1,19 @@
# From http://dotfiles.org/~_why/.zshrc
# Sets the window title nicely no matter where you are
function title() {
# escape '%' chars in $1, make nonprintables visible
a=${(V)1//\%/\%\%}
# Truncate command, and join lines.
a=$(print -Pn "%40>...>$a" | tr -d "\n")
case $TERM in
screen)
print -Pn "\ek$a:$3\e\\" # screen title (in ^A")
;;
xterm*|rxvt)
print -Pn "\e]2;$2\a" # plain xterm title ($3 for pwd)
;;
esac
}