From 8beea916fa9e17c82b7dd08e2a98cc1f5dee3737 Mon Sep 17 00:00:00 2001 From: Loic Nageleisen Date: Sun, 29 May 2011 16:51:05 +0200 Subject: [PATCH] rc, pathogen, solarized --- .gitmodules | 3 + autoload/pathogen.vim | 142 ++++++++++++++++++++++ bundle.available/vim-colors-solarized | 1 + bundle/vim-colors-solarized | 1 + vimrc | 167 ++++++++++++++++++++++++++ 5 files changed, 314 insertions(+) create mode 100644 .gitmodules create mode 100644 autoload/pathogen.vim create mode 160000 bundle.available/vim-colors-solarized create mode 120000 bundle/vim-colors-solarized create mode 100644 vimrc diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..4279511 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "bundle.available/vim-colors-solarized"] + path = bundle.available/vim-colors-solarized + url = http://github.com/altercation/vim-colors-solarized.git diff --git a/autoload/pathogen.vim b/autoload/pathogen.vim new file mode 100644 index 0000000..e10fac9 --- /dev/null +++ b/autoload/pathogen.vim @@ -0,0 +1,142 @@ +" pathogen.vim - path option manipulation +" Maintainer: Tim Pope +" Version: 1.3 + +" Install in ~/.vim/autoload (or ~\vimfiles\autoload). +" +" API is documented below. + +if exists("g:loaded_pathogen") || &cp + finish +endif +let g:loaded_pathogen = 1 + +" Split a path into a list. +function! pathogen#split(path) abort " {{{1 + if type(a:path) == type([]) | return a:path | endif + let split = split(a:path,'\\\@ 2) + syntax on +endif + +"enable filetype detection +"filetype on +filetype plugin on +filetype indent on + +"ignore some files +set wildignore+=*.o,*.obj,.git,.svn,*.pyc + +"display more info +set showmode "display current mode at the bottom +set showcmd "display command info at the bottom +set ruler "display coordinates and relative position at the bottom +set number "show line numbers in left margin +set laststatus=1 + + +" search tweaks +set incsearch +set ignorecase "ignore case when searching +set smartcase "... but be nice when actually typing caps + +" tabbing settings +set shiftwidth=4 "indent size +set shiftround "round indent to next offset +set tabstop=4 "size of tab character +set expandtab "insert spaces instead of tab +set softtabstop=4 "... and that much spaces are inserted +set smarttab "tab insertion actually indents on line start +set autoindent "new line copies indent from above + +"feedback +set cursorline "highlight current line +set showmatch "highlight both matching parentheses +set listchars=eol:¬,tab:→\ ,nbsp:•,trail:⋅ +set list + +"filetype specific settings +autocmd FileType make set noexpandtab "makefiles need tabs + +"swap files +"set directory=/var/tmp,. + +"key mappings +let mapleader = ',' + +"Command-T mappings +let g:CommandTAcceptSelectionTabMap='' +let g:CommandTAcceptSelectionMap='' + +" xterm escape codes for osx-like cursor motion +"noremap  +"noremap  +"noremap  +"noremap  +"noremap  +"noremap  +"noremap!  +"noremap!  +"noremap!  +"noremap!  +"noremap!  +"noremap!  + +" highlight background for >80 +"highlight OverLength ctermbg=red ctermfg=white guibg=#592929 +"match OverLength /\%81v.\+/ + + +" restore last known cursor position +function! ResCur() + if line("'\"") <= line("$") + normal! g`" + return 1 + endif +endfunction + +" unfold at cursor position +if has("folding") + function! UnfoldCur() + if !&foldenable + return + endif + let cl = line(".") + if cl <= 1 + return + endif + let cf = foldlevel(cl) + let uf = foldlevel(cl - 1) + let min = (cf > uf ? uf : cf) + if min + execute "normal!" min . "zo" + return 1 + endif + endfunction +endif + +" restore last known cursor position on open +augroup resCur + autocmd! + if has("folding") + autocmd BufWinEnter * if ResCur() | call UnfoldCur() | endif + else + autocmd BufWinEnter * call ResCur() + endif +augroup END +