2
0
mirror of https://github.com/webgefrickel/dotfiles synced 2024-11-01 21:40:19 +00:00

some nice vim and zshrc stuff

This commit is contained in:
Steffen Becker 2013-07-05 18:49:04 +02:00
parent b05228c62f
commit bbb0f76872
5 changed files with 51 additions and 21 deletions

View File

@ -34,6 +34,9 @@
ps = push
pl = pull
mg = merge
ffs = flow feature start
fff = flow feature finish
fi = flow init
unst = reset HEAD
hub = push origin master
fac = push origin refac

@ -1 +1 @@
Subproject commit 63d086b86106010a3dde5aa2214dd4fd12a59b8c
Subproject commit 4a6e84e658af84931f66713c4684d61fb9ec5a5d

View File

@ -21,6 +21,15 @@ snippet mix "create a mixin" !b
endsnippet
snippet fe "each in sass" !b
@each $${1:item} in $${2:variable} {
$0
}
endsnippet
#########################################
# css3 stuff and using compass mixins #
@ -379,15 +388,15 @@ endsnippet
# lists
snippet li "list-style"
snippet ls "list-style"
list-style: ${1:none/disc/circle/square/decimal/zero};$0
endsnippet
snippet lin "list-style: none"
snippet lsn "list-style: none"
list-style: none;$0
endsnippet
snippet lid "list-style: disc"
snippet lsd "list-style: disc"
list-style: disc;$0
endsnippet

44
vimrc
View File

