aboutsummaryrefslogtreecommitdiffstats
path: root/vim/vimrc
diff options
context:
space:
mode:
authorJohannes Löthberg <johannes@kyriasis.com>2014-02-02 20:35:42 +0100
committerJohannes Löthberg <johannes@kyriasis.com>2014-02-02 22:01:01 +0100
commit7e7aa928072775240ff70ca61f2dd0e8a09242d8 (patch)
treee22d0a73612befd95744dec72770e74593ab47cd /vim/vimrc
downloaddotfiles-7e7aa928072775240ff70ca61f2dd0e8a09242d8.tar.xz
(Let's pretend that this is the) initial commit
Diffstat (limited to 'vim/vimrc')
-rw-r--r--vim/vimrc70
1 files changed, 70 insertions, 0 deletions
diff --git a/vim/vimrc b/vim/vimrc
new file mode 100644
index 0000000..b6c4397
--- /dev/null
+++ b/vim/vimrc
@@ -0,0 +1,70 @@
+set nocompatible " be iMproved
+
+" Respect XDG
+set directory=$XDG_CACHE_HOME/vim,~/,/tmp
+set backupdir=$XDG_CACHE_HOME/vim,~/,/tmp
+set viminfo+=n$XDG_CACHE_HOME/vim/viminfo
+set runtimepath=$XDG_CONFIG_HOME/vim,$XDG_CONFIG_HOME/vim/after,$VIM,$VIMRUNTIME,/usr/share/vim/vimfiles
+let $MYVIMRC="$XDG_CONFIG_HOME/vim/vimrc"
+
+" Make backspace behave in a sane manner.
+set backspace=indent,eol,start
+
+" NeoBndle stuff
+set runtimepath+=~/.config/vim/bundle/neobundle.vim/
+call neobundle#rc('/home/kyrias/.config/vim/bundle')
+NeoBundleFetch 'Shougo/neobundle.vim'
+
+NeoBundle 'Shougo/vimproc', {
+ \ 'build' : {
+ \ 'unix' : 'make -f make_unix.mak',
+ \ },
+ \ }
+NeoBundle 'Shougo/unite.vim'
+
+" Colorscheme❤
+NeoBundle "daylerees/colour-schemes", { "rtp": "vim-themes/" }
+colorscheme Darkcustomside
+
+" Smart Tabs (http://www.emacswiki.org/emacs/SmartTabs)
+NeoBundle 'gustavo-hms/vim-smart-tabs'
+
+" Switch syntax highlighting on
+syntax on
+" Enable file type detection and do language-dependent indenting.
+filetype plugin indent on
+
+" Tabs are 4 spaces wide
+set tabstop=8
+set softtabstop=8
+set shiftwidth=9
+set noexpandtab
+
+" Make the cursor be on the left side in normal mode if line starts with tab
+set list lcs=tab:\ \
+" Note the extra space after the second \
+
+" Append modeline after last line in buffer.
+function! AppendModeline()
+ let l:modeline = printf(" vim: set ts=%d sw=%d %set:",
+ \ &tabstop, &shiftwidth, &expandtab ? '' : 'no')
+ let l:modeline = substitute(&commentstring, "%s", l:modeline, "")
+ call append(line("$"), l:modeline)
+endfunction
+nnoremap <silent> <Leader>ml Go<ESC>``:call AppendModeline()<CR>
+
+" Paste mode when pressing Insert, disables autoformating
+set pastetoggle=<Insert>
+
+" Installation check.
+NeoBundleCheck
+
+set listchars=tab:»·,trail:·
+set list
+
+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()