summaryrefslogtreecommitdiff
path: root/.vimrc
diff options
context:
space:
mode:
Diffstat (limited to '.vimrc')
-rw-r--r--.vimrc32
1 files changed, 32 insertions, 0 deletions
diff --git a/.vimrc b/.vimrc
new file mode 100644
index 0000000..a15e795
--- /dev/null
+++ b/.vimrc
@@ -0,0 +1,32 @@
+syntax on
+colo industry
+set number
+set mouse-=a
+set backspace=indent,eol,start
+set wildmode=longest:full,full
+filetype plugin indent on
+set tabstop=4
+set shiftwidth=4
+set expandtab
+set autoindent
+set breakindent
+set formatoptions=t1
+set lbr
+"set viminfo='100,<1000,s100,h
+set viminfo='20,<100000
+
+" highlight stray spaces and tabs when out of insert mode
+highlight ExtraWhitespace ctermbg=red guibg=red
+match ExtraWhitespace /\s\+$/
+autocmd BufWinEnter * match ExtraWhitespace /\s\+$/
+autocmd InsertEnter * match ExtraWhitespace /\s\+\%#\@<!$/
+autocmd InsertLeave * match ExtraWhitespace /\s\+$/
+autocmd BufWinLeave * call clearmatches()
+autocmd FileType go setlocal noet ts=4 sw=4
+autocmd FileType markdown setlocal tw=80 et ts=2 sw=2
+autocmd FileType python setlocal et ts=4 sw=4
+autocmd FileType text setlocal tw=80
+autocmd FileType html setlocal et ts=2 sw=2
+autocmd FileType c setlocal noet ts=8 sw=8 tw=80
+autocmd FileType h setlocal noet ts=8 sw=8 tw=80
+autocmd FileType cpp setlocal noet ts=8 sw=8 tw=80