@ -21,11 +21,9 @@ Bundle 'editorconfig/editorconfig-vim'
Bundle 'edsono/vim-matchit'
Bundle 'ervandew/supertab'
Bundle 'godlygeek/tabular'
Bundle 'jeetsukumaran/vim-buffergator'
Bundle 'kien/ctrlp.vim'
Bundle 'mattn/gist-vim'
Bundle 'mattn/webapi-vim'
Bundle 'maxbrunsfeld/vim-yankstack'
Bundle 'rking/ag.vim'
Bundle 'scrooloose/nerdtree'
Bundle 'scrooloose/syntastic'
@ -53,7 +51,6 @@ Bundle 'webgefrickel/vim-typoscript'
" Color themes
Bundle 'altercation/vim-colors-solarized'
Bundle 'nanotech/jellybeans.vim'
Bundle 'stephenmckinney/vim-solarized-powerline'
@ -155,7 +152,9 @@ set nowritebackup
set noswapfile " no swp-files
" Better folding
" TODO rework this and start using folds
set foldmethod=indent
setlocal foldignore=
set foldnestmax=20 " max 20 levels of folding
set nofoldenable " dont fold by default - let me do it
set foldlevelstart=1 " deactivate folding on fileload
@ -165,6 +164,18 @@ set visualbell " don't beep
" ========== Custom Keymappings ==========
" Typos
command! -bang E e<bang>
command! -bang Q q<bang>
command! -bang W w<bang>
command! -bang QA qa<bang>
command! -bang Qa qa<bang>
command! -bang Wa wa<bang>
command! -bang WA wa<bang>
command! -bang Wq wq<bang>
command! -bang WQ wq<bang>
" set the leader to comma , and ; == : -- faster commands
let mapleader = ","
nnoremap ; :
@ -207,8 +218,9 @@ nnoremap <leader>s :source ~/.vimrc<cr>
" Opens an edit command with the path of the currently edited file filled in
nnoremap <leader>e :e <C-R>=expand("%:p:h") . "/" <CR>
" start a new document-wide seach-replace using abolish
nnoremap <leader>f :%S/
" start a new document-wide seach-replace using abolish or normal search
nnoremap <leader>f :%s/
nnoremap <leader>F :%S/
" dont use the arrow keys in insert mode
inoremap <up> <nop>
@ -264,8 +276,16 @@ nmap <leader>w :s/\(\%#\w\+\)\(\_W\+\)\(\w\+\)/\3\2\1/<CR>`'
nnoremap <leader>d :cd %:p:h<CR>:pwd<CR>
" reload files when set autoread is active with F5
" TODO make this awesome reloading NERDtree + ctrl+p as well
nnoremap <F5> :checktime<cr>
" folding shortcuts
nnoremap <space> za
" when over a class in html hit fc to find that class in css/scss/js
nnoremap <leader>c :execute "vimgrep /" . expand("<cword>") . "/j **" <Bar> cnext<CR>
" ========== PLugins leaders and other config ==========
" search using Ag - the Silver Surfer ftw!
@ -289,7 +309,7 @@ nnoremap <silent> <leader>gw :Gwrite<CR><C-w>20+
" TComment
nnoremap <leader>/ :TComment<CR>
vnoremap <leader>/ :TComment<CR>
inoremap <leader>/ <Esc>:TComment<CR>i
inoremap <leader>/ <Esc>:TComment<CR>
" Tabularize a == think align
nmap <Leader>a= :Tabularize /=<CR>
@ -318,18 +338,12 @@ let g:syntastic_mode_map = { 'mode': 'active',
\ 'active_filetypes': ['ruby', 'php', 'javascript'],
\ 'passive_filetypes': ['xhtml', 'html', 'scss', 'scss.css'] }
" Buffergator
let g:buffergator_display_regime='filepath'
" no default keymappings -- needing for command-t to work
let g:buffergator_suppress_keymaps=1
let g:buffergator_viewport_split_policy='B'
let g:buffergator_split_size=12
nnoremap <leader>b :BuffergatorToggle<cr>
" CtrlP
nnoremap <leader>b :CtrlPBuffer<cr>
nnoremap <leader>r :CtrlPMRU<cr>
let g:ctrlp_map = '<leader>t'
let g:ctrlp_switch_buffer = 0 " easier split screens
let g:ctrlp_working_path_mode = 0
let g:ctrlp_working_path_mode = 0 " dont try to change my working directory
let g:ctrlp_max_height = 12
let g:ctrlp_custom_ignore = { 'dir': '\v[\/](\.git|\.hg|\.svn|node_modules|\.sass-cache)$',
\ 'file': '\.exe$\|\.so$\|\.dll$\|\.psd$\|\.png$\|\.jpg$\|\.gif$',

8
zshrc
View File

@ -3,7 +3,7 @@ ZSH=$HOME/.oh-my-zsh
ZSH_THEME="webgefrickel"
# default plugins to load
plugins=(brew git git-flow-completion github grunt history-substring-search jake-node npm node gem osx zsh-syntax-highlighting)
plugins=(brew git git-flow github history-substring-search jake-node npm node gem osx zsh-syntax-highlighting)
source $ZSH/oh-my-zsh.sh
unsetopt correct_all
@ -12,7 +12,7 @@ unsetopt correct_all
export TERM="screen-256color"
# brew CASK
export HOMEBREW_CASK_OPTS="--appdir=/Applications"
# export HOMEBREW_CASK_OPTS="--appdir=/Applications"
# paths
export PATH=/usr/local/bin:/usr/local/sbin:$HOME/.rvm/bin:$PATH
@ -73,6 +73,7 @@ alias ...='cd ../..'
alias ....='cd ../../..'
alias .....='cd ../../../..'
alias l='ls -al'
alias e='exit'
# Shortcuts
alias drop='cd ~/Dropbox && ls -al'
@ -88,15 +89,18 @@ function grepkill() { ps -axf | grep -v grep | grep "$@" | awk '{print $2}' | xa
# Gitty gitgit
alias gitrm='git rm $(git ls-files --deleted)'
alias gsmu='git submodule init && git submodule update'
# THIS is evil. only use for private stuff and useless stuff
# squish those commits afterwards with rebase!
alias ggg='git add . && git commit -a -m "-"'
# dandelion deployment shortcuts
alias deploy='dandelion deploy'
alias status='dandelion status'
# grunt
alias gr='grunt'
alias grw='grunt watch'
alias grd='grunt deploy'