FIXED ULTISNIPS-NEOCOMPLETE <TAB> BUTTONga .. Added more .. commands and shortened some git commands to g*

This commit is contained in:
Austen Adler 2014-08-05 14:24:42 -04:00
parent 1edb0b7cb1
commit 851b08f0c7
2 changed files with 68 additions and 21 deletions

49
bashrc
View File

@ -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

40
vimrc
View File

@ -4,15 +4,20 @@ if has('conceal')
endif
nnoremap <Leader>autoformat! :%s/, /,<CR>:%s/ \/ /\/<CR>:%s/ {/{<CR>:%s/} /}<CR>:%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! \<c-w>="
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 <F5> :UndotreeToggle<CR>
inoremap <expr><Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
"inoremap <expr><Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
imap <Expr>\ neosnippet#expandable_or_jumpable() ? "\<Plug>(neosnippet_expand_or_jump)" : pumvisible() ? "\<C-n>" : "\<TAB>"
smap <Expr>\ neosnippet#expandable_or_jumpable() ? "\<Plug>(neosnippet_expand_or_jump)" : "\<TAB>"
nnoremap <C-w>\| <C-w>v<C-w>l
@ -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 <expr><BS> neocomplcache#smart_close_popup()."\<C-h>"
function! g:UltiSnips_Complete()
call UltiSnips#ExpandSnippet()
if g:ulti_expand_res == 0
if pumvisible()
return "\<C-n>"
else
call UltiSnips#JumpForwards()
if g:ulti_jump_forwards_res == 0
return "\<TAB>"
endif
endif
endif
return ""
endfunction
au BufEnter * exec "inoremap <silent> " . g:UltiSnipsExpandTrigger . " <C-R>=g:UltiSnips_Complete()<cr>"
let g:UltiSnipsJumpForwardTrigger="<tab>"
let g:UltiSnipsListSnippets="<c-e>"
inoremap <expr> <CR> pumvisible() ? "\<C-y>" : "\<C-g>u\<CR>"
let loaded_matchit=1
let g:UltiSnipsEditSplit="vertical"
let g:UltiSnipsExpandTrigger="<PageDown>"
let g:UltiSnipsJumpForwardTrigger="<C-j>"
let g:UltiSnipsJumpBackwardTrigger="<C-k>"
inoremap <expr><TAB> pumvisible() ? "\<C-n>" : "\<TAB>"
filetype off
call vundle#rc()
"Bundle 'Floobits/floobits-vim'