From 851b08f0c7ba77bee4c24a72f28f0bc7e4ee1337 Mon Sep 17 00:00:00 2001 From: Austen Adler Date: Tue, 5 Aug 2014 14:24:42 -0400 Subject: [PATCH] FIXED ULTISNIPS-NEOCOMPLETE BUTTONga .. Added more .. commands and shortened some git commands to g* --- bashrc | 49 +++++++++++++++++++++++++++++++++++++++++-------- vimrc | 40 +++++++++++++++++++++++++++------------- 2 files changed, 68 insertions(+), 21 deletions(-) diff --git a/bashrc b/bashrc index 94053b2..5cc93b4 100644 --- a/bashrc +++ b/bashrc @@ -44,7 +44,6 @@ fi [[ -s /home/stonewareslord/.autojump/etc/profile.d/autojump.sh ]] && source /home/stonewareslord/.autojump/etc/profile.d/autojump.sh export PATH=/home/stonewareslord/.autojump/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/stonewareslord/tmp/ucpp/ucpp/:/home/stonewareslord/tmp/ucpp/ucpp/:/home/stonewareslord/hitchhikers/bin/ucpp/ucpp:/home/stonewareslord/hitchhikers/bin/ucpp/ucpp -alias bat='upower -i /org/freedesktop/UPower/devices/battery_BAT0| grep -E "state|to\ full|percentage"' complete -cf sudo man @@ -59,6 +58,7 @@ if [ -x /usr/bin/dircolors ]; then alias fgrep='fgrep --color=auto' alias egrep='egrep --color=auto' fi +alias bat='upower -i /org/freedesktop/UPower/devices/battery_BAT0| grep -E "state|to\ full|percentage"' alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"' alias vim='vim +"au BufWritePost .vimrc so ~/.vimrc" +"au BufWritePost vimrc so ~/.vimrc"' alias disphost='export DISPLAY=:0.0' @@ -93,10 +93,47 @@ alias ......='k ../../../../..' alias .......='k ../../../../../..' alias ........='k ../../../../../../..' alias .........='k ../../../../../../../..' +alias ..........='k ../../../../../../../../..' +alias ...........='k ../../../../../../../../../..' +alias ............='k ../../../../../../../../../../..' +alias .............='k ../../../../../../../../../../../..' +alias ..............='k ../../../../../../../../../../../../..' +alias ...............='k ../../../../../../../../../../../../../..' alias ytdl="youtube-dl $@ -x --audio-format mp3 --audio-quality 0 -c -o '%(title)s.%(ext)s'" alias tux="wemux" alias rmgit="git remote rm origin;git remote rm https;git remote rm oOrigin;git remote rm oHttps" alias g="git $@" +function gco(){ + git co "$@" +} +function gi(){ + git i +} +function gpush(){ + git push "$@" +} +function gpull(){ + git pull "$@" +} +function gup(){ + git up +} +function grm(){ + git rm $@ +} +function gci(){ + git ci "$@" +} +function ga(){ + git a "$@" +} +function gd(){ + gid d "$@" +} +function greset(){ + git reset "$@" +} +complete -f ga function mcl(){ mkdir "$@"&&cl "$@"; } function cl(){ cd "$@" && ls; } function k(){ @@ -128,7 +165,6 @@ function tsh(){ fi } - #Functions extract () { if [ -f $1 ] ; then @@ -227,10 +263,10 @@ bakwht='\[\e[47m\]' # White txtrst='\[\e[0m\]' # Text Reset #History control +parse_git_branch() { + git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ \1/' | grep -oE '[^ ]+$' +} if [ "$BASH" ]; then - parse_git_branch() { - git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ \1/' | grep -oE '[^ ]+$' - } prompt(){ a=`parse_git_branch` hn=`hostname` @@ -246,13 +282,10 @@ if [ "$BASH" ]; then PS1="" PROMPT_COMMAND='PS1=`prompt`' export PROMPT_COMMAND="${PROMPT_COMMAND:+$PROMPT_COMMAND ; }"'echo "`date +'%y.%m.%d-%H:%M:%S:'`" $USER "$(pwd)" "$(history 1 | cut -c8-)" >> ~/.bash_eternal_history' - #PROMPT_COMMAND='PS1="\(\033[0;33m\][\!]\`if [[ \$? = "0" ]]; then echo "\\[\\033[32m\\]"; else echo "\\[\\033[31m\\]"; fi\`[\u.\h: \`if [[ `pwd|wc -c|tr -d " "` > 18 ]]; then echo "\\W"; else echo "\\w"; fi\`]\$\[\033[0m\] "; echo -ne "\033]0;`hostname -s`:`pwd`\007"' - export HISTFILESIZE= export HISTSIZE= export HISTTIMEFORMAT="%Y-%m-%d_%H:%M:%S " export HISTFILE=~/.bash_eternal_history - alias ehistory='cat ~/.bash_eternal_history|grep $@' readonly HOME readonly HISTIGNORE diff --git a/vimrc b/vimrc index 3c3de9e..43ac64d 100644 --- a/vimrc +++ b/vimrc @@ -4,15 +4,20 @@ if has('conceal') endif nnoremap autoformat! :%s/, /,:%s/ \/ /\/:%s/ {/{:%s/} /}:%s/ = /= command! WW %!sudo tee > /dev/null % -autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o -autocmd FileType * :hi IndentGuidesOdd guibg=red ctermbg=239 -autocmd FileType * :hi IndentGuidesEven guibg=white ctermbg=239 au VimResized * exe "normal! \=" au BufRead,BufNewFile *.twig set filetype=htmljinja +au FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o +au FileType * :hi IndentGuidesOdd guibg=red ctermbg=239 +au FileType * :hi IndentGuidesEven guibg=white ctermbg=239 +au FileType css setlocal omnifunc=csscomplete#CompleteCSS +au FileType html,markdown setlocal omnifunc=htmlcomplete#CompleteTags +au FileType javascript setlocal omnifunc=javascriptcomplete#CompleteJS +au FileType python setlocal omnifunc=pythoncomplete#Complete +au FileType xml setlocal omnifunc=xmlcomplete#CompleteTags "match Error /\s\+$/ "nnoremap s xa "nnoremap :UndotreeToggle -inoremap pumvisible() ? "\" : "\" +"inoremap pumvisible() ? "\" : "\" imap \ neosnippet#expandable_or_jumpable() ? "\(neosnippet_expand_or_jump)" : pumvisible() ? "\" : "\" smap \ neosnippet#expandable_or_jumpable() ? "\(neosnippet_expand_or_jump)" : "\" nnoremap \| vl @@ -191,20 +196,29 @@ let g:indent_guides_enable_on_vim_startup=1 let g:neocomplete#enable_at_startup = 1 let g:neocomplete#enable_smart_case = 1 let g:neocomplete#sources#syntax#min_keyword_length = 2 -autocmd FileType css setlocal omnifunc=csscomplete#CompleteCSS -autocmd FileType html,markdown setlocal omnifunc=htmlcomplete#CompleteTags -autocmd FileType javascript setlocal omnifunc=javascriptcomplete#CompleteJS -autocmd FileType python setlocal omnifunc=pythoncomplete#Complete -autocmd FileType xml setlocal omnifunc=xmlcomplete#CompleteTags 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="" +inoremap pumvisible() ? "\" : "\u\" let loaded_matchit=1 let g:UltiSnipsEditSplit="vertical" -let g:UltiSnipsExpandTrigger="" -let g:UltiSnipsJumpForwardTrigger="" -let g:UltiSnipsJumpBackwardTrigger="" -inoremap pumvisible() ? "\" : "\" filetype off call vundle#rc() "Bundle 'Floobits/floobits-vim'