Hatena::ブログ(Diary)

名称未設定の日記 このページをアンテナに追加 RSSフィード

2010-08-17 このエントリーを含むブックマーク このエントリーのブックマークコメント

# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples

# If not running interactively, don't do anything
[ -z "$PS1" ] && return

# 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

# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)

# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize

# make less more friendly for non-text input files, see lesspipe(1)
#[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"

# 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

# set a fancy prompt (non-color, unless we know we "want" color)
case "$TERM" in
    xterm-color) color_prompt=yes;;
esac

# uncomment for a colored prompt, if the terminal has the capability; turned
# off by default to not distract the user: the focus in a terminal window
# should be on the output of commands, not on the prompt
#force_color_prompt=yes

if [ -n "$force_color_prompt" ]; then
    if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
	# We have color support; assume it's compliant with Ecma-48
	# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
	# a case would tend to support setf rather than setaf.)
	color_prompt=yes
    else
	color_prompt=
    fi
fi

if [ "$color_prompt" = yes ]; then
    PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
else
    PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
fi
unset color_prompt force_color_prompt

# 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

# Alias definitions.
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
# See /usr/share/doc/bash-doc/examples in the bash-doc package.

#if [ -f ~/.bash_aliases ]; then
#    . ~/.bash_aliases
#fi

# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
    test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
    alias ls='ls --color=auto'
    #alias dir='dir --color=auto'
    #alias vdir='vdir --color=auto'

    #alias grep='grep --color=auto'
    #alias fgrep='fgrep --color=auto'
    #alias egrep='egrep --color=auto'
fi

# some more ls aliases
#alias ll='ls -l'
#alias la='ls -A'
#alias l='ls -CF'

# 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
# .zshrc
# User specific aliases and functions

alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'

# alias ls="ls -aFh --color=auto --show-control-chars"
alias ls="ls -aFGh"
alias la="ls -aF"
alias ll="ls -l"

alias rm="rm -i"
alias rmback="rm *~;rm .*~;rm *.bak"

alias cp="cp -i"

alias h="history"
alias x="exit"

# forbid C-s
stty stop undef

# History
HISTFILE=$HOME/.zsh-history
HISTSIZE=100000
SAVEHIST=100000
setopt extended_history
function history-all { history -E 1 }

setopt share_history

# Auto Complete
autoload -U compinit
compinit

# Prompt
local PURPLE=$'%{^[[35m%}'
local RED=$'%{^[[31m%}'
local DEFAULT=$'%{^[[m%}'
" ブラウザタイトル
set titlestring=Firefox

" beep音ではなくvisualbell
set visualbell

" 詳細表示レベル
set verbose=9

" jk移動を5行づつ
map j 5<C-e>
map k 5<C-y>

" h/l に戻るや進むを割り当て
map h <A-Left>
map l <A-Right>

" H/L や ← → でタブ移動
map H gT
map L gt
map <Left>  gT
map <Right> gt

" Shift + ← → で現在のタブの位置変更
map <S-Right> :tabmove! +1<CR>
map <S-Left>  :tabmove! -1<CR>

autocmd LocationChange .* :fmapc
autocmd LocationChange mail\\.google\\.com/mail :fmap! -depth 4 c / j k n p o u e x s r a # [ ] z ? gi gs gt gd ga gc
autocmd LocationChange www\\.google\\.co\\.jp/reader :fmap! -vkey j k n p m s t v A r S N P X O gh ga gs gt gu u / ?
autocmd LocationChange 'www\\.google\\.com/calendar/' :fmap! -vkey -event keydown t a d w m x c e <Del> / + q s ?
autocmd LocationChange 'www\.tumblr\.com/dashboard' :js window.document.key_commands_are_suspended = true;

" 検索結果をハイライト
set hlsearch

"コピー&ペーストなどOSのショートカットが効くように
inoremap <C-a> <C-v><C-a>
inoremap <C-z> <C-v><C-z>
inoremap <C-x> <C-v><C-x>
inoremap <C-c> <C-v><C-c>
inoremap <C-v> <C-v><C-v>
cnoremap <C-a> <C-v><C-a>
cnoremap <C-z> <C-v><C-z>
cnoremap <C-x> <C-v><C-x>
cnoremap <C-c> <C-v><C-c>
cnoremap <C-v> <C-v><C-v>

" direct_bookmark pluginの設定
" h:はてな d:delicious l:livedoorclip
let g:direct_sbm_use_services_by_tag = 'd'
let g:direct_sbm_use_services_by_post = 'd'

"テキストボックスなど入力欄にフォーカスを奪われるのを防ぐ
set focuscontent

" 特定のサイトでは無効化
autocmd LocationChange .* js modes.passAllKeys = false
autocmd LocationChange www\\.google\\.(co\\.jp|com)/reader js modes.passAllKeys = true

