Skip to content

Commit 8b74326

Browse files
author
Kazuaki NAKAMURA
committed
Primary Condition
0 parents  commit 8b74326

19 files changed

+448
-0
lines changed

.aliases

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
alias g='git'
2+
alias l='ls -lFh'
3+
alias mv='mv -v'
4+
alias rm='rm -i -v'
5+
alias cp='cp -v'
6+
7+
alias c='pygmentize -O style=monokai -f console256 -g'
8+
alias ip='dig +short myip.opendns.com @resolver1.opendns.com'
9+
alias dig='dig +nocmd any +multiline +noall +answer'
10+
alias dsstore="find . -name '*.DS_Store' -type f -ls -delete"
11+
alias diskspace="df -P -kHl"
12+
13+
alias repos='ghq list -p | peco'
14+
alias repo='cd $(repos)'
15+
alias github='gh-open $(repos)'
16+
alias reload='exec -l $SHELL'
17+
alias tower='open -a Tower $1'
18+
alias sublime='open -a Sublime\ Text $1'
19+
alias vscode='open -a Visual\ Studio\ Code $1'
20+
alias atom='open -a Atom $1 $1'

.editorconfig

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[*]
2+
indent_style = space
3+
indent_size = 2
4+
end_of_line = lf
5+
charset = utf-8
6+
trim_trailing_whitespace = true
7+
insert_final_newline = true
8+
9+
[*.md]
10+
trim_trailing_whitespace = false

.exports

Whitespace-only changes.

.functions

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
function update() {
2+
# update antigen
3+
pushd ~/.antigen;git pull origin master;popd;
4+
5+
antigen update
6+
gem update
7+
brew update
8+
brew upgrade
9+
10+
# update version managers
11+
pushd ~/.nodenv;git pull origin master;popd;
12+
pushd ~/.nodenv/plugins/node-build;git pull origin master;popd;
13+
pushd ~/.rbenv;git pull origin master;popd;
14+
pushd ~/.rbenv/plugins/ruby-build;git pull origin master;popd;
15+
pushd ~/.pyenv;git pull origin master;popd;
16+
pushd ~/.plenv;git pull origin master;popd;
17+
pushd ~/.plenv/plugins/perl-build;git pull origin master;popd;
18+
clear
19+
}
20+
21+
function clean() {
22+
gem cleanup
23+
brew cleanup -s
24+
antigen cleanup
25+
}
26+
27+
function compare() {
28+
echo "original size (bytes): $(cat "$1" | wc -c)"
29+
echo " gzip size (bytes): $(gzip -c "$1" | wc -c)"
30+
echo " zopfli size (bytes): $(zopfli -c "$1" | wc -c)"
31+
echo " brotli size (bytes): $(bro --input "$1" | wc -c)"
32+
}

.gemrc

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
install: --no-document
2+
update: --no-document

.gitattributes

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
*.mp3 filter=lfs -crlf
2+
*.zip filter=lfs -crlf
3+
*.psd filter=lfs -crlf
4+
*.sketch filter=lfs -crlf

.gitconfig

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
[user]
2+
name = 1000ch
3+
4+
[core]
5+
deltaBaseCacheLimit = 1G
6+
editor = vim
7+
[mergetool]
8+
keepBackup = true
9+
[filter "media"]
10+
clean = git-media-clean %f
11+
smudge = git-media-smudge %f
12+
[pager]
13+
diff = diff-so-fancy | less --tabs=4 -RFX
14+
show = diff-so-fancy | less --tabs=4 -RFX
15+
[color]
16+
ui = always
17+
[color "diff"]
18+
meta = yellow bold
19+
commit = green bold
20+
frag = magenta bold
21+
old = red bold
22+
new = green bold
23+
whitespace = red reverse
24+
[color "diff-highlight"]
25+
oldNormal = red bold
26+
oldHighlight = "red bold 52"
27+
newNormal = "green bold"
28+
newHighlight = "green bold 22"
29+
[color "branch"]
30+
current = yellow reverse
31+
local = yellow
32+
remote = green
33+
[color "status"]
34+
added = yellow
35+
changed = green
36+
untracked = cyan
37+
[filter "lfs"]
38+
smudge = git-lfs smudge -- %f
39+
required = true
40+
clean = git-lfs clean -- %f
41+
[ghq]
42+
root = ~/workspace

