major refactoring/changes for nvim/dein/ale/fzf

main
Steffen Rademacker 8 years ago
parent 774f09709b
commit f76e644551

4
.gitignore vendored

@ -1,2 +1,2 @@
.netrwhist
vim/bundle/*
nvim/.netrwhist
nvim/dein/

@ -2,6 +2,8 @@
This is a collection of my dotfiles.
## Installation
```
git clone git://github.com/webgefrickel/dotfiles ~/dotfiles
cd ~/dotfiles
@ -22,7 +24,14 @@ provide your git credentials, such as:
Finally restart your terminal and vim again, and you are ready to go.
## VIM
## Additional stuff
There are additional installation script for commonly used
CLI-tools and software (mainly macOS specific) and some color
schemes for different terminal emulators, see the folders
install/, alfred/ and other/.
## Vim
I use a lot of plugins and custom syntaxes. They are all
installed via neobundle - for a list of the plugins see vimrc.
I use neovim as a default, with some selected plugins. Those
plugins are managed with dein, see nvim/bundles.vim.

@ -45,25 +45,19 @@
ps = push
pl = pull
mg = merge
rbc = rebase --continue
ffs = flow feature start
fff = flow feature finish
ffp = flow feature publish
fi = flow init
unst = reset HEAD
hub = push origin master
fac = push origin refac
rs = reset HEAD --hard
hist = log --pretty=format:\"%h | %ad | %an | %s%d \" --graph --date=local
l = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(blue)<%an>%Creset' --abbrev-commit
lo = log --graph --decorate --pretty=oneline --abbrev-commit --all
pu = !"git fetch origin -v; git fetch upstream -v; git merge upstream/master"
type = cat-file -t
dump = cat-file -p
[diff]
tool = vimdiff
guitool = vimdiff
tool = nvim -d
guitool = nvim -d
compactionHeuristic = true
[mergetool]

@ -1,8 +1,5 @@
" autocommands, filetypes, spelling, keywords for specific filetypes
"======================================================================
" define a group `vimrc` and initialize.
augroup vimrc
" define a group `init` and initialize.
augroup init
autocmd!
" Remember last location/cursor in file
@ -13,17 +10,12 @@ augroup vimrc
autocmd BufNewFile,BufRead *.md setlocal wrap
" add the dash to keywords -- makes better css/js/html search
" do this for specific files only (not in php/rb e.g.)
autocmd BufNewFile,BufRead *.{js,scss,html} set iskeyword+=-
autocmd BufNewFile,BufRead *.{js,scss,html} set iskeyword-=_
" do this for specific files only (not in php/rb e.g.) where dashes are
" not used in variable names (use camelCase instead here)
autocmd BufNewFile,BufRead *.{js,css,scss,html} set iskeyword+=-
autocmd BufNewFile,BufRead *.{js,css,scss,html} set iskeyword-=_
autocmd BufNewFile,BufRead *.php set iskeyword-=-
" scss.css snippets and stuff
autocmd BufNewFile,BufRead *.scss set filetype=scss.css
" Syntaxes for other files
autocmd BufNewFile,BufRead *.twig set filetype=html.twig
" omnicompletion for some filetypes
autocmd FileType css,scss setlocal omnifunc=csscomplete#CompleteCSS
autocmd FileType html,php,twig setlocal omnifunc=htmlcomplete#CompleteTags

@ -1,24 +1,18 @@
" All bundles, syntaxes and plugins
"======================================================================
" TODO Replace those with the de-versions
" NeoBundle 'Shougo/neocomplete'
call dein#add('Shougo/neosnippet')
" NeoBundle 'Shougo/unite.vim'
call dein#add('Shougo/deoplete.nvim')
call dein#add('junegunn/fzf', { 'build': './install --all' })
call dein#add('junegunn/fzf.vim')
call dein#add('cakebaker/scss-syntax.vim')
call dein#add('Shougo/neosnippet')
call dein#add('cakebaker/scss-syntax.vim', { 'on_ft': [ 'scss', 'css'] })
call dein#add('christoomey/vim-tmux-navigator')
call dein#add('cocopon/lightline-hybrid.vim')
call dein#add('editorconfig/editorconfig-vim')
call dein#add('gcorne/vim-sass-lint')
" call dein#add('gcorne/vim-sass-lint')
call dein#add('haya14busa/incsearch.vim')
call dein#add('itchyny/lightline.vim')
call dein#add('junegunn/fzf', { 'merged': 0 })
call dein#add('junegunn/fzf.vim', { 'depends': 'fzf' })
call dein#add('justinmk/vim-sneak')
call dein#add('moll/vim-node')
call dein#add('mtscout6/syntastic-local-eslint.vim')
call dein#add('scrooloose/syntastic')
call dein#add('moll/vim-node', { 'on_ft': 'javascript' })
" call dein#add('mtscout6/syntastic-local-eslint.vim', { 'on_ft': 'javascript' })
" call dein#add('scrooloose/syntastic')
call dein#add('sheerun/vim-polyglot')
call dein#add('tpope/vim-commentary')
call dein#add('tpope/vim-fugitive')
@ -30,3 +24,8 @@ call dein#add('tpope/vim-vinegar')
call dein#add('w0ng/vim-hybrid')
call dein#add('webgefrickel/vim-snippets')
call dein#add('wellle/tmux-complete.vim')
call dein#add('itmammoth/doorboy.vim')
" test those
call dein#add('tyru/open-browser.vim')
call dein#add('w0rp/ale')

@ -1,17 +0,0 @@
" colorscheme and optical stuff
"======================================================================
" custom list/invisible chars
set list! " nice Whitespace chars
set listchars=extends,precedes,tab:▸\ ,trail
set fillchars=
set laststatus=2 " statusbar is 2 high
set cmdheight=2 " command window is 2 high
set cpoptions+=$ " Add a $ to the end of a selection
set cpoptions+=J " 2 spaces after a sentence for easier text manupulation
let g:hybrid_reduced_contrast = 0
let g:hybrid_custom_term_colors = 1
set background=dark
colorscheme hybrid

@ -1,6 +1,3 @@
" Default sane config
"======================================================================
filetype plugin indent on
syntax on
@ -33,6 +30,39 @@ set complete-=i " dont complete from files
set nrformats-=octal " nobody uses octal anyway
set display+=lastline " shorten long lastlines
set formatoptions+=j " Delete comment character when joining commented lines
set ignorecase
set smartcase
set hlsearch
set showmatch
set wrapscan
set wildmode=list:longest,list:full
set wildmenu
set foldignore=
set foldmethod=indent " indent folding
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
set fileformat=unix
set tabstop=2
set softtabstop=2
set shiftwidth=2
set shiftround
set smarttab
set expandtab
set autoindent
set list! " nice Whitespace chars
set listchars=extends,precedes,tab:▸\ ,trail
set fillchars=
set laststatus=2 " statusbar is 2 high
set cmdheight=2 " command window is 2 high
set cpoptions+=$ " Add a $ to the end of a selection
set cpoptions+=J " 2 spaces after a sentence for easier text manupulation
" hybrid color scheme
let g:hybrid_reduced_contrast = 0
let g:hybrid_custom_term_colors = 1
set background=dark
colorscheme hybrid
" deactivate syntax highlighting when diffing
if &diff

@ -1 +0,0 @@
Subproject commit 1dd1f3e8bc541fceec2fc496185b1908615e7c35

@ -1 +0,0 @@
Subproject commit f1e3724bd0b2cbe9dce26261d0939e49d1b96374

@ -1 +0,0 @@
Subproject commit c179a51f024e27edf4354a52ff8b9fa69c4c803c

@ -1 +0,0 @@
Subproject commit 4461789d02f81fd328afbdf27d6404b6c763c25f

@ -1 +0,0 @@
Subproject commit e79d4c0c24c43d3ada283b1f5a1b8fa6cf820a70

@ -1 +0,0 @@
Subproject commit ef45bdd664cf8df6bf4d016ea13ae54b1d92a4dd

@ -1 +0,0 @@
Subproject commit a459b8cfef00100da40fd69c8ae92c4d1e63e1d2

@ -1 +0,0 @@
Subproject commit b9ff33141294c7af143f12687e9b1cf9a3a54e0f

@ -1 +0,0 @@
Subproject commit 161c5b66542e767962ca5f6998a22e984f8d8a60

@ -1 +0,0 @@
Subproject commit 059888ab650fa192dd441e52bd9f41f08b247529

@ -1 +0,0 @@
Subproject commit c7b076400297e53b3fdb9bb0605b0c688a39fa40

@ -1 +0,0 @@
Subproject commit 2066643243eddf2ed1f5d3a1a5485d6ff71851a4

@ -1 +0,0 @@
Subproject commit f00084c6f9e28e8836c3e4b5dc7e255098843a10

@ -1 +0,0 @@
Subproject commit 13b31218447335e176d46dd5f497b274f7f49595

@ -1 +0,0 @@
Subproject commit 3700f01459b9532ead77874f8910bf0499e2461c

@ -1 +0,0 @@
Subproject commit 675f67eea29308537438eb49b3b28a444c1e4689

@ -1 +0,0 @@
Subproject commit 74652b465d7eff97070001317a4ea5557717378d

@ -1 +0,0 @@
Subproject commit 73e0d9a9d1f51b6cc9dc965f62669194ae851cb1

@ -1 +0,0 @@
Subproject commit b754bc2031f21a532c083dd0d072ba373bbe3a37

@ -1 +0,0 @@
Subproject commit 9378cddc1c264f777af59f04e5b8d64eca8ee5fd

@ -1 +0,0 @@
Subproject commit 7a6675f092842c8f81e71d5345bd7cdbf3759415

@ -1 +0,0 @@
Subproject commit e49d6c2459e0f5569ff2d533b4df995dd7f98313

@ -1 +0,0 @@
Subproject commit 11dc568dbfd7a56866a4354c737515769f08e9fe

@ -1 +0,0 @@
Subproject commit bd7f7b7929260072864462c04dde3b9f4c5e0d23

@ -1 +0,0 @@
Subproject commit cc58baabeabc7b83768e25b852bf89c34756bf90

@ -1 +0,0 @@
Subproject commit 33090dc59223641e3daad2006511d18226b327a5

@ -1 +0,0 @@
Subproject commit b6fe12c60389df174a9b244d377b83abd50205f1

@ -1,29 +1,14 @@
" my vimrc - this file basically initalies neobundle and loads
" other config files from vim/config + the plugins-subfolder
"======================================================================
set langmenu=en_US.UTF-8
set runtimepath+=~/.config/nvim/dein/repos/github.com/Shougo/dein.vim
" let dein handle all the plugins and bundles
call dein#begin(expand('~/.config/nvim/dein'))
source ~/.config/nvim/bundles.vim
call dein#end()
" load the default config and mappings
source ~/.config/nvim/defaultconfig.vim
source ~/.config/nvim/search.vim
source ~/.config/nvim/whitespace.vim
source ~/.config/nvim/config.vim
source ~/.config/nvim/autocommands.vim
source ~/.config/nvim/colorscheme.vim
source ~/.config/nvim/keymappings.vim
source ~/.config/nvim/leaderkeys.vim
" and the configs and mappings for plugins loaded in bundles.vim
source ~/.config/nvim/plugins/fugitive.vim
source ~/.config/nvim/plugins/incsearch.vim
source ~/.config/nvim/plugins/lightline.vim
source ~/.config/nvim/plugins/neosnippet.vim
source ~/.config/nvim/plugins/deoplete.vim
source ~/.config/nvim/plugins/sneak.vim
source ~/.config/nvim/plugins/syntastic.vim
" source ~/.config/nvim/plugins/unite.vim
source ~/.config/nvim/plugins.vim

@ -1,9 +1,3 @@
" Custom key mappings and shortcuts
"======================================================================
" fix an issue with nvim + c+h for tmux-vim navigation
nnoremap <silent> <BS> :TmuxNavigateLeft<cr>
" remap semi-colon to be colon in normal an visual mode
nnoremap ; :
vnoremap ; :
@ -46,10 +40,6 @@ vmap ∆ ]egv
vmap ˙ <gv
vmap ¬ >gv
" Fast Switch between windows/buffers with tab
nnoremap <tab> <C-w><C-w>
nnoremap <S-tab> <C-w>W
" no help while mishitting ESC - awesome
noremap <F1> <ESC>

@ -1,6 +1,3 @@
" take me to your leader!
"======================================================================
let g:mapleader = ","
let g:maplocalleader = ","
@ -22,7 +19,7 @@ nnoremap <leader>o :e <C-R>=expand("%:p:h") . "/" <CR>
nnoremap <leader>y :call system('nc localhost 8377', @0)<CR>
" Find merge conflict markers
nnoremap <leader>g /\v^[<\|=>]{7}( .*\|$)<CR>
nnoremap <leader>gf /\v^[<\|=>]{7}( .*\|$)<CR>
" paste keeping indentation
nnoremap <leader>p p`[v`]=

@ -0,0 +1,135 @@
" deoplete
let g:deoplete#enable_at_startup = 1
let g:deoplete#enable_smart_case = 1
let g:deoplete#auto_completion_start_length = 3
inoremap <expr><C-h> deoplete#smart_close_popup().doorboy#map_backspace()
inoremap <expr><BS> deoplete#smart_close_popup().doorboy#map_backspace()
inoremap <silent> <CR> <C-r>=<SID>deoplete_cr_function()<CR>
function! s:deoplete_cr_function() abort
return deoplete#close_popup() . "\<CR>"
endfunction
" fugitive
nnoremap <silent> <leader>gs :Gstatus<CR><C-w>20+
nnoremap <silent> <leader>gd :Gdiff<CR><C-w>20+
nnoremap <silent> <leader>gc :Gcommit<CR><C-w>20+
nnoremap <silent> <leader>gw :Gwrite<CR><C-w>20+
" incsearch
let g:incsearch#auto_nohlsearch = 1
let g:incsearch#consistent_n_direction = 1
let g:incsearch#magic = '\v'
map / <Plug>(incsearch-forward)
map ? <Plug>(incsearch-backward)
map g/ <Plug>(incsearch-stay)
map n <Plug>(incsearch-nohl-n)
map N <Plug>(incsearch-nohl-N)
map * <Plug>(incsearch-nohl-*)
map # <Plug>(incsearch-nohl-#)
map g* <Plug>(incsearch-nohl-g*)
map g# <Plug>(incsearch-nohl-g#)
" neosnippet
let g:neosnippet#disable_runtime_snippets = { "_": 1 }
let g:neosnippet#scope_aliases = {}
let g:neosnippet#scope_aliases['scss'] = 'scss,css'
let g:neosnippet#scope_aliases['php'] = 'php,html'
let g:neosnippet#snippets_directory = '~/.config/nvim/dein/repos/github.com/webgefrickel/vim-snippets/snippets'
imap <C-j> <Plug>(neosnippet_expand_or_jump)
smap <C-j> <Plug>(neosnippet_expand_or_jump)
xmap <C-j> <Plug>(neosnippet_expand_target)
" sneak
let g:sneak#use_ic_scs = 0
let g:sneak#map_netrw = 1
let g:sneak#s_next = 1
let g:sneak#streak = 1
" openbrowser
let g:netrw_nogx = 1 " disable netrw's gx mapping.
nmap gx <Plug>(openbrowser-smart-search)
vmap gx <Plug>(openbrowser-smart-search)
" ale
let g:ale_lint_on_save = 1
let g:ale_lint_on_text_changed = 0
let g:ale_lint_on_enter = 1
let g:ale_linters = {
\ 'css': [],
\ 'html': ['htmlhint'],
\ 'javascript': ['eslint'],
\ 'sass': ['sasslint'],
\ 'scss': ['sasslint'],
\}
" fzf
nnoremap <silent> <space>, :Files<cr>
nnoremap <silent> <space>. :Buffers<cr>
nnoremap <silent> <space>g :GFiles<cr>
nnoremap <silent> <space>c :GFiles?<cr>
nnoremap <silent> <space>l :Lines<cr>
nnoremap <silent> <space>a :Ag<cr>
nnoremap <silent> <space>r :History:<cr>
" lightline
let g:lightline = {
\ 'colorscheme': 'hybrid',
\ 'active': {
\ 'left': [ [ 'mode', 'paste' ], [ 'fugitive', 'filename' ] ],
\ 'right': [ [ 'lineinfo' ], [ 'fileformat', 'fileencoding', 'filetype' ] ]
\ },
\ 'component_function': {
\ 'modified': 'LightlineModified',
\ 'readonly': 'LightlineReadonly',
\ 'fugitive': 'LightlineFugitive',
\ 'filename': 'LightlineFilename',
\ 'fileformat': 'LightlineFileformat',
\ 'filetype': 'LightlineFiletype',
\ 'fileencoding': 'LightlineFileencoding',
\ 'mode': 'LightlineMode',
\ }
\ }
function! LightlineModified()
return &ft =~ 'help' ? '' : &modified ? 'ɱ' : &modifiable ? '' : 'ɯ'
endfunction
function! LightlineReadonly()
return &ft !~? 'help' && &readonly ? 'ɹ' : ''
endfunction
function! LightlineFilename()
return ('' != LightlineReadonly() ? LightlineReadonly() . ' ' : '') .
\ (&ft == 'unite' ? unite#get_status_string() :
\ '' != expand('%:t') ? expand('%:t') : '[No Name]') .
\ (LightlineModified() != '' ? ' ' . LightlineModified() : '') .
\ (ALEGetStatusLine() != 'OK' ? ' - ' . ALEGetStatusLine() : '')
endfunction
function! LightlineFugitive()
if exists("*fugitive#head")
let _ = fugitive#head()
return strlen(_) ? 'ɓ '._ : ''
endif
return ''
endfunction
function! LightlineFileformat()
return winwidth(0) > 70 ? &fileformat : ''
endfunction
function! LightlineFiletype()
return winwidth(0) > 70 ? (strlen(&filetype) ? &filetype : 'no ft') : ''
endfunction
function! LightlineFileencoding()
return winwidth(0) > 70 ? (strlen(&fenc) ? &fenc : &enc) : ''
endfunction
function! LightlineMode()
let fname = expand('%:t')
return winwidth(0) > 70 ? lightline#mode() : ''
endfunction

@ -1,17 +0,0 @@
" deoplete
"======================================================================
let g:deoplete#enable_at_startup = 1
let g:deoplete#enable_smart_case = 1
let g:deoplete#auto_completion_start_length = 3
" <C-h>, <BS>: close popup and delete backword char.
inoremap <expr><C-h> deoplete#smart_close_popup()."\<C-h>"
inoremap <expr><BS> deoplete#smart_close_popup()."\<C-h>"
" <CR>: close popup and save indent.
inoremap <silent> <CR> <C-r>=<SID>my_cr_function()<CR>
function! s:my_cr_function() abort
return deoplete#close_popup() . "\<CR>"
endfunction

@ -1,7 +0,0 @@
" Fugitive
"======================================================================
nnoremap <silent> <leader>gs :Gstatus<CR><C-w>20+
nnoremap <silent> <leader>gd :Gdiff<CR><C-w>20+
nnoremap <silent> <leader>gc :Gcommit<CR><C-w>20+
nnoremap <silent> <leader>gw :Gwrite<CR><C-w>20+

@ -1,15 +0,0 @@
" incsearch
"======================================================================
let g:incsearch#auto_nohlsearch = 1
let g:incsearch#consistent_n_direction = 1
let g:incsearch#magic = '\v'
map / <Plug>(incsearch-forward)
map ? <Plug>(incsearch-backward)
map g/ <Plug>(incsearch-stay)
map n <Plug>(incsearch-nohl-n)
map N <Plug>(incsearch-nohl-N)
map * <Plug>(incsearch-nohl-*)
map # <Plug>(incsearch-nohl-#)
map g* <Plug>(incsearch-nohl-g*)
map g# <Plug>(incsearch-nohl-g#)

@ -1,60 +0,0 @@
" Lightline config
"======================================================================
let g:lightline = {
\ 'colorscheme': 'hybrid',
\ 'active': {
\ 'left': [ [ 'mode', 'paste' ], [ 'fugitive', 'filename' ] ],
\ 'right': [ [ 'lineinfo' ], [ 'fileformat', 'fileencoding', 'filetype' ] ]
\ },
\ 'component_function': {
\ 'modified': 'LightlineModified',
\ 'readonly': 'LightlineReadonly',
\ 'fugitive': 'LightlineFugitive',
\ 'filename': 'LightlineFilename',
\ 'fileformat': 'LightlineFileformat',
\ 'filetype': 'LightlineFiletype',
\ 'fileencoding': 'LightlineFileencoding',
\ 'mode': 'LightlineMode',
\ }
\ }
function! LightlineModified()
return &ft =~ 'help' ? '' : &modified ? 'ɱ' : &modifiable ? '' : 'ɯ'
endfunction
function! LightlineReadonly()
return &ft !~? 'help' && &readonly ? 'ɹ' : ''
endfunction
function! LightlineFilename()
return ('' != LightlineReadonly() ? LightlineReadonly() . ' ' : '') .
\ (&ft == 'unite' ? unite#get_status_string() :
\ '' != expand('%:t') ? expand('%:t') : '[No Name]') .
\ ('' != LightlineModified() ? ' ' . LightlineModified() : '')
endfunction
function! LightlineFugitive()
if exists("*fugitive#head")
let _ = fugitive#head()
return strlen(_) ? 'ɓ '._ : ''
endif
return ''
endfunction
function! LightlineFileformat()
return winwidth(0) > 70 ? &fileformat : ''
endfunction
function! LightlineFiletype()
return winwidth(0) > 70 ? (strlen(&filetype) ? &filetype : 'no ft') : ''
endfunction
function! LightlineFileencoding()
return winwidth(0) > 70 ? (strlen(&fenc) ? &fenc : &enc) : ''
endfunction
function! LightlineMode()
let fname = expand('%:t')
return &ft == 'unite' ? 'Unite' : winwidth(0) > 60 ? lightline#mode() : ''
endfunction

@ -1,14 +0,0 @@
" Neosnippet config
"======================================================================
let g:neosnippet#disable_runtime_snippets = { "_": 1 }
let g:neosnippet#scope_aliases = {}
let g:neosnippet#scope_aliases['scss'] = 'scss,css'
let g:neosnippet#scope_aliases['php'] = 'php,html'
let g:neosnippet#snippets_directory = '~/.config/nvim/dein/repos/github.com/webgefrickel/vim-snippets/snippets'
" Plugin key-mappings, expand with ctrl + j
imap <C-j> <Plug>(neosnippet_expand_or_jump)
smap <C-j> <Plug>(neosnippet_expand_or_jump)
xmap <C-j> <Plug>(neosnippet_expand_target)

@ -1,7 +0,0 @@
" Vim sneak
"======================================================================
let g:sneak#use_ic_scs = 0
let g:sneak#map_netrw = 1
let g:sneak#s_next = 1
let g:sneak#streak = 1

@ -1,15 +0,0 @@
" Syntastic
"======================================================================
" no checking for xhtml/html
let g:syntastic_sass_checkers = ['sass_lint']
let g:syntastic_scss_checkers = ['sass_lint']
let g:syntastic_css_checkers = ['sass_lint']
let g:syntastic_javascript_checkers = ['eslint']
let g:syntastic_json_checkers = ['jsonlint']
let g:syntastic_auto_jump = 0
let g:syntastic_mode_map = {
\ 'mode': 'active',
\ 'active_filetypes': ['php', 'javascript', 'json', 'scss', 'sass', 'css'],
\ 'passive_filetypes': ['xhtml', 'html']
\ }

@ -1,52 +0,0 @@
" The Unite Plugin
"======================================================================
let g:unite_prompt=' '
let g:unite_source_grep_command='ag'
let g:unite_source_grep_default_opts =
\ '-i --vimgrep --hidden --ignore ' .
\ '''.hg'' --ignore ''.svn'' --ignore ''.git'' --ignore ''.bzr'''
let g:unite_source_grep_recursive_opt=''
let g:unite_split_rule = "botright"
let g:unite_force_overwrite_statusline = 0
call unite#filters#matcher_default#use(['matcher_fuzzy'])
call unite#filters#sorter_default#use(['sorter_rank'])
call unite#set_profile('files', 'context.smartcase', 1)
call unite#custom#source('line,outline', 'matchers', 'matcher_fuzzy')
call unite#custom_source('file_rec, file_rec/async, file_mru, file, buffer, grep',
\ 'ignore_pattern', join([
\ '\.git',
\ '\.svn',
\ '\.sass-cache',
\ '_srcs\/',
\ 'node_modules\/',
\ 'vim\/bundle',
\ '\.\(png\|gif\|jpg\|pdf\|ico\|mp4\|webm\|mp3\|woff\|ttf\|eot\|min\.js\|min\.map\)$',
\ ], '\|'))
nmap <space> [unite]
nnoremap [unite] <nop>
nnoremap <silent> [unite], :<C-u>Unite -start-insert -toggle -auto-resize file_rec/async<cr>
nnoremap <silent> [unite]b :<C-u>Unite -short-source-names -quick-match buffer<cr>
nnoremap <silent> [unite]. :<C-u>Unite -start-insert -auto-resize buffer<cr>
nnoremap <silent> [unite]l :<C-u>Unite -start-insert -auto-resize line<cr>
nnoremap <silent> [unite]y :<C-u>Unite history/yank<cr>
nnoremap <silent> [unite]f :<C-u>UniteWithCursorWord -start-insert -toggle -auto-resize file_rec/async<cr>
nnoremap <silent> [unite]a :<C-u>Unite grep:.<cr>
nnoremap <silent> [unite]A :<C-u>UniteWithCursorWord grep:.<cr>
autocmd FileType unite call s:unite_settings()
function! s:unite_settings()
nmap <buffer> <ESC> <Plug>(unite_exit)
imap <buffer> <C-j> <Plug>(unite_select_next_line)
imap <buffer> <C-k> <Plug>(unite_select_previous_line)
nmap <buffer> <C-r> <Plug>(unite_redraw)
imap <buffer> <C-r> <Plug>(unite_redraw)
inoremap <silent><buffer><expr> <C--> unite#do_action('split')
nnoremap <silent><buffer><expr> <C--> unite#do_action('split')
inoremap <silent><buffer><expr> <C-\> unite#do_action('vsplit')
nnoremap <silent><buffer><expr> <C-\> unite#do_action('vsplit')
endfunction

@ -1,17 +0,0 @@
" Searching, completion and folds
"======================================================================
set ignorecase
set smartcase
set hlsearch
set showmatch
set wrapscan
set wildmode=list:longest,list:full
set wildmenu
set foldignore=
set foldmethod=indent " indent folding
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

@ -1,11 +0,0 @@
" Tabs and Whitespace -- can be overridden by editorconfig
"======================================================================
set fileformat=unix
set tabstop=2
set softtabstop=2
set shiftwidth=2
set shiftround
set smarttab
set expandtab
set autoindent

@ -53,7 +53,6 @@ bind -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U"
bind -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R"
bind -n C-\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l"
# Mouse support
set -g mouse on
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'select-pane -t=; copy-mode -e; send-keys -M'"
@ -73,7 +72,7 @@ set-option -g assume-paste-time 0
# How long should we show any messages?
set -g display-time 2000
# statusbar colors solarized dark
# statusbar colors
set -g status-bg black
set -g status-fg yellow
set -g status-attr default

@ -1,8 +1,7 @@
# make aliases and other stuff work in sudo
alias sudo='sudo '
# always use macvim but for 'vim'
alias nvim=$EDITOR
# always use nvim, see exports
alias vim=$EDITOR
alias vi=$EDITOR
alias v=$EDITOR
@ -40,8 +39,6 @@ alias ggps='git push origin $(current_branch)'
alias ggpnp='git pull origin $(current_branch) && git push origin $(current_branch)'
alias gsmu='git submodule init && git submodule update'
alias gsmuu='git submodule foreach git pull origin master'
alias gsvn='git checkout master && git svn fetch && git merge dev && git svn rebase && git svn dcommit'
alias ggall='git remote | xargs -L1 git push --all'
alias gmo='$EDITOR $(git ls-files -m)'
# aliases for apache and mysql
@ -80,7 +77,6 @@ alias dot='cd ~/Dotfiles && ls -al'
# random usefull stuff
alias dnsflush='sudo dscacheutil -flushcache'
alias cleanup="find . -type f -name '*.DS_Store' -ls -delete"
alias lock="/System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession -suspend"
# imagemagick downsampling shortcuts (c&p retina folder, run, done!)

@ -12,6 +12,7 @@ export MANPATH=/usr/local/share/man:$MANPATH
# rbenv
export PATH="$HOME/.rbenv/bin:$PATH"
# zsh-completions
fpath=($HOME/dotfiles/zsh/zsh-completions/src $fpath)
# disable stupid ._ and dsstore files
@ -19,8 +20,8 @@ export COPY_EXTENDED_ATTRIBUTES_DISABLE=true
export COPYFILE_DISABLE=true
# editor
export EDITOR="/usr/local/bin/nvim
export VISUAL="/usr/local/bin/nvim
export EDITOR="/usr/local/bin/nvim"
export VISUAL="/usr/local/bin/nvim"
# disable auto titling fixes tmux window
export DISABLE_AUTO_TITLE=true

@ -30,11 +30,6 @@ function webvideolownoaudio() {
ffmpeg -i $1 -movflags +faststart -an -vcodec libx264 -vprofile high -preset slower -pix_fmt yuv420p -r 25 -b:v 1M -maxrate 1M -bufsize 2M -s 1280x720 $1--low--no-audio.mp4
}
# a small function for finding stuff
function fname() {
find . -iname "*$@*";
}
# create and change to directory/folder
function take() {
mkdir -p $1
@ -59,11 +54,6 @@ fancy-ctrl-z () {
fi
}
# open changed files in git index
function gch () {
nvim `git status | grep modified | awk '{print $3}'`
}
# creates an archive from given directory
mktar() { tar cvf "${1%%/}.tar" "${1%%/}"; }
mktgz() { tar cvzf "${1%%/}.tgz" "${1%%/}"; }

10
zshrc

@ -1,10 +1,10 @@
# Load the functions, aliases, function etc.
# Load the functions, aliases and exports
for file in ~/dotfiles/zsh/{exports,aliases,functions}; do
[ -r "$file" ] && source "$file"
done
unset file
# a nice prompt
# a nice prompt, install it via npm to make this work
autoload -U promptinit; promptinit
prompt pure
@ -19,13 +19,12 @@ compdef gf=git-flow
# case-insensitive (all),partial-word and then substring completion
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
unsetopt menu_complete # do not autoselect the first completion entry
unsetopt flowcontrol
unsetopt menu_complete # do not autoselect the first completion entry
setopt auto_menu # show completion menu on succesive tab press
setopt complete_in_word
setopt always_to_end
# history settings
if [ -z $HISTFILE ]; then
HISTFILE=$HOME/.zsh_history
@ -33,9 +32,6 @@ fi
HISTSIZE=10000
SAVEHIST=10000
bindkey '\e[A' history-beginning-search-backward
bindkey '\e[B' history-beginning-search-forward
# easy vim/terminal switch
zle -N fancy-ctrl-z
bindkey '^Z' fancy-ctrl-z

Loading…
Cancel
Save