Last active
August 29, 2015 14:15
-
-
Save okhiroyuki/de748c9579266a14834c to your computer and use it in GitHub Desktop.
Linux-dotfiles
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# .bash_profile | |
# Get the aliases and functions | |
if [ -f ~/.bashrc ]; then | |
. ~/.bashrc | |
fi | |
# User specific environment and startup programs | |
PATH=$PATH:$HOME/bin:/usr/lib/ruby/gems/1.8 | |
export PATH |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# .bashrc | |
# Source global definitions | |
if [ -f /etc/bashrc ]; then | |
. /etc/bashrc | |
fi | |
# User specific aliases and functions | |
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" | |
PATH="$PATH":/usr/bin:/usr/sbin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
autodetach on | |
bell_msg "^G" | |
defkanji utf-8 | |
defencoding utf-8 | |
encoding utf-8 utf-8 | |
defscrollback 10000 | |
escape ^z^z | |
startup_message off | |
vbell off | |
caption always "%{= wb} %-w%{=bu dr}%n %t%{-}%+w %= %{=b wk} [%l] %{=b wb}%y/%m/%d" | |
bind n screen | |
bind h prev | |
bind j next | |
bind l windowlist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set nocompatible | |
filetype off | |
" Vundle | |
set rtp+=~/.vim/bundle/vundle/ | |
call vundle#rc() | |
" 利用中のプラグインをBundle | |
Bundle 'gmark/vundle' | |
Bundle 'rails.vim' | |
Bundle 'surround.vim' | |
Bundle 'vim-ruby/vim-ruby' | |
Bundle 'neocomplcache' | |
filetype plugin indent on | |
syntax enable | |
set mouse=a | |
set ignorecase | |
set ttymouse=xterm2 | |
set smartcase | |
"--------------------------------------------------------------------------- | |
set autoindent | |
set backspace=2 | |
set wrapscan | |
set showmatch | |
set wildmenu | |
set formatoptions+=mM | |
let format_allow_over_tw = 1" ぶら下り可能幅 | |
"--------------------------------------------------------------------------- | |
set nonumber | |
set ruler | |
set nolist | |
set nowrap | |
set laststatus=2 | |
set cmdheight=2 | |
set showcmd | |
set title | |
set tabstop=2 | |
set softtabstop=2 | |
set shiftwidth=2 | |
"--------------------------------------------------------------------------- | |
" 文字コードの自動認識 | |
if &encoding !=# 'utf-8' | |
set encoding=japan | |
set fileencoding=japan | |
endif | |
if has('iconv') | |
let s:enc_euc = 'euc-jp' | |
let s:enc_jis = 'iso-2022-jp' | |
" iconvがeucJP-msに対応しているかをチェック | |
if iconv("\x87\x64\x87\x6a", 'cp932', 'eucjp-ms') ==# "\xad\xc5\xad\xcb" | |
let s:enc_euc = 'eucjp-ms' | |
let s:enc_jis = 'iso-2022-jp-3' | |
" iconvがJISX0213に対応しているかをチェック | |
elseif iconv("\x87\x64\x87\x6a", 'cp932', 'euc-jisx0213') ==# "\xad\xc5\xad\xcb" | |
let s:enc_euc = 'euc-jisx0213' | |
let s:enc_jis = 'iso-2022-jp-3' | |
endif | |
" fileencodingsを構築 | |
if &encoding ==# 'utf-8' | |
let s:fileencodings_default = &fileencodings | |
let &fileencodings = s:enc_jis .','. s:enc_euc .',cp932' | |
let &fileencodings = &fileencodings .','. s:fileencodings_default | |
unlet s:fileencodings_default | |
else | |
let &fileencodings = &fileencodings .','. s:enc_jis | |
set fileencodings+=utf-8,ucs-2le,ucs-2 | |
if &encoding =~# '^\(euc-jp\|euc-jisx0213\|eucjp-ms\)$' | |
set fileencodings+=cp932 | |
set fileencodings-=euc-jp | |
set fileencodings-=euc-jisx0213 | |
set fileencodings-=eucjp-ms | |
let &encoding = s:enc_euc | |
let &fileencoding = s:enc_euc | |
else | |
let &fileencodings = &fileencodings .','. s:enc_euc | |
endif | |
endif | |
" 定数を処分 | |
unlet s:enc_euc | |
unlet s:enc_jis | |
endif | |
" 日本語を含まない場合は fileencoding に encoding を使うようにする | |
if has('autocmd') | |
function! AU_ReCheck_FENC() | |
if &fileencoding =~# 'iso-2022-jp' && search("[^\x01-\x7e]", 'n') == 0 | |
let &fileencoding=&encoding | |
endif | |
endfunction | |
autocmd BufReadPost * call AU_ReCheck_FENC() | |
endif | |
" 改行コードの自動認識 | |
set fileformats=unix,dos,mac | |
" □とか○の文字があってもカーソル位置がずれないようにする | |
if exists('&ambiwidth') | |
set ambiwidth=double | |
endif | |
" neocomplcache | |
let g:neocomplcache_enable_at_startup = 1 | |
let g:neocomplcache_enable_smart_case = 1 | |
let g:neocomplcache_enable_camel_case_completion = 0 | |
let g:neocomplcache_enable_underbar_completion = 1 | |
let g:neocomplcache_min_syntax_length = 3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment