Fixed vimrc au BufWritePostcl sync! sync.sh -b now automatically runs BundleClean. In vimrc, formatted bundles, Added <C-w>{|,-} commands, <C-d> command, fixed vnoremap L. Added <Tab> to move right in insert mode. Changed airline config.

This commit is contained in:
Austen Adler 2014-07-08 00:41:20 -04:00
parent 04deff7857
commit 75c876d257
3 changed files with 23 additions and 14 deletions

1
bashrc
View File

@ -99,6 +99,7 @@ if [ -x /usr/bin/dircolors ]; then
alias egrep='egrep --color=auto' alias egrep='egrep --color=auto'
fi fi
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 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' alias disphost='export DISPLAY=:0.0'
alias ll='ls -alF' alias ll='ls -alF'
alias la='ls -A' alias la='ls -A'

View File

@ -26,7 +26,7 @@ while getopts ":hbsdtclw" VALUE "$@"; do
echo "Installing vundle" echo "Installing vundle"
git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle
fi fi
vim +BundleInstall +qa vim +BundleClean +BundleInstall +qa
fi fi
if [ "$VALUE" = "s" ] ; then if [ "$VALUE" = "s" ] ; then
if [ "$(uname)" != "Darwin" ]; then if [ "$(uname)" != "Darwin" ]; then

34
vimrc
View File

