Commits

Bruce Wang  committed 0f9816b

vimrc cleanup/add CTRL-V as paste in gvimrc

  • Participants
  • Parent commits 1990878

Comments (0)

Files changed (2)

+" Enable Syntax Color
+" -------------------
+set nocompatible
+syntax on
+colorscheme desert
+
+
+" Disable Generation of Backup Files
+" ----------------------------------
+set nobackup
+set noswapfile
+
+" Some File Type Stuff
+" --------------------
+filetype on
+filetype plugin on
+
+" Leader
+" ------
+" sets leader to ',' and localleader to "\"
+let mapleader=","
+let maplocalleader="\\"
+
+" User Interface
+" --------------
+" activate wildmenu, permanent ruler and disable Toolbar, and add line
+" highlightng as well as numbers
+set wildmenu
+set ruler
+set guioptions-=T
+"set cursorline
+set completeopt-=preview
+
+" Set Better Indention
+" --------------------
+set smartindent
+
+" Statusbar
+" ---------
+set cmdheight=2
+set laststatus=2
+set statusline=[%l,%c\ %P%M]\ %f\ %r%h%w
+set number
+
+" Tab Settings
+" ------------
+set smarttab
+set tabstop=4
+
+" utf-8 default encoding
+" ----------------------
+set enc=utf-8
+
+" python support
+" --------------
+autocmd FileType python setlocal expandtab shiftwidth=4 tabstop=4 softtabstop=4 fileformats=unix
+autocmd FileType php setlocal expandtab shiftwidth=4 tabstop=4 softtabstop=4 fileformats=unix
+
+
+" ruby support
+" ------------
+autocmd FileType ruby setlocal shiftwidth=2 tabstop=2 softtabstop=2
+
+" python.vim
+" ----------
+let python_highlight_all=1
+
+" html/xml support
+" ----------------
+
+fun! s:SelectHTML()
+  let n = 1
+  while n < 50 && n < line("$")
+    " check for jinja
+    if getline(n) =~
+'{%\s*\(extends\|block\|macro\|set\|if\|for\|include\|trans\)\>'
+      set ft=htmljinja
+      return
+    endif
+    " check for django
+    if getline(n) =~
+'{%\s*\(extends\|block\|comment\|ssi\|if\|for\|blocktrans\)\>'
+      set ft=htmldjango
+      return
+    endif
+    let n = n + 1
+  endwhile
+  set ft=html
+endfun
+
+autocmd FileType html,xhtml,xml,htmldjango,htmljinja,eruby,mako setlocal expandtab shiftwidth=2 tabstop=2 softtabstop=2
+"autocmd FileType html,xhtml,xml,htmldjango,htmljinja,eruby,mako source d:/vim/vimfiles/plugin/closetag.vim
+autocmd BufNewFile,BufRead *.rhtml setlocal ft=eruby
+autocmd BufNewFile,BufRead *.tmpl setlocal ft=htmljinja
+autocmd BufNewFile,BufRead *.html,*.htm  call s:SelectHTML()
+autocmd BufNewFile,BufRead *.module,*.inc setlocal ft=php
+
+let html_no_rendering=1
+let eruby_percent_processing=1
+
+" CSS
+" ---
+autocmd FileType css setlocal expandtab shiftwidth=4 tabstop=4 softtabstop=4
+
+" rst
+" ---
+autocmd FileType rst setlocal expandtab shiftwidth=4 tabstop=4 softtabstop=4
+
+" Javascript
+" ----------
+autocmd FileType javascript setlocal shiftwidth=2 tabstop=2 softtabstop=2
+let javascript_enable_domhtmlcss=1
+
+" File Browser
+" ------------
+" hide some files and remove stupid help
+let g:explHideFiles='^\.,.*\.sw[po]$,.*\.pyc$'
+let g:explDetailedHelp=0
+
+" Highlight Search
+set hlsearch
+set incsearch
+
+
+map <C-A-right> :bnext<CR>
+map <C-A-left>  :bprevious<CR>
+map <C-r>       :call JumpToSource()<CR>
+map <C-S-d>     :bdelete<Return>
+map <F2> a<C-R>=strftime("%c")<CR><Esc>
+map <C-w>w <ESC>:args % <cword><CR>:n<CR>
+map <C-w>i <ESC>:args % index<CR>:n<CR>
+
+nmap <C-v> "+gP
+imap <C-v> <ESC><C-v>
+vmap <C-c> "+y
+
+imap ,q <Esc>
+imap ,t <Esc>:tabnew<CR>
+set showtabline=0
+let loaded_project = 1
+
+"" Highlight redundant whitespaces and tabs.
+"highlight RedundantSpaces ctermbg=red guibg=red
+"match RedundantSpaces /\s\+$\| \+\ze\t\|\t/
+
+" use 4 spaces instead of tabs
+set tabstop=4
+set shiftwidth=4
+set expandtab
+
+" always show ^M in DOS files
+"set fileformats=unix
+" caseinsensitive incremental search
+set ignorecase
+set incsearch
+
+" Show matching brackets
+set showmatch
+
+" start in paste mode by default (cancel with [ESC]:nopaste)
+"set paste
+
+" always show line and col number and the current command
+set ruler
+set showcmd
+
+
+
+" Minibuffer
+" ----------
+"  one click is enough and fix some funny bugs
+let g:miniBufExplUseSingleClick = 1
+let g:miniBufExplForceSyntaxEnable = 1
+let g:miniBufExplMapCTabSwitchBufs = 1
+
+" BufClose
+" --------
+" map :BufClose to :bq and ^B and configure it to open a file browser on close
+let g:BufClose_AltBuffer = '.'
+cnoreabbr <expr> bq 'BufClose'
+map ^Q :BufClose<CR>
+
+
+" BufTabs
+"
+set laststatus=2
+let g:buftabs_in_statusline=1 
+
+noremap <C-left> :bprev<CR>
+noremap <C-right> :bnext<CR> 
 " -------------------
 set nocompatible
 syntax on
-colorscheme desert
+colorscheme torte
 
 set isk+=_,$,@,%,#,- " none of these should be word dividers, so make them not be
 set lz " do not redraw while running macros (much faster) 
 set hlsearch
 set incsearch
 
-
-map <C-A-right> :bnext<CR>
-map <C-A-left>  :bprevious<CR>
-map <C-r>       :call JumpToSource()<CR>
 map <C-S-d>     :bdelete<Return>
 map <F2> a<C-R>=strftime("%c")<CR><Esc>
 map <C-w>w <ESC>:args % <cword><CR>:n<CR>
 set ruler
 set showcmd
 
-" function to cleanup a text -> mapped to F5
-fun! CleanText()
-    let curcol = col(".")
-    let curline = line(".")
-    exe ":retab"
-    exe ":%s/^M$//ge"
-    exe ":%s/^M/ /ge"
-    exe ":%s/ \\+$//e"
-    call cursor(curline, curcol)
-endfun
-map <F5> :call CleanText()<CR>
 
 function! CHANGE_CURR_DIR()
 let _dir = expand("%:p:h")