Last active
August 11, 2020 19:00
-
-
Save ravster/4956733 to your computer and use it in GitHub Desktop.
My 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
cat <<EOF > .agignore | |
log | |
tags | |
tmp | |
vendor | |
.git/ | |
bower_components/ | |
node_modules/ | |
coverage/ | |
TAGS | |
_build/ | |
EOF |
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
cat <<EOF > .bash_aliases | |
alias be="bundle exec" | |
alias bi="bundle install" | |
alias gs="git status" | |
alias gd="git diff" | |
alias gg='git gui' | |
alias gk='gitk --all' | |
alias delmerged='git branch --merged | grep -v "\*" | grep -v master | grep -v dev | xargs -n 1 git branch -d' | |
repull() { | |
git checkout master | |
git branch -D "$1" | |
git checkout "$1" | |
} | |
alias e='emacs -nw' | |
branches() { | |
git branch --contains "$1" | |
} | |
EOF |
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
cat <<EOF >> .bashrc | |
export TERM=xterm-256color | |
source ~/.git-prompt.sh | |
alias ls='ls --color=auto' | |
export EDITOR="/usr/bin/emacs" | |
export CLICOLOR=1 | |
export PS1='\w|\[\e[0;32m\]$(__git_ps1)\[\e[0m\] $ ' | |
export DISABLE_SPRING=1 | |
EOF |
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
mkdir -p ~/.config/git | |
cat <<EOF > ~/.config/git/ignore | |
*~ | |
.idea/ | |
jmeter.log | |
**/rubymine_passenger_debug.rb | |
.ruby-version | |
TAGS | |
.byebug_history | |
EOF |
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
(electric-pair-mode 1) | |
(setq default-tab-width 4) | |
(setq js-indent-level 2) | |
(require 'package) | |
(add-to-list 'package-archives | |
'("melpa" . "https://melpa.org/packages/") t) | |
(package-initialize) | |
;; Always show matching parentheses | |
(show-paren-mode 1) | |
;; Remove the toolbar & the menu bar | |
(if window-system | |
(tool-bar-mode -1)) | |
(menu-bar-mode -1) | |
(add-to-list 'auto-mode-alist | |
'("\.\(?:gemspec\|irbrc\|gemrc\|rake\|rb\|ru\|thor\)\'" . ruby-mode)) | |
(add-to-list 'auto-mode-alist | |
'("\(Capfile\|Gemfile\(?:\.[a-zA-Z0-9._-]+\)?\|[rR]akefile\)\'" . ruby-mode)) | |
(add-hook 'ruby-mode-hook | |
(lambda () | |
(highlight-indentation-mode 1))) | |
(setq ruby-deep-indent-paren nil) | |
(setq ruby-insert-encoding-magic-comment nil) | |
;;; Magit key-binding | |
(global-set-key (kbd "C-x g") 'magit-status) | |
;;; Remove whitespace on close | |
(add-hook 'before-save-hook 'delete-trailing-whitespace) | |
(global-set-key (kbd "C-c <left>") 'windmove-left) | |
(global-set-key (kbd "C-c <right>") 'windmove-right) | |
(global-set-key (kbd "C-c <up>") 'windmove-up) | |
(global-set-key (kbd "C-c <down>") 'windmove-down) | |
(ivy-mode 1) | |
(global-set-key (kbd "C-s") 'swiper) | |
(global-set-key (kbd "M-x") 'counsel-M-x) | |
(global-set-key (kbd "C-x C-f") 'counsel-find-file) | |
(global-set-key (kbd "C-c g") 'counsel-git) | |
(global-set-key (kbd "C-c j") 'counsel-git-grep) | |
(global-set-key (kbd "C-c k") 'counsel-ag) | |
(fset 'byebug | |
"\C-mbyebug if $a") | |
(fset 'ife | |
"if err != nil {\C-m") | |
(fset 'f | |
"fmt.Println(") | |
(fset '\90 | |
"\C-a\C-u90\C-f\C-[b\C-[j\C-a") | |
(fset 'i | |
"\C-m\C-iRails.logger.info(") | |
(fset 'l | |
"\C-mlog.Printf(\"") | |
(put 'upcase-region 'disabled nil) | |
(add-hook 'before-save-hook #'gofmt-before-save) |
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
sudo apt-get install -y python-software-properties software-properties-common | |
sudo add-apt-repository -y ppa:git-core/ppa | |
sudo apt-get update | |
sudo apt-get install -y emacs24 tmux git exuberant-ctags silversearcher-ag | |
sudo ln -sf /usr/bin/ctags-exuberant /usr/bin/ctags | |
ls -l /usr/bin/ctags* |
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
git clone https://github.com/sstephenson/rbenv.git ~/.rbenv | |
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc | |
echo 'eval "$(rbenv init -)"' >> ~/.bashrc | |
. ~/.bashrc | |
git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build |
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
cat <<EOF > .tmux.conf | |
unbind C-b | |
set -g prefix f2 | |
bind-key '"' split-window -c '#{pane_current_path}' | |
bind-key % split-window -h -c "#{pane_current_path}" | |
bind-key c new-window -c "#{pane_current_path}" | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment