CCCPaste

My Vimrc

"this is my VIMRC file
syntax on
set shiftwidth=2 softtabstop=2 expandtab

"I don't like auto indent
set noautoindent

command! Wq :wq
command! W :w

set path+=**
set wildmenu

nnoremap  :bnext
nnoremap  :bprevious

" Uncomment the following to have Vim jump to the last position when
" reopening a file
if has("autocmd")
  au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
endif

"insert templates
nnoremap ,html :-1read $HOME/.vim/skeleton/bootlist.html3j9li
nnoremap ,getlist :-1read $HOME/.vim/skeleton/getlist.jsi

nnoremap ,fun :call Jfun()$kkbi
function Jfun()
  execute "normal i function (){\\}\v="
endfunction

nnoremap ,post :call Jpost()i
function Jpost()
  execute "normal i function (){\\"
  execute "normal i var url = 'submit.php';\\"
  execute "normal i $.post( url, {data:'test'}, function( data ) {\\"
  execute "normal i console.log( data );\\"
  execute "normal i });\\"
  execute "normal i }\vkkkk=v>jv>jjv<"
  execute "normal kkkkf("
endfunction

"CSS autocomplete Ctrl + x followed by  Ctrl + o
autocmd FileType css set omnifunc=csscomplete#CompleteCSS

"JavaScript Autocomplete Ctrl + x followed by  Ctrl + o
autocmd FileType js set omnifunc=javascriptcomplete#CompleteJS

"html Autocomplete Ctrl + x followed by  Ctrl + o
autocmd FileType html set omnifunc=htmlcomplete#CompleteTags
"auto close tags on space
inoremap 

"line numbering
set relativenumber 
set number

"remove all trailing whitespace by pressing F5
nnoremap  :let _s=@/:%s/\s\+$//e:let @/=_s