summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.vimrc23
1 files changed, 18 insertions, 5 deletions
diff --git a/.vimrc b/.vimrc
index 13fcfeb..27894fc 100644
--- a/.vimrc
+++ b/.vimrc
@@ -2,7 +2,7 @@
execute pathogen#infect()
syntax on
-set number
+set number
"" have the mouse enabled all the time:
set ruler
@@ -30,13 +30,17 @@ set expandtab
set autoindent
set tabstop=2
set softtabstop=2
+" Show tab characters. Visual Whitespace.
+set list
+" show trailing whtitespaces
+set listchars=tab:>-,trail:ยท
"set textwidth=79
set smartindent
set nocompatible
set shiftround " When at 3 spaces and I hit >>, go to 4, not 5.
" allow backspacing over everything in insert mode
-set backspace=indent,eol,start
-set history=1000
+set backspace=indent,eol,start
+set history=1000
" disable autowrap
"set tw=0
@@ -49,7 +53,7 @@ set history=1000
set sidescroll=3
" center the cursors on scrolling sidewards
set sidescrolloff=3
-set backupdir=~/tmp
+set backupdir=~/tmp
set directory=~/tmp " Don't clutter my dirs up with swp and tmp files
set scrolloff=3 " keep 3 lines visible at top and bottom
@@ -89,7 +93,16 @@ let PersonalDict = '~/.ispell_' . IspellLang
" mark character exceeding the 80 limit as errors
"match Error /\%>80v/
-set paste
+" paste insert mode
+nmap I :set paste<CR>i
+
+function! CodeMode()
+ highlight OverLength ctermbg=red ctermfg=white guibg=#592929
+ match OverLength /\%81v.\+/
+endfunction
+
+au BufRead,BufNewFile *.cc setfiletype cpp
+au FileType javascript,c,c++,ruby,python,c,cpp,java,puppet call CodeMode()
" FileTypes
" ==================================================================