diff --git a/dot/.bashrc b/dot/.bashrc index fccfb33..e74ff31 100644 --- a/dot/.bashrc +++ b/dot/.bashrc @@ -2,19 +2,39 @@ [[ "$-" != *i* ]] && return export EDITOR=vim -#PS1='\[\e]0;\w\a\]\n\[\e[32m\]\u@\h \[\e[33m\]\w\[\e[0m\]\n\$ ' -GREEN="\[\e[0;32m\]" -RED="\[\e[0;31m\]" -YELLOW="\[\e[1;33m\]" -RESET="\[\e[0m\]" -PS1="[$GREEN\u$RESET@$RED\h$RESET:$YELLOW\w$RESET]$" +# colors +reset="\[\e[0m\]" +red="\[\e[0;31m\]" +green="\[\e[0;32m\]" +yellow="\[\e[0;33m\]" +blue="\[\e[0;34m\]" +purple="\[\e[0;35m\]" +cyan="\[\e[0;36m\]" +light_red="\[\e[1;31m\]" +light_green="\[\e[1;32m\]" +light_yellow="\[\e[1;33m\]" +light_blue="\[\e[1;34m\]" +light_purple="\[\e[1;35m\]" +light_cyan="\[\e[1;36m\]" +light_gray="\[\e[0;37m\]" + + +#USER="\[\e[38;5;157m\]" +#HOST="\[\e[38;5;153m\]" +#DIRECTORY="\[\e[38;5;214m\]" +user_name=$green +host=$purple +directory=$yellow + +PS1="[$user_name\u$reset@$host\h$reset:$directory\w$reset]$" # Some shortcuts for different directory listings alias ls='ls -hF --color=tty --group-directories-first' # classify files in colour alias ll='ls -l' # long list alias grep='grep --color=auto' alias tmux='tmux -2' +alias gdb='gdb -q' # Umask # diff --git a/vim/.vimrc b/vim/.vimrc index 4211de9..7342e67 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -8,33 +8,30 @@ filetype off " set the runtime path to include Vundle and initialize set rtp+=~/.vim/bundle/Vundle.vim call vundle#begin() -" alternatively, pass a path where Vundle should install plugins -"call vundle#begin('~/some/path/here') " let Vundle manage Vundle, required Plugin 'VundleVim/Vundle.vim' -" plugin for running make asynchronously +Plugin 'christoomey/vim-tmux-navigator' Plugin 'https://github.com/skywind3000/asyncrun.vim.git' -" glsl hilighting Plugin 'tikhomirov/vim-glsl' -autocmd! BufNewFile,BufRead *.vs,*.fs set ft=glsl -" additional highlighting for c/c++ function names Plugin 'octol/vim-cpp-enhanced-highlight' -" better vim-markdown plugin -Plugin 'godlygeek/tabular' +Plugin 'godlygeek/tabular' " required for vim-markdown Plugin 'plasticboy/vim-markdown' +Plugin 'https://github.com/StanAngeloff/php.vim.git' +Plugin 'https://github.com/pangloss/vim-javascript.git' +Plugin 'jlanzarotta/bufexplorer' +Plugin 'vim-airline/vim-airline' +Plugin 'vim-airline/vim-airline-themes' " All of your Plugins must be added before the following line call vundle#end() " required -"filetype plugin indent on " required " " End Vundle config " -"------------------ + " some general vim settings -" filetype plugin indent on syntax on colorscheme deus @@ -60,8 +57,9 @@ set undoreload=10000 set foldmethod=syntax set foldnestmax=1 set foldlevelstart=20 -set foldcolumn=2 +set foldcolumn=0 set autoindent +let php_folding = 2 " filename auto-completion set wildmode=longest,list,full @@ -105,22 +103,22 @@ nmap :bp\|bd # "------------------ " AsyncRun let g:qf_toggle = '' -let g:win_save = '' +"let g:win_save = '' function QfToggle() if (g:qf_toggle == '') call QfJumpAndReturn() else let g:qf_toggle = '' :ccl - call winrestview(g:win_save) + "call winrestview(g:win_save) endif endfunction function QfJumpAndReturn() - let g:qf_toggle = "open" - let g:win_save = winsaveview() - :copen 16 - :wincmd p + let g:qf_toggle = "open" + "let g:win_save = winsaveview() + :copen 16 + :wincmd p endfunction function RunMake() @@ -131,6 +129,8 @@ function RunMake() endfunction let g:asyncrun_timer = 250 +" search for word under cursor in src/ directory +map ::AsyncRun grep -Rn src/ map :call RunMake() noremap :call QfToggle() @@ -153,6 +153,9 @@ augroup vimrc " save folds/cursor positions of buffers autocmd BufWinLeave *.* mkview autocmd BufWinEnter *.* silent loadview + + " glsl filetype plugin + autocmd! BufNewFile,BufRead *.vs,*.fs set ft=glsl augroup END