Browse Source

update vimrc to use php and js syntax highlighting plugins

master
dummy 8 years ago
parent
commit
3457f9130a
  1. 32
      dot/.bashrc
  2. 39
      vim/.vimrc

32
dot/.bashrc

@ -2,19 +2,39 @@
[[ "$-" != *i* ]] && return [[ "$-" != *i* ]] && return
export EDITOR=vim 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 # Some shortcuts for different directory listings
alias ls='ls -hF --color=tty --group-directories-first' # classify files in colour alias ls='ls -hF --color=tty --group-directories-first' # classify files in colour
alias ll='ls -l' # long list alias ll='ls -l' # long list
alias grep='grep --color=auto' alias grep='grep --color=auto'
alias tmux='tmux -2' alias tmux='tmux -2'
alias gdb='gdb -q'
# Umask # Umask
# #

39
vim/.vimrc

@ -8,33 +8,30 @@ filetype off
" set the runtime path to include Vundle and initialize " set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin() call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required " let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim' Plugin 'VundleVim/Vundle.vim'
" plugin for running make asynchronously Plugin 'christoomey/vim-tmux-navigator'
Plugin 'https://github.com/skywind3000/asyncrun.vim.git' Plugin 'https://github.com/skywind3000/asyncrun.vim.git'
" glsl hilighting
Plugin 'tikhomirov/vim-glsl' 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' Plugin 'octol/vim-cpp-enhanced-highlight'
" better vim-markdown plugin Plugin 'godlygeek/tabular' " required for vim-markdown
Plugin 'godlygeek/tabular'
Plugin 'plasticboy/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 " All of your Plugins must be added before the following line
call vundle#end() " required call vundle#end() " required
"filetype plugin indent on " required
" "
" End Vundle config " End Vundle config
" "
"------------------
" some general vim settings " some general vim settings
"
filetype plugin indent on filetype plugin indent on
syntax on syntax on
colorscheme deus colorscheme deus
@ -60,8 +57,9 @@ set undoreload=10000
set foldmethod=syntax set foldmethod=syntax
set foldnestmax=1 set foldnestmax=1
set foldlevelstart=20 set foldlevelstart=20
set foldcolumn=2 set foldcolumn=0
set autoindent set autoindent
let php_folding = 2
" filename auto-completion " filename auto-completion
set wildmode=longest,list,full set wildmode=longest,list,full
@ -105,22 +103,22 @@ nmap <F4> :bp\|bd #<CR>
"------------------ "------------------
" AsyncRun " AsyncRun
let g:qf_toggle = '' let g:qf_toggle = ''
let g:win_save = '' "let g:win_save = ''
function QfToggle() function QfToggle()
if (g:qf_toggle == '') if (g:qf_toggle == '')
call QfJumpAndReturn() call QfJumpAndReturn()
else else
let g:qf_toggle = '' let g:qf_toggle = ''
:ccl :ccl
call winrestview(g:win_save) "call winrestview(g:win_save)
endif endif
endfunction endfunction
function QfJumpAndReturn() function QfJumpAndReturn()
let g:qf_toggle = "open" let g:qf_toggle = "open"
let g:win_save = winsaveview() "let g:win_save = winsaveview()
:copen 16 :copen 16
:wincmd p :wincmd p
endfunction endfunction
function RunMake() function RunMake()
@ -131,6 +129,8 @@ function RunMake()
endfunction endfunction
let g:asyncrun_timer = 250 let g:asyncrun_timer = 250
" search for word under cursor in src/ directory
map <F3> ::AsyncRun grep -Rn <c-r><c-w> src/<cr>
map <F5> :call RunMake()<cr> map <F5> :call RunMake()<cr>
noremap <F6> :call QfToggle() <cr> noremap <F6> :call QfToggle() <cr>
@ -153,6 +153,9 @@ augroup vimrc
" save folds/cursor positions of buffers " save folds/cursor positions of buffers
autocmd BufWinLeave *.* mkview autocmd BufWinLeave *.* mkview
autocmd BufWinEnter *.* silent loadview autocmd BufWinEnter *.* silent loadview
" glsl filetype plugin
autocmd! BufNewFile,BufRead *.vs,*.fs set ft=glsl
augroup END augroup END

Loading…
Cancel
Save