.macos

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Ask for the administrator password upfront
2+
sudo -v
3+
4+
# Keep-alive: update existing `sudo` time stamp until `.osx` has finished
5+
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
6+
7+
###############################################################################
8+
# General UI/UX #
9+
###############################################################################
10+
11+
# Menu bar: disable transparency
12+
defaults write NSGlobalDomain AppleEnableMenuBarTransparency -bool false
13+
14+
# Set highlight color to green
15+
defaults write NSGlobalDomain AppleHighlightColor -string "0.764700 0.976500 0.568600"
16+
17+
# Set sidebar icon size to medium
18+
defaults write NSGlobalDomain NSTableViewDefaultSizeMode -int 2

.vimrc

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
source ~/.vimrc.plugins
2+
source ~/.vimrc.encoding
3+
source ~/.vimrc.basic
4+
source ~/.vimrc.editor

.vimrc.basic

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
set title
2+
set mouse=a
3+
set whichwrap=b,s,h,l,<,>,[,]
4+
set autoread
5+
set showcmd
6+
set noswapfile
7+
set nobackup
8+
set showmode
9+
set ruler

.vimrc.editor

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
set number
2+
set autoindent
3+
set smartindent
4+
set expandtab
5+
set tabstop=4
6+
set softtabstop=4
7+
set shiftwidth=2
8+
syntax on
9+
set wildmenu
10+
set cursorline
11+
set hlsearch
12+
set ignorecase
13+
set smartcase
14+
set incsearch
15+
set backspace=indent,eol,start
16+
set showmatch
17+
18+
autocmd FileType json setlocal shiftwidth=2 tabstop=2 softtabstop=2
19+
autocmd FileType yaml setlocal shiftwidth=2 tabstop=2 softtabstop=2
20+
autocmd FileType yml setlocal shiftwidth=2 tabstop=2 softtabstop=2
21+
autocmd FileType xml setlocal shiftwidth=2 tabstop=2 softtabstop=2
22+
autocmd FileType sh setlocal shiftwidth=2 tabstop=2 softtabstop=2
23+
autocmd FileType zsh setlocal shiftwidth=2 tabstop=2 softtabstop=2
24+
autocmd FileType html setlocal shiftwidth=2 tabstop=2 softtabstop=2
25+
autocmd FileType css setlocal shiftwidth=2 tabstop=2 softtabstop=2
26+
autocmd FileType js setlocal shiftwidth=2 tabstop=2 softtabstop=2

.vimrc.encoding

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
set encoding=utf-8
2+
set ffs=unix,dos,mac

.vimrc.plugins

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
let s:dein_dir = expand('~/.vim')
2+
let s:dein_repo_dir = s:dein_dir . '/repos/github.com/Shougo/dein.vim'
3+
4+
if &runtimepath !~# '/dein.vim'
5+
if !isdirectory(s:dein_repo_dir)
6+
execute '!git clone https://github.com/Shougo/dein.vim' s:dein_repo_dir
7+
endif
8+
execute 'set runtimepath^=' . s:dein_repo_dir
9+
endif
10+
11+
call dein#begin('~/.vim')
12+
13+
call dein#add('Shougo/neocomplete.vim')
14+
call dein#add('scrooloose/nerdtree')
15+
call dein#add('jistr/vim-nerdtree-tabs')
16+
call dein#add('vim-syntastic/syntastic')
17+
call dein#add('mtscout6/syntastic-local-eslint.vim')
18+
call dein#add('1000ch/syntastic-local-stylelint.vim')
19+
call dein#add('powerline/powerline')
20+
21+
call dein#end()
22+
23+
if dein#check_install()
24+
call dein#install()
25+
endif
26+
27+
autocmd FileType css setlocal omnifunc=csscomplete#CompleteCSS
28+
autocmd FileType html,markdown setlocal omnifunc=htmlcomplete#CompleteTags
29+
autocmd FileType javascript setlocal omnifunc=javascriptcomplete#CompleteJS
30+
autocmd FileType python setlocal omnifunc=pythoncomplete#Complete
31+
autocmd FileType xml setlocal omnifunc=xmlcomplete#CompleteTags
32+
33+
" NeoComplete
34+
let g:neocomplete#enable_at_startup = 1
35+
inoremap <expr><TAB> pumvisible() ? "\<C-n>" : "\<TAB>"
36+
37+
" NERDTree
38+
let NERDTreeShowHidden = 1
39+
40+
" NERDTree tabs
41+
let g:nerdtree_tabs_open_on_console_startup = 1
42+
let g:nerdtree_tabs_focus_on_files = 1
43+
44+
" syntastic
45+
set statusline+=%#warningmsg#
46+
set statusline+=%{SyntasticStatuslineFlag()}
47+
set statusline+=%*
48+
49+
let g:syntastic_javascript_checkers = ['eslint']
50+
let g:syntastic_css_checkers = ['stylelint']
51+
let g:syntastic_always_populate_loc_list = 1
52+
let g:syntastic_auto_loc_list = 1
53+
let g:syntastic_check_on_open = 1
54+
let g:syntastic_check_on_wq = 0
55+
56+
" powerline
57+
set rtp+=~/.vim/repos/github.com/powerline/powerline/powerline/bindings/vim

