Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .Xresources
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Emacs*geometry: 175x45+20+20
Emacs*font: DejaVu Sans Mono-17
3 changes: 3 additions & 0 deletions .bash_profile
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@ if [ -f ~/.bashrc ]; then
. ~/.bashrc;
fi

if [ -f ~/.Xresources ]; then
xrdb -merge ~/.Xresources
fi
3 changes: 2 additions & 1 deletion .bashrc
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ export LSCOLORS=excxxxxxfxxxxxxxxxxxxx
export export CLICOLOR=1

export EDITOR=emacsclient
export DISPLAY=:0.0

# bash autocompletion
# case-insensitive autocomplete
bind 'set completion-ignore-case on'
export FIGNORE='.csproj:.unityproj'
export FIGNORE='.csproj:.unityproj:.meta:~'
15 changes: 15 additions & 0 deletions gitconfig_global.txt → .config/git/gitconfig_global.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
[color]
ui = true
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = yellow
frag = magenta
old = red
new = green
[color "status"]
added = yellow
changed = green
untracked = cyan
[core]
precomposeunicode = true
[mergetool]
Expand Down
39 changes: 27 additions & 12 deletions .emacs
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
;; editorconfig
(use-package editorconfig
:ensure t
:config
(editorconfig-mode 1))

;; mode settings
(setq default-major-mode 'text-mode)
;(add-hook 'text-mode-hook 'turn-on-auto-fill)
Expand All @@ -9,10 +15,8 @@
;; set fonts and colors
(global-font-lock-mode t)

;; (require 'color-theme)
(color-theme-initialize)
(require 'color-theme-gruber-darker)
(color-theme-gruber-darker)
(load-theme 'railscast t t)
(enable-theme 'railscast)

;; markdown mode
(autoload 'markdown-mode "markdown-mode.el" "Major mode for editing Markdown files" t)
Expand Down Expand Up @@ -80,11 +84,12 @@
;; things specific to AquaMacs on OS X

;; enable package management
(when (>= emacs-major-version 24)
(require 'package)
(package-initialize)
(add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/") t)
)
(require 'package)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
;; Comment/uncomment this line to enable MELPA Stable if desired. See `package-archive-priorities`
;; and `package-pinned-packages`. Most users will not need or want to do this.
;;(add-to-list 'package-archives '("melpa-stable" . "https://stable.melpa.org/packages/") t)
(package-initialize)

;; c# highlighting
(setq omnisharp-server-executable-path "/usr/bin/omnisharp")
Expand All @@ -93,9 +98,6 @@
(setq csharp-want-imenu nil)
(local-set-key (kbd "{") 'csharp-insert-open-brace)

;; highlighting for protobuf files
(require 'protobuf-mode)

;; ace-jump-mode
(require 'ace-jump-mode)
(define-key global-map (kbd "C-c SPC") 'ace-jump-mode)
Expand Down Expand Up @@ -136,3 +138,16 @@
;; don't add a comment with file encoding in ruby mode
(add-hook 'ruby-mode-hook
(setq ruby-insert-encoding-magic-comment nil))
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(package-selected-packages
'(use-package editorconfig smart-tabs-mode projectile flx-ido color-theme-modern ace-jump-mode)))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)
72 changes: 1 addition & 71 deletions .gitconfig
Original file line number Diff line number Diff line change
@@ -1,75 +1,5 @@
[user]
email = nagase@vitei.com
email = daniel.nagase@unity3d.com
name = Daniel Nagase

[include]
path = ~/.config/git/gitconfig_global.txt

[color]
ui = true
[core]
editor = emacsclient
excludesfile = /Users/daniel/.gitignore_global

[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = yellow
frag = magenta
old = red
new = green
[color "status"]
added = yellow
changed = green
untracked = cyan
[alias]
st = status -sb
stn = "!git st -uno"
stp = "!git st | perl -nle '/[MA]\\s+(\\S+)/; print $1 if $1;'"
ci = commit
cia = commit --amend
co = checkout
br = branch
sb = show-branch
cp = cherry-pick
staged = diff --cached
unstage = reset HEAD
rb = rebase
rbc = rebase --continue
rbs = rebase --skip
rl = reflog
rs = remote show
rt = remote
ru = remote update
rp = remote prune
sm = submodule
lg = log --graph --pretty=format:'%Cred%h%Creset - %Cgreen(%ad)%C(yellow)%d%Creset %s %C(bold blue)<%an>%Creset' --abbrev-commit --date=local
lgf = log --graph --pretty=format:'%Cred%H%Creset - %Cgreen(%ad)%C(yellow)%d%Creset %s %C(bold blue)<%an>%Creset' --abbrev-commit --date=local
patch = diff --color=never --patch-with-raw
nm = !git name-rev --stdin --always --name-only
last = !git --no-pager lg -10
lastn = !git --no-pager lgf -10 | git nm
new = !git --no-pager lg $1@{1}..$1@{0} "$@"
sub = submodule update --init --recursive
dtl = show --pretty=format:'%Cred%h%Creset - %Cgreen(%ad)%C(yellow)%d%Creset %s %C(bold blue)<%an>%Creset\n\n%b\n---' --date=local --full-diff
who = shortlog -n -s --no-merges
fa = fetch --all
dt = "!f() { vim -p $(git diff --name-only $@ | grep -v '.axf$' | grep -v '.map$' | grep -v '.amx$' | grep -v '.bxml$') +\"tabdo Gdiff $@\" +tabfirst; }; f"
amend-commit = "!f() { START=`(git symbolic-ref -q HEAD || git rev-parse HEAD) | cut -d"/" -f 3`; git checkout -q $1 && git commit --amend && git rebase --onto HEAD $1 $START; }; f"

[merge]
keepBackup = false
tool = custom

[mergetool "custom"]
cmd = /Applications/p4merge.app/Contents/Resources/launchp4merge "$PWD/$BASE" "$PWD/$REMOTE" "$PWD/$LOCAL" "$PWD/$MERGED"
keepTemporaries = false
trustExitCode = false
keepBackup = false
[push]
default = simple
[credential]
helper = osxkeychain