Vimrc cleanup - in clean easy to read sections

Moved appearance settings to plugin/settings/skwp-appearance.vim
This commit is contained in:
yan
2011-12-17 14:11:05 -08:00
committed by Yan Pritzker
parent b125a96fb8
commit 9674873091
5 changed files with 120 additions and 122 deletions

144
vimrc
View File

@@ -1,128 +1,88 @@
"Use Vim settings, rather then Vi settings (much better!).
"This must be first, because it changes other options as a side effect.
" Use Vim settings, rather then Vi settings (much better!).
" This must be first, because it changes other options as a side effect.
set nocompatible
" =============== Pathogen Initialization ===============
" This loads all the plugins in ~/.vim/bundle
" Use tpope's pathogen plugin to manage all other plugins
runtime bundle/tpope-vim-pathogen/autoload/pathogen.vim
call pathogen#infect()
call pathogen#helptags()
set number " Line numbers are good
runtime bundle/tpope-vim-pathogen/autoload/pathogen.vim
call pathogen#infect()
call pathogen#helptags()
"allow backspacing over everything in insert mode
set backspace=indent,eol,start
" ================ General Config ====================
"store lots of :cmdline history
set history=1000
set number "Line numbers are good
set backspace=indent,eol,start "Allow backspace in insert mode
set history=1000 "Store lots of :cmdline history
set showcmd "Show incomplete cmds down the bottom
set showmode "Show current mode down the bottom
set gcr=a:blinkon0 "Disable cursor blink
set showcmd "show incomplete cmds down the bottom
set showmode "show current mode down the bottom
set autoread "Reload files changed outside vim
set incsearch "find the next match as we type the search
set hlsearch "hilight searches by default
" This makes vim act like all other editors, buffers can
" exist in the background without being in a window.
" http://items.sjbach.com/319/configuring-vim-right
set hidden
set nowrap "dont wrap lines
set linebreak "wrap lines at convenient points
"turn on syntax highlighting
syntax on
" swapfiles are lame. we have git
set noswapfile
" ================ Search Settings =================
set incsearch "Find the next match as we type the search
set hlsearch "Hilight searches by default
set viminfo='100,f1 "Save up to 100 marks, enable capital marks
" ================ Turn Off Swap Files ==============
set noswapfile
set nobackup
set nowb
" Disable cursor blink
set gcr=a:blinkon0
" ================ Persistent Undo ==================
" Keep undo history across sessions, by storing in file.
" Only works in MacVim (gui) mode.
" persistent undos - undo after you re-open the file
" but this gives warnings under command line vim
" use only in macvim
if has('gui_running')
set undodir=~/.vim/backups
set undofile
endif
" indent
set ai " autoindent
set si " smart indent
set smarttab
" ================ Indentation ======================
"indent settings
set autoindent
set smartindent
set smarttab
set shiftwidth=2
set softtabstop=2
set tabstop=2
set expandtab
set autoindent
" Prevent 'Press ENTER..' on error messages
set shortmess=atI
filetype plugin on
filetype indent on
" Display tabs and trailing spaces visually
set list listchars=tab:\ \ ,trail
set nowrap "Don't wrap lines
set linebreak "Wrap lines at convenient points
" ================ Folds ============================
"folding settings
set foldmethod=indent "fold based on indent
set foldnestmax=3 "deepest fold is 3 levels
set nofoldenable "dont fold by default
"make cmdline tab completion similar to bash
" ================ Completion =======================
set wildmode=list:longest
set wildmenu "enable ctrl-n and ctrl-p to scroll thru matches
set wildignore=*.o,*.obj,*~ "stuff to ignore when tab completing
"display tabs and trailing spaces
set list listchars=tab:\ \ ,trail
" ================ Scrolling ========================
set formatoptions-=o "dont continue comments when pushing o/O
"vertical/horizontal scroll off settings
set scrolloff=8
set sidescrolloff=7
set scrolloff=8 "Start scrolling when we're 8 lines away from margins
set sidescrolloff=15
set sidescroll=1
"load ftplugins and indent files
filetype plugin on
filetype indent on
"turn on syntax highlighting
syntax on
"some stuff to get the mouse going in term
set mouse=a
set ttymouse=xterm2
" The current buffer can be put to the background without writing to disk;
" When a background buffer becomes current again, marks and undo-history are remembered.
" Turn this on.
" http://items.sjbach.com/319/configuring-vim-right
set hidden
" Make it beautiful - colors and fonts
if has("gui_running")
"tell the term has 256 colors
set t_Co=256
" http://ethanschoonover.com/solarized/vim-colors-solarized
colorscheme solarized
set background=dark
" Show tab number (useful for Cmd-1, Cmd-2.. mapping)
" For some reason this doesn't work as a regular set command,
" (the numbers don't show up) so I made it a VimEnter event
autocmd VimEnter * set guitablabel=%N:\ %t\ %M
set lines=60
set columns=190
set guifont=Inconsolata:h20,Monaco:h17
else
"dont load csapprox if we no gui support - silences an annoying warning
let g:CSApprox_loaded = 1
endif
" automaticaly reload files changed outside of vim
set autoread
" save up to 100 marks and f1 means global marks (capital letters) are enabled
set viminfo='100,f1
" prevent auto insert mode, which is helpful when using conque
" term for running tests
"
autocmd WinEnter * stopinsert