@ -4,7 +4,6 @@ if has('conceal')
endif endif
nnoremap <Leader>autoformat! :%s/, /,<CR>:%s/ \/ /\/<CR>:%s/ {/{<CR>:%s/} /}<CR>:%s/ = /= nnoremap <Leader>autoformat! :%s/, /,<CR>:%s/ \/ /\/<CR>:%s/ {/{<CR>:%s/} /}<CR>:%s/ = /=
command! W %!sudo tee > /dev/null % command! W %!sudo tee > /dev/null %
au BufWritePost .vimrc so ~/.vimrc
au VimResized * exe "normal! \<c-w>=" au VimResized * exe "normal! \<c-w>="
"match Error /\s\+$/ "match Error /\s\+$/
"nnoremap s xa "nnoremap s xa
@ -12,8 +11,9 @@ au VimResized * exe "normal! \<c-w>="
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>" 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>" smap <Expr>\ neosnippet#expandable_or_jumpable() ? "\<Plug>(neosnippet_expand_or_jump)" : "\<TAB>"
"nnoremap <C-w>| <C-w>v nnoremap <C-w>\| <C-w>v
"nnoremap <C-w>- <C-w>s nnoremap <C-w>- <C-w>s
nnoremap <C-d> <C-w>q
nnoremap <F3> :!make&&echo "Uploading robot code";wput ./PPC603gnu/src/Debug/src.out ftp://frc:frc@10.20.59.2/ni-rt/system/FRC_UserProgram.out<CR> nnoremap <F3> :!make&&echo "Uploading robot code";wput ./PPC603gnu/src/Debug/src.out ftp://frc:frc@10.20.59.2/ni-rt/system/FRC_UserProgram.out<CR>
nnoremap G G$ nnoremap G G$
vnoremap G G$ vnoremap G G$
@ -62,7 +62,7 @@ vnoremap gk k
vnoremap j gj vnoremap j gj
vnoremap k gk vnoremap k gk
vnoremap H ^ vnoremap H ^
vnoremap L $ vnoremap L $h
nnoremap gj j nnoremap gj j
nnoremap gk k nnoremap gk k
nnoremap j gj nnoremap j gj
@ -101,6 +101,7 @@ inoremap <C-l> <Right>
inoremap <C-h> <Left> inoremap <C-h> <Left>
inoremap <C-k> <Up> inoremap <C-k> <Up>
inoremap <C-j> <Down> inoremap <C-j> <Down>
inoremap <Tab> <Right>
nnoremap Y y$ nnoremap Y y$
set guicursor+=n-v-c:blinkon0 set guicursor+=n-v-c:blinkon0
set formatoptions-=r set formatoptions-=r
@ -127,11 +128,18 @@ set history=200
set ttyfast set ttyfast
set ff=unix set ff=unix
syntax on syntax on
let g:airline_left_sep='▶'
let g:airline_right_sep='◀'
let g:airline#extensions#syntastic#enabled = 1
let g:airline#extensions#whitespace#enabled = 0
let g:airline#extensions#whitespace#show_message = 0
let g:airline#extensions#tmuxline#enabled = 1
let g:formatprg_cpp = "astyle" let g:formatprg_cpp = "astyle"
let g:formatprg_args_expr_cpp = " --mode=c --style=1tbs -xe -k1 -j" let g:formatprg_args_expr_cpp = " --mode=c --style=1tbs -xe -k1 -j"
let g:syntastic_java_javac_classpath = "/Applications/Android Studio.app/sdk/platforms/android-19/*.jar"
" These flags don't work for some reason " These flags don't work for some reason
" -xn -xc -xl -S " -xn -xc -xl -S
let g:airline#extensions#tabline#enabled=1 "let g:airline#extensions#tabline#enabled=1
let g:Powerline_symbols = 'fancy' let g:Powerline_symbols = 'fancy'
set encoding=utf-8 set encoding=utf-8
set laststatus=2 set laststatus=2
@ -165,7 +173,6 @@ filetype off " required!
set rtp+=~/.vim/bundle/vundle/ set rtp+=~/.vim/bundle/vundle/
call vundle#rc() call vundle#rc()
Bundle 'gmarik/vundle' Bundle 'gmarik/vundle'
"Bundle 'Floobits/floobits-vim'
Bundle 'Chiel92/vim-autoformat' Bundle 'Chiel92/vim-autoformat'
Bundle 'tpope/vim-surround' Bundle 'tpope/vim-surround'
Bundle 'scrooloose/syntastic' Bundle 'scrooloose/syntastic'
@ -185,20 +192,21 @@ Bundle 'spf13/vim-colors'
Bundle 'spf13/PIV' Bundle 'spf13/PIV'
Bundle 'vim-scripts/AutoTag' Bundle 'vim-scripts/AutoTag'
Bundle 'Lokaltog/vim-easymotion' Bundle 'Lokaltog/vim-easymotion'
"Bundle 'tsaleh/vim-matchit'
Bundle 'mbbill/undotree'
Bundle 'vim-php/vim-php-refactoring'
Bundle 'tpope/vim-fugitive'
Bundle 'kien/ctrlp.vim'
"Bundle 'vim-scripts/YankRing.vim'
Bundle 'majutsushi/tagbar'
Bundle 'sjl/gundo.vim' Bundle 'sjl/gundo.vim'
Bundle 'tommcdo/vim-exchange' Bundle 'tommcdo/vim-exchange'
Bundle 'tpope/vim-repeat' Bundle 'tpope/vim-repeat'
Bundle 'tpope/vim-commentary' Bundle 'tpope/vim-commentary'
Bundle 'mbbill/undotree'
Bundle 'vim-php/vim-php-refactoring'
Bundle 'tpope/vim-fugitive'
Bundle 'kien/ctrlp.vim'
"Bundle 'Floobits/floobits-vim'
"Bundle 'tsaleh/vim-matchit'
"Bundle 'Shougo/neosnippet' "Bundle 'Shougo/neosnippet'
"Bundle 'honza/vim-snippets' "Bundle 'honza/vim-snippets'
"Bundle 'msanders/snipmate.vim' "Bundle 'msanders/snipmate.vim'
"Bundle 'vim-scripts/YankRing.vim'
"Bundle 'majutsushi/tagbar'
filetype plugin indent on filetype plugin indent on
if exists("+undofile") if exists("+undofile")
if isdirectory($HOME . '/.vim/undo') == 0 if isdirectory($HOME . '/.vim/undo') == 0