" リンク先をコマンドラインに表示
set showstatuslinks=2

cmap <C-j> <Nop>

" 補完リストの選択をC-n,C-pで
cmap <C-n> <TAB>
cmap <C-p> <S-TAB>

let g:auto_append_anchor = "true"

let g:hintsio="io"
let g:hintchars="HJKLASDFGYUIOPQWERTNMZXCVB"

javascript <<EOM
    liberator.globalVariables.migrate_elements = [
        {
           // star button of awesome bar
           id:    'star-button',
           dest:  'security-button',
           after: true,
        },
        {
            // icon that show the existence of RSS and Atom on current page
            id:    'feed-button',
            dest:  'security-button',
           after: true,
        },
        {
            // favicon of awesome bar
           id:    'page-proxy-stack',
           dest:  'liberator-statusline',
           after: false,
        }
   ];
EOM

" ColorScheme
colorscheme evening2

" 読み込んだ事を出力
echo ".vimperatorrc sourced"
" .vimperator/colors/hoge.vimp
" ==VimperatorColorSchema==
" name: hoge
" ==/VimperatorColorSchema==

hi StatusLine           color: #333;      background: #ddd;

hi Normal               color: #ddd;      background: #333;
hi InfoMsg              color: #ddd;      background: #333;
hi ModeMsg              color: #ddd;      background: #333;
hi MoreMsg              color: limegreen; background: #333;
hi LineNr               color: yellow;    background: #333;
hi Question             color: limegreen; background: #333;
hi WarningMsg           color: yellow;    background: #333;
hi NonText                                background: #333;

hi CompTitle            color: DarkOrange;background: black;
hi CompItem[selected]   color: #333;      background: Khaki;

hi Title                color: Orchid;
hi Indicator            color: DodgerBlue;
hi String               color: Orchid;
hi Number               color: Orchid;
hi Object               color: SkyBlue;
hi Function             color: Khaki;
hi URL                  color: GreenYellow;

hi TabNumber            color: DarkOrange;
hi TabText              color: #333;

hi GradientLeft 	background-color: #ddd;
hi GradientRight 	background-color: #333;

style -name statusbar chrome://* <<EOM
#status-bar statusbarpanel { padding: 0 1px !important; }
statusbarpanel > * { margin: 0 !important; padding: 0 !important; }
EOM

ldrize_cooperation.js

lookupDictionary.js

feedSomeKeys_2.js

direct_bookmark.js

migratestatusbar.js

0000-00-00 このエントリーを含むブックマーク このエントリーのブックマークコメント

# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples

# If not running interactively, don't do anything
[ -z "$PS1" ] && return

# 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

# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)

# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize

# make less more friendly for non-text input files, see lesspipe(1)
#[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"

# 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

# set a fancy prompt (non-color, unless we know we "want" color)
case "$TERM" in
    xterm-color) color_prompt=yes;;
esac

# uncomment for a colored prompt, if the terminal has the capability; turned
# off by default to not distract the user: the focus in a terminal window
# should be on the output of commands, not on the prompt
#force_color_prompt=yes

if [ -n "$force_color_prompt" ]; then
    if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
	# We have color support; assume it's compliant with Ecma-48
	# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
	# a case would tend to support setf rather than setaf.)
	color_prompt=yes
    else
	color_prompt=
    fi
fi

if [ "$color_prompt" = yes ]; then
    PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
else
    PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
fi
unset color_prompt force_color_prompt

# 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

# Alias definitions.
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
# See /usr/share/doc/bash-doc/examples in the bash-doc package.

#if [ -f ~/.bash_aliases ]; then
#    . ~/.bash_aliases
#fi

# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
    test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
    alias ls='ls --color=auto'
    #alias dir='dir --color=auto'
    #alias vdir='vdir --color=auto'

    #alias grep='grep --color=auto'
    #alias fgrep='fgrep --color=auto'
    #alias egrep='egrep --color=auto'
fi

# some more ls aliases
#alias ll='ls -l'
#alias la='ls -A'
#alias l='ls -CF'

# 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
# .zshrc
# User specific aliases and functions

alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'

# alias ls="ls -aFh --color=auto --show-control-chars"
alias ls="ls -aFGh"
alias la="ls -aF"
alias ll="ls -l"

alias rm="rm -i"
alias rmback="rm *~;rm .*~;rm *.bak"

alias cp="cp -i"

alias h="history"
alias x="exit"

# forbid C-s
stty stop undef

# History
HISTFILE=$HOME/.zsh-history
HISTSIZE=100000
SAVEHIST=100000
setopt extended_history
function history-all { history -E 1 }

setopt share_history

# Auto Complete
autoload -U compinit
compinit

# Prompt
local PURPLE=$'%{^[[35m%}'
local RED=$'%{^[[31m%}'
local DEFAULT=$'%{^[[m%}'
" ブラウザタイトル
set titlestring=Firefox

