diff --git a/shells/zshrc b/shells/zshrc index fd23902..7f339b6 100644 --- a/shells/zshrc +++ b/shells/zshrc @@ -23,6 +23,13 @@ function asroot(){ xauth extract $TEMPFILE $DISPLAY sudo zsh -c "xauth merge $TEMPFILE;(srm $TEMPFILE||rm $TEMPFILE)&'$@';" } +function dedir(){ + mv "$1"/{.,}* . + rmdir "$1" +} +alias cpatch='diff -crB' +alias capatch='patch --dry-run -p1 -i' +alias apatch='patch -p1 -i' alias pg="pcregrep -M" alias eix="eix -F" alias mouse1="xmodmap <(echo pointer = 1 2 3)" diff --git a/vim/vimrc b/vim/vimrc index b48aeb5..0e50eb3 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -19,13 +19,10 @@ filetype plugin on set grepprg=grep\ -nH\ $* let g:tex_flavor='latex' - "match Error /\s\+$/ "nnoremap s xa "nnoremap :UndotreeToggle "inoremap pumvisible() ? "\" : "\" -imap \ neosnippet#expandable_or_jumpable() ? "\(neosnippet_expand_or_jump)" : pumvisible() ? "\" : "\" -smap \ neosnippet#expandable_or_jumpable() ? "\(neosnippet_expand_or_jump)" : "\" nnoremap :CtrlPTag nnoremap \| vl nnoremap - sj @@ -197,7 +194,6 @@ let g:formatter_php = ['formatdef_my_custom_php'] "let g:formatprg_args_expr_cpp=" --mode=c --style=1tbs -xe -k1 -j" " These flags don't work for some reason " -xn -xc -xl -S -"let g:airline#extensions#tabline#enabled=1 let g:Powerline_symbols='fancy' let g:indent_guides_start_level=1 let g:indent_guides_guide_size=1 @@ -216,25 +212,24 @@ let g:neocomplete#enable_smart_case = 1 let g:neocomplete#sources#syntax#min_keyword_length = 2 let g:php_refactor_command='php /usr/local/bin/refactor.phar' let g:ctrlp_extensions=['funky'] -"inoremap neocomplcache#smart_close_popup()."\" -"function! g:UltiSnips_Complete() -" call UltiSnips#ExpandSnippet() -" if g:ulti_expand_res == 0 -" if pumvisible() -" return "\" -" else -" call UltiSnips#JumpForwards() -" if g:ulti_jump_forwards_res == 0 -" return "\" -" endif -" endif -" endif -" return "" -"endfunction -"au BufEnter * exec "inoremap " . g:UltiSnipsExpandTrigger . " =g:UltiSnips_Complete()" -"let g:UltiSnipsJumpForwardTrigger="" -"let g:UltiSnipsListSnippets="" -"let g:UltiSnipsEditSplit="vertical" +function! g:UltiSnips_Complete() + call UltiSnips#ExpandSnippet() + if g:ulti_expand_res == 0 + if pumvisible() + return "\" + else + call UltiSnips#JumpForwards() + if g:ulti_jump_forwards_res == 0 + return "\" + endif + endif + endif + return "" +endfunction +au BufEnter * exec "inoremap " . g:UltiSnipsExpandTrigger . " =g:UltiSnips_Complete()" +let g:UltiSnipsJumpForwardTrigger="" +let g:UltiSnipsListSnippets="" +let g:UltiSnipsEditSplit="vertical" inoremap pumvisible() ? "\" : "\u\" let loaded_matchit=1 filetype off @@ -243,10 +238,7 @@ if has("win32") else call plug#begin('~/.vim/plugged') endif -"Plug 'Floobits/floobits-vim' "Plug 'tsaleh/vim-matchit' -"Plug 'Shougo/neosnippet' -"Plug 'msanders/snipmate.vim' "Plug 'vim-scripts/YankRing.vim' Plug 'Chiel92/vim-autoformat' "Adds autoformat command | https://github.com/Chiel92/vim-autoformat @@ -274,8 +266,6 @@ Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' } " "Theme | https://github.com/altercation/vim-colors-solarized Plug 'stonewareslord/vim-colors' "Theme pack | https://github.com/spf13/vim-colors -"Plug 'spf13/PIV' -" "PHP tools | https://github.com/spf13/PIV "Plug 'vim-scripts/AutoTag' " "Generates taglist with ctags | https://github.com/vim-scripts/AutoTag Plug 'Lokaltog/vim-easymotion' @@ -292,22 +282,16 @@ Plug 'kien/ctrlp.vim' "Fuzzy file search | https://github.com/kien/ctrlp.vim Plug 'godlygeek/tabular' "Quickly make tables in vim | https://github.com/godlygeek/tabular -"Plug 'tpope/vim-abolish' -" "Better abbrivation | https://github.com/tpope/vim-abolish Plug 'godlygeek/csapprox' "256 color vim in terminal | https://github.com/godlygeek/csapprox -"Plug 'sirver/UltiSnips' +Plug 'sirver/UltiSnips' " "Adds snippets | https://github.com/sirver/UltiSnips Plug 'honza/vim-snippets' "More snippets | https://github.com/honza/vim-snippets Plug 'othree/eregex.vim' "Real regexes in vim | https://github.com/othree/eregex.vim -"Plug 'vim-scripts/sessionman.vim' -" "Session manager | https://github.com/vim-scripts/sessionman.vim Plug 'mattn/flappyvird-vim' "The amazing Flappy Bird game | https://github.com/mattn/flappyvird-vim -"Plug 'morhetz/gruvbox' -" "Colorscheme | https://github.com/morhetz/gruvbox Plug 'superbrothers/vim-vimperator' "Vimperator for vim | https://github.com/superbrothers/vim-vimperator Plug 'Rykka/colorv.vim' @@ -344,8 +328,6 @@ Plug 'https://github.com/xolox/vim-easytags' "Vim tags | https://github.com/xolox/vim-easytags Plug 'https://github.com/xolox/vim-misc' "Misc (required for easytags) | https://github.com/xolox/vim-misc -Plug 'https://github.com/lervag/vimtex' - " | https://github.com/lervag/vimtex Plug 'https://github.com/habamax/vim-skipit' " | https://github.com/habamax/vim-skipit call plug#end()