.zprofile

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
for file in ~/.{exports,aliases,functions}; do
2+
[ -r "$file" ] && source "$file"
3+
done
4+
5+
function powerline_precmd() {
6+
PS1="$(~/.powerline-shell/powerline-shell.py $? --shell zsh 2> /dev/null)"
7+
}
8+
9+
function install_powerline_precmd() {
10+
for s in "${precmd_functions[@]}"; do
11+
if [ "$s" = "powerline_precmd" ]; then
12+
return
13+
fi
14+
done
15+
precmd_functions+=(powerline_precmd)
16+
}
17+
18+
if [ "$TERM" != "linux" ]; then
19+
install_powerline_precmd
20+
fi
21+
22+
if [ -n "$LS_COLORS" ]; then
23+
zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
24+
fi
25+
26+
# prompt
27+
PROMPT="%F{red}[alpaca]%~%f %# "
28+
29+
# lang
30+
export LANG=ja_JP.UTF-8
31+
32+
# show japanese files
33+
setopt print_eight_bit
34+
35+
# set comment as #
36+
setopt interactive_comments
37+
38+
# nodenv
39+
export NODENV_ROOT="$HOME/.nodenv"
40+
export PATH="$NODENV_ROOT/bin:$PATH"
41+
eval "$(nodenv init -)"
42+
43+
# rbenv
44+
export RBENV_ROOT="$HOME/.rbenv"
45+
export PATH="$RBENV_ROOT/bin:$PATH"
46+
eval "$(rbenv init -)"
47+
48+
# pyenv
49+
export PYENV_ROOT="$HOME/.pyenv"
50+
export PATH="$PYENV_ROOT/bin:$PATH"
51+
eval "$(pyenv init -)"
52+
53+
# plenv
54+
export PLENV_ROOT="$HOME/.plenv"
55+
export PATH="$PLENV_ROOT/bin:$PATH"
56+
eval "$(plenv init -)"
57+
58+
# gopath
59+
export GOPATH="$HOME/.go"
60+
export PATH=$PATH:$GOPATH/bin

.zshrc

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
source ~/.antigen/antigen.zsh
2+
3+
antigen bundle zsh-users/zsh-history-substring-search
4+
antigen bundle zsh-users/zsh-completions
5+
antigen bundle zsh-users/zsh-autosuggestions
6+
antigen bundle zsh-users/zsh-syntax-highlighting
7+
8+
antigen use oh-my-zsh
9+
antigen bundle --loc=plugins/ssh-agent/ssh-agent.plugin.zsh
10+
11+
# Theme
12+
# powerlevel9k
13+
# https://github.com/bhilburn/powerlevel9k
14+
# POWERLEVEL9K_INSTALLATION_PATH=$ANTIGEN_BUNDLES/bhilburn/powerlevel9k
15+
# antigen theme bhilburn/powerlevel9k powerlevel9k
16+
17+
# Theme
18+
https://github.com/robbyrussell/oh-my-zsh/wiki/themes
19+
antigen theme agnoster
20+
21+
antigen apply

Preferences.sublime-settings

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"auto_indent": true,
3+
"color_scheme": "Packages/User/SublimeLinter/One Dark (SL).tmTheme",
4+
"detect_indentation": true,
5+
"draw_white_space": "all",
6+
"enable_tab_scrolling": false,
7+
"font_face": "Roboto Mono",
8+
"font_size": 16,
9+
"highlight_line": true,
10+
"ignored_packages":
11+
[
12+
"Vintage"
13+
],
14+
"smart_indent": true,
15+
"spacegray_fileicons": true,
16+
"spacegray_sidebar_font_large": true,
17+
"spacegray_sidebar_tree_large": true,
18+
"spacegray_tabs_auto_width": true,
19+
"spacegray_tabs_font_large": true,
20+
"spacegray_tabs_large": true,
21+
"tab_size": 2,
22+
"theme": "Soda Light.sublime-theme",
23+
"translate_tabs_to_spaces": true,
24+
"use_tab_stops": true,
25+
"word_wrap": true
26+
}

0 commit comments

Comments
 (0)