" beep音ではなくvisualbell
set visualbell

" 詳細表示レベル
set verbose=9

" jk移動を5行づつ
map j 5<C-e>
map k 5<C-y>

" h/l に戻るや進むを割り当て
map h <A-Left>
map l <A-Right>

" H/L や ← → でタブ移動
map H gT
map L gt
map <Left>  gT
map <Right> gt

" Shift + ← → で現在のタブの位置変更
map <S-Right> :tabmove! +1<CR>
map <S-Left>  :tabmove! -1<CR>

autocmd LocationChange .* :fmapc
autocmd LocationChange mail\\.google\\.com/mail :fmap! -depth 4 c / j k n p o u e x s r a # [ ] z ? gi gs gt gd ga gc
autocmd LocationChange www\\.google\\.co\\.jp/reader :fmap! -vkey j k n p m s t v A r S N P X O gh ga gs gt gu u / ?
autocmd LocationChange 'www\\.google\\.com/calendar/' :fmap! -vkey -event keydown t a d w m x c e <Del> / + q s ?
autocmd LocationChange 'www\.tumblr\.com/dashboard' :js window.document.key_commands_are_suspended = true;

" 検索結果をハイライト
set hlsearch

"コピー&ペーストなどOSのショートカットが効くように
inoremap <C-a> <C-v><C-a>
inoremap <C-z> <C-v><C-z>
inoremap <C-x> <C-v><C-x>
inoremap <C-c> <C-v><C-c>
inoremap <C-v> <C-v><C-v>
cnoremap <C-a> <C-v><C-a>
cnoremap <C-z> <C-v><C-z>
cnoremap <C-x> <C-v><C-x>
cnoremap <C-c> <C-v><C-c>
cnoremap <C-v> <C-v><C-v>

" direct_bookmark pluginの設定
" h:はてな d:delicious l:livedoorclip
let g:direct_sbm_use_services_by_tag = 'd'
let g:direct_sbm_use_services_by_post = 'd'

"テキストボックスなど入力欄にフォーカスを奪われるのを防ぐ
set focuscontent

" 特定のサイトでは無効化
autocmd LocationChange .* js modes.passAllKeys = false
autocmd LocationChange www\\.google\\.(co\\.jp|com)/reader js modes.passAllKeys = true

" リンク先をコマンドラインに表示
set showstatuslinks=2

cmap <C-j> <Nop>

" 補完リストの選択をC-n,C-pで
cmap <C-n> <TAB>
cmap <C-p> <S-TAB>

let g:auto_append_anchor = "true"

let g:hintsio="io"
let g:hintchars="HJKLASDFGYUIOPQWERTNMZXCVB"

javascript <<EOM
    liberator.globalVariables.migrate_elements = [
        {
           // star button of awesome bar
           id:    'star-button',
           dest:  'security-button',
           after: true,
        },
        {
            // icon that show the existence of RSS and Atom on current page
            id:    'feed-button',
            dest:  'security-button',
           after: true,
        },
        {
            // favicon of awesome bar
           id:    'page-proxy-stack',
           dest:  'liberator-statusline',
           after: false,
        }
   ];
EOM

" ColorScheme
colorscheme evening2

" 読み込んだ事を出力
echo ".vimperatorrc sourced"
" .vimperator/colors/hoge.vimp
" ==VimperatorColorSchema==
" name: hoge
" ==/VimperatorColorSchema==

hi StatusLine           color: #333;      background: #ddd;

hi Normal               color: #ddd;      background: #333;
hi InfoMsg              color: #ddd;      background: #333;
hi ModeMsg              color: #ddd;      background: #333;
hi MoreMsg              color: limegreen; background: #333;
hi LineNr               color: yellow;    background: #333;
hi Question             color: limegreen; background: #333;
hi WarningMsg           color: yellow;    background: #333;
hi NonText                                background: #333;

hi CompTitle            color: DarkOrange;background: black;
hi CompItem[selected]   color: #333;      background: Khaki;

hi Title                color: Orchid;
hi Indicator            color: DodgerBlue;
hi String               color: Orchid;
hi Number               color: Orchid;
hi Object               color: SkyBlue;
hi Function             color: Khaki;
hi URL                  color: GreenYellow;

hi TabNumber            color: DarkOrange;
hi TabText              color: #333;

hi GradientLeft 	background-color: #ddd;
hi GradientRight 	background-color: #333;

style -name statusbar chrome://* <<EOM
#status-bar statusbarpanel { padding: 0 1px !important; }
statusbarpanel > * { margin: 0 !important; padding: 0 !important; }
EOM

ldrize_cooperation.js

lookupDictionary.js

feedSomeKeys_2.js

direct_bookmark.js

migratestatusbar.js