dotfiles/vim-files/.vimrc

128 lines
2.7 KiB
VimL
Raw Normal View History

2013-08-01 19:40:59 -07:00
filetype off
call pathogen#infect()
call pathogen#helptags()
2013-08-01 20:07:12 -07:00
let g:pymode_lint=0
2013-08-01 19:40:59 -07:00
2013-08-01 19:22:01 -07:00
filetype plugin indent on
2013-08-01 19:40:59 -07:00
syntax on
2013-08-01 20:07:12 -07:00
colorscheme lucius
set t_Co=256
if &term =~ 'xterm-color'
set t_ut=
endif
2013-08-02 01:46:36 -07:00
let g:Powerline_symbols = 'fancy'
set nocompatible
set laststatus=2
2013-08-01 20:07:12 -07:00
if v:version >= 703
"undo settings
set undodir=~/.vim/undofiles
set undofile
set colorcolumn=+1 "mark the ideal max text width
endif
2013-08-01 20:07:12 -07:00
set backspace=indent,eol,start
set showmode
2013-08-01 20:07:12 -07:00
set number
set numberwidth=1
set background=dark
set cursorline
set cursorcolumn
set ruler
set matchpairs+=<:>
set listchars=tab:>-,eol:$,trail:-,precedes:<,extends:>
set list
""" Searching and Patterns
set ignorecase
set smartcase
set smarttab
set hlsearch
""" Folding
set nofoldenable
""" Statusline
set statusline= " clear the statusline for when vimrc is reloaded
set statusline =%#identifier#
set statusline+=%{fugitive#statusline()}
set statusline+=[%f] "tail of the filename
set statusline+=%*
"display a warning if fileformat isnt unix
set statusline+=%#warningmsg#
set statusline+=%{&ff!='unix'?'['.&ff.']':''}
set statusline+=%*
"display a warning if file encoding isnt utf-8
set statusline+=%#warningmsg#
set statusline+=%{(&fenc!='utf-8'&&&fenc!='')?'['.&fenc.']':''}
set statusline+=%*
set statusline+=%h "help file flag
set statusline+=%y "filetype
"read only flag
set statusline+=%#identifier#
set statusline+=%r
set statusline+=%*
"modified flag
set statusline+=%#identifier#
set statusline+=%m
set statusline+=%*
set statusline+=%{StatuslineTrailingSpaceWarning()}
2013-08-02 04:00:42 -07:00
set statusline+=%= "left/right separator
set statusline+=%c, "cursor column
set statusline+=%l/%L "cursor line/total lines
set statusline+=\ %P "percent through file
set laststatus=2
"recalculate the trailing whitespace warning when idle, and after saving
autocmd cursorhold,bufwritepost * unlet! b:statusline_trailing_space_warning
"return '[\s]' if trailing white space is detected return '' otherwise
function! StatuslineTrailingSpaceWarning()
if !exists("b:statusline_trailing_space_warning")
if !&modifiable
let b:statusline_trailing_space_warning = ''
return b:statusline_trailing_space_warning
endif
if search('\s\+$', 'nw') != 0
let b:statusline_trailing_space_warning = '[\s]'
else
let b:statusline_trailing_space_warning = ''
endif
endif
return b:statusline_trailing_space_warning
endfunction
2013-08-01 20:07:12 -07:00
2013-08-02 01:46:36 -07:00
""" Powerline
""" set rtp+=~/.vim/bundle/powerline/powerline/bindings/vim
2013-08-02 01:46:36 -07:00
2013-08-02 03:58:19 -07:00
""" CtrlP
let g:ctrlp_show_hidden = 1
2013-08-01 20:07:12 -07:00
""" Handy remaps
:noremap ; :
:inoremap jj <Esc>
2013-08-01 20:13:27 -07:00
nnoremap <silent> <F8> :TlistToggle<CR>
map <silent> <leader>V :source ~/.vimrc<CR>:filetype detect<CR>:exe ":echo 'vimrc reloaded'"<CR>
2013-08-01 20:07:12 -07:00
""" Use the mouse
set mouse=a