Skip to content

Commit

Permalink
A year or so of changes?
Browse files Browse the repository at this point in the history
  • Loading branch information
albemuth committed Sep 14, 2015
1 parent 03565d4 commit b55587d
Show file tree
Hide file tree
Showing 5 changed files with 198 additions and 34 deletions.
17 changes: 16 additions & 1 deletion .aliases
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,30 @@ alias gb='git branch'
alias gba='git branch -a'
alias gco='git checkout '
alias gx='gitx --all &'
alias gk='git log --graph --abbrev-commit --pretty=oneline --decorate'
alias gch='git cherry-pick'
#alias gk='git log --graph --abbrev-commit --pretty=oneline --decorate'
alias gk='git log --graph --pretty=format:"%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset" --abbrev-commit'
alias gno='git show --name-only'

# VIM!
alias vv='vim `gst -s | grep "^.M" | sed "s/^...//"`'
alias vc='vim `git show --name-only --no-notes | grep "/"`'

#basic
alias ll='ls -lh'
alias screen='screen -U'
alias pj='prettyjson | less -r'
alias pjs='prettyjson | strip-ansi | less'

#misc
alias dotfiles='vim ~/.zshrc $CONFIG_DIR/.aliases $CONFIG_DIR/.exports && source ~/.zshrc'
alias icurl='curl -A "Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_3_3 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8J2 Safari/6533.18.5"'
alias gcurl='curl -A "Mozilla/5.0 (Linux; U; Android 2.3.6; en-us; Nexus S Build/GRK39F) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1"'


archiveToIpa()
{
rm Backcountry.ipa ; xcodebuild -exportArchive -exportFormat ipa -archivePath `echo $1 | sed 's/\/Products.*//'` -exportPath ./Backcountry.ipa && open ./Backcountry.ipa
}


28 changes: 28 additions & 0 deletions .tmux.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# use vi mode
setw -g mode-keys vi

# remap prefix to Control + a
set -g prefix C-a
set -g base-index 1

unbind C-b
bind C-a send-prefix

# force a reload of the config file
unbind r
bind r source-file ~/.tmux.conf

# quick pane cycling with Ctrl-a
unbind ^A
bind ^A select-pane -t :.+

# move around panes like in vim (only in tmux 1.6)
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind h select-pane -L

# Sane scrolling
set -g mode-mouse on
set -g default-terminal "screen-256color"

12 changes: 10 additions & 2 deletions .zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ export ZSH_THEME="robbyrussell"

# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
# Example format: plugins=(rails git textmate ruby lighthouse)
plugins=(git)
plugins=(git grunt)

source $ZSH/oh-my-zsh.sh
alias sudo='nocorrect sudo'

#function git_prompt_info() {
#ref=$(git symbolic-ref HEAD 2> /dev/null) || return
Expand All @@ -37,14 +38,21 @@ if [ -f $CONFIG_DIR/.aliases ]; then
. $CONFIG_DIR/.aliases
fi

PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting
if [ -f $CONFIG_DIR/.exports ]; then
. $CONFIG_DIR/.exports
fi


[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # This loads RVM into a shell session.
#[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # This loads RVM into a shell session.
[[ -s $HOME/.tmuxinator/scripts/tmuxinator ]] && source $HOME/.tmuxinator/scripts/tmuxinator

export NVM_DIR="/Users/amesen/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm

#[[ -s $HOME/.nvm/nvm.sh ]] && . $HOME/.nvm/nvm.sh # This loads NVM
#https://github.com/rupa/z.git
#. /Users/alfredomesen/lib/z/z.sh

export PATH="$HOME/.jenv/bin:$PATH"
eval "$(jenv init -)"
76 changes: 76 additions & 0 deletions vim/indent/css.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
" Vim indent file
" Language: CSS
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2010-12-22

if exists("b:did_indent")
finish
endif
let b:did_indent = 1

setlocal indentexpr=GetCSSIndent()
setlocal indentkeys=0{,0},!^F,o,O
setlocal nosmartindent

if exists("*GetCSSIndent")
finish
endif

function s:prevnonblanknoncomment(lnum)
let lnum = a:lnum
while lnum > 1
let lnum = prevnonblank(lnum)
let line = getline(lnum)
if line =~ '\*/'
while lnum > 1 && line !~ '/\*'
let lnum -= 1
endwhile
if line =~ '^\s*/\*'
let lnum -= 1
else
break
endif
else
break
endif
endwhile
return lnum
endfunction

function s:count_braces(lnum, count_open)
let n_open = 0
let n_close = 0
let line = getline(a:lnum)
let pattern = '[{}]'
let i = match(line, pattern)
while i != -1
if synIDattr(synID(a:lnum, i + 1, 0), 'name') !~ 'css\%(Comment\|StringQ\{1,2}\)'
if line[i] == '{'
let n_open += 1
elseif line[i] == '}'
if n_open > 0
let n_open -= 1
else
let n_close += 1
endif
endif
endif
let i = match(line, pattern, i + 1)
endwhile
return a:count_open ? n_open : n_close
endfunction

function GetCSSIndent()
let line = getline(v:lnum)
if line =~ '^\s*\*'
return cindent(v:lnum)
endif

let pnum = s:prevnonblanknoncomment(v:lnum - 1)
if pnum == 0
return 0
endif

return indent(pnum) + s:count_braces(pnum, 1) * &sw
\ - s:count_braces(v:lnum, 0) * &sw
endfunction
99 changes: 68 additions & 31 deletions vimrc
Original file line number Diff line number Diff line change
@@ -1,47 +1,58 @@
set rtp+=~/.vim/bundle/vundle/
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()

"makes Vundle use `git` instead default `https` when building absolute repo URIs
let g:vundle_default_git_proto = 'git'

Bundle 'gmarik/vundle'
Bundle 'git://github.com/maksimr/vim-jsbeautify.git'
Bundle "git://git.wincent.com/command-t.git"
Bundle "git://github.com/albemuth/snipmate.vim.git"
Bundle "git://github.com/altercation/vim-colors-solarized.git"
Bundle "git://github.com/cakebaker/scss-syntax.vim.git"
Bundle "git://github.com/derekwyatt/vim-scala.git"
Bundle "git://github.com/godlygeek/tabular.git"
Bundle "git://github.com/jpalardy/vim-slime.git"
Bundle "git://github.com/kana/vim-smartinput.git"
Bundle "git://github.com/kchmck/vim-coffee-script"
Bundle "git://github.com/mattn/zencoding-vim.git"
Bundle "git://github.com/nanotech/jellybeans.vim.git"
Bundle "git://github.com/scrooloose/nerdcommenter"
Bundle "git://github.com/tpope/vim-fugitive.git"
Bundle "git://github.com/tpope/vim-surround.git"
Bundle "git://github.com/tpope/vim-unimpaired.git"
"Bundle "cakebaker/scss-syntax.vim"
"Bundle "miripiruni/vim-better-css-indent"
Bundle "git://github.com/cakebaker/scss-syntax.vim.git"
Bundle "git://github.com/derekwyatt/vim-scala.git"
"Bundle "git://github.com/wookiehangover/jshint.vim.git"
Bundle "git://github.com/tsaleh/vim-matchit.git"
Bundle "git://github.com/urso/dotrc.git"
Bundle "git://github.com/kana/vim-smartinput.git"
Bundle "git://github.com/vim-scripts/mru.vim.git"
Bundle "git://github.com/jpalardy/vim-slime.git"
Bundle 'git://github.com/maksimr/vim-jsbeautify.git'

" github
Bundle "digitaltoad/vim-jade.git"
Bundle "junegunn/fzf"
Bundle "mattn/emmet-vim"
Bundle "mxw/vim-jsx"
Bundle "pangloss/vim-javascript"
Bundle "tommcdo/vim-exchange"
Bundle "tpope/vim-sleuth"
Bundle "vim-scripts/DrawIt"
"Bundle "vim-scripts/VimClojure"
Bundle "guns/vim-clojure-static"
Bundle "walm/jshint.vim"
Bundle "wavded/vim-stylus"
Bundle "tpope/vim-fireplace"
Bundle "vim-scripts/paredit.vim"


if has("autocmd")
" Enable filetype detection
filetype plugin indent on

" Restore cursor position
autocmd BufReadPost *
\ if line("'\"") > 1 && line("'\"") <= line("$") |
\ exe "normal! g`\"" |
\ endif
" Set json syntax
autocmd BufNewFile,BufRead *.json set ft=javascript
au BufNewFile,BufRead *.cljs set filetype=clojure


endif
if &t_Co > 2 || has("gui_running")
Expand All @@ -50,41 +61,49 @@ if &t_Co > 2 || has("gui_running")
endif

if has("gui_running")
set guioptions=egmrt
colo solarized
set background=dark
else
set term=xterm
set t_Co=256
colo solarized
set background=dark
set guioptions=egmrt
colo solarized
set background=dark
else
set term=xterm
set t_Co=256
colo solarized
set background=light
endif

" Reselect visual block after indent:
"vnoremap < <gv
"vnoremap > >gv
"vnoremap < <gv
"vnoremap > >gv


" https://github.com/junegunn/fzf
"set rtp+=/usr/local/Cellar/fzf/0.9.11


" Make Y behave like other capitals
nnoremap Y y$
" Force Saving Files that Require Root Permission
cmap w!! %!sudo tee > /dev/null %
let g:CommandTTraverseSCM = 'pwd'
set backupdir=~/vimswp
set directory=~/vimswp
let mapleader = ","
set history=1000
set wildmenu

set laststatus=2
set laststatus=2
set ruler

" keep more context when cursor moves outside of viewport
set scrolloff=3
set tabstop=4
set shiftwidth=2
set shiftwidth=4
set expandtab

set nu
set ignorecase
set ignorecase
set smartcase
set title

Expand All @@ -98,6 +117,16 @@ set incsearch " ...dynamically as they are typed.
nnoremap <C-e> 3<C-e>
nnoremap <C-y> 3<C-y>
nmap <leader>d :set background=light<CR>
nmap <leader>D :set background=dark<CR>
"Copy & paste to system clipboard with <Leader>p and <Leader>y:
"nmap <Leader>P "+P
"nmap <Leader>p "+p
"vmap <Leader>P "+P
"vmap <Leader>d "+d
"vmap <Leader>p "+p
"vmap <Leader>y "+y
nmap <leader>p :set paste<CR>
nmap <leader>P :set nopaste<CR>
" Bubble single lines
Expand All @@ -124,20 +153,22 @@ if has("autocmd")
endif

nmap <leader>v :tabedit $MYVIMRC<CR>
"nnoremap <Left> : echoe "Use h"<CR>
"nnoremap <Right> : echoe "Use l"<CR>
"nnoremap <Up> : echoe "Use k"<CR>
"nnoremap <Down> : echoe "Use j"<CR>
nnoremap <Left> : echoe "Use h"<CR>
nnoremap <Right> : echoe "Use l"<CR>
nnoremap <Up> : echoe "Use k"<CR>
nnoremap <Down> : echoe "Use j"<CR>
" =========================
" plugins
nmap <leader>n :NERDTree<CR>
nmap <leader>f :MRU<CR>
nmap <leader>r :CommandTJump<CR>
let g:jsx_ext_required = 0

" ctrlp.vim folder ignore

"set wildignore+=js/*
set wildignore+=*.pyc
set wildignore+=*.class
set wildignore+=*.png
set wildignore+=*.jpg
Expand All @@ -147,7 +178,13 @@ set wildignore+=build/*
set wildignore+=target/*
set wildignore+=node_modules/*
set wildignore+=dist/*
set wildignore+=app/components/*
set wildignore+=app/build/*
set wildignore+=app/bower_components/*
set wildignore+=bower_components/*
set wildignore+=coverage/*
set wildignore+=app/coverage/*
set wildignore+=Resources/*
set wildignore+=out/*

let g:slime_target = "tmux"

0 comments on commit b55587d

Please sign in to comment.