" ------------------ PLUGINS ----------------- filetype plugin on set rtp+=~/.vim/bundle/vundle/ call vundle#rc() Bundle 'gmarik/vundle' Bundle 'chrisbra/SudoEdit.vim' Bundle 'ervandew/supertab' Bundle 'kien/ctrlp.vim' Bundle 'nanotech/jellybeans.vim' Bundle 'itchyny/lightline.vim' Bundle 'bling/vim-bufferline' Bundle 'scrooloose/nerdcommenter' Bundle 'scrooloose/nerdtree' Bundle 'Townk/vim-autoclose' Bundle 'tpope/vim-fugitive' Bundle 'tpope/vim-surround' Bundle 'vim-scripts/Align' Bundle 'lilydjwg/colorizer' Bundle 'sjl/gundo.vim' Bundle 'Lokaltog/vim-easymotion' Bundle 'corntrace/bufexplorer' Bundle 'msanders/snipmate.vim' " -------------------GUI --------------------- colorscheme jellybeans if has('gui_running') set guifont=xft:Inconsolata\ for\ Powerline\ 10 endif scriptencoding utf-8 set encoding=utf-8 " ------------------ GLOBAL ------------------ let mapleader="," syntax on set hidden set wildmenu set showcmd set hlsearch " ----------------- USABILITY ---------------- set ignorecase set smartcase set backspace=indent,eol,start set nostartofline set ruler set laststatus=2 set confirm set visualbell set t_vb= set mouse=a set cmdheight=2 set number set notimeout ttimeout ttimeoutlen=200 set pastetoggle= " ---------------- INDENT ------------------- set autoindent set shiftwidth=2 set tabstop=2 " --------------- MAPPINGS ------------------ map Y y$ nnoremap :nohl " --------------- LIGHTLINE ----------------- let g:lightline = { \ 'colorscheme': 'landscape', \ 'mode_map': { 'c': 'NORMAL' }, \ 'active': { \ 'left': [ [ 'mode', 'paste' ], [ 'fugitive', 'filename' ] ] \ }, \ 'component_function': { \ 'modified': 'MyModified', \ 'readonly': 'MyReadonly', \ 'fugitive': 'MyFugitive', \ 'filename': 'MyFilename', \ 'fileformat': 'MyFileformat', \ 'filetype': 'MyFiletype', \ 'fileencoding': 'MyFileencoding', \ 'mode': 'MyMode', \ }, \ 'separator': { 'left': '⮀', 'right': '⮂' }, \ 'subseparator': { 'left': '⮁', 'right': '⮃' } \ } function! MyModified() return &ft =~ 'help\|vimfiler\|gundo' ? '' : &modified ? '+' : &modifiable ? '' : '-' endfunction function! MyReadonly() return &ft !~? 'help\|vimfiler\|gundo' && &readonly ? '⭤' : '' endfunction function! MyFilename() return ('' != MyReadonly() ? MyReadonly() . ' ' : '') . \ (&ft == 'vimfiler' ? vimfiler#get_status_string() : \ &ft == 'unite' ? unite#get_status_string() : \ &ft == 'vimshell' ? vimshell#get_status_string() : \ '' != expand('%:t') ? expand('%:t') : '[No Name]') . \ ('' != MyModified() ? ' ' . MyModified() : '') endfunction function! MyFugitive() if &ft !~? 'vimfiler\|gundo' && exists("*fugitive#head") let _ = fugitive#head() return strlen(_) ? '⭠'._ : '' endif return '' endfunction function! MyFileformat() return winwidth(0) > 70 ? &fileformat : '' endfunction function! MyFiletype() return winwidth(0) > 70 ? (strlen(&filetype) ? &filetype : 'no ft') : '' endfunction function! MyFileencoding() return winwidth(0) > 70 ? (strlen(&fenc) ? &fenc : &enc) : '' endfunction function! MyMode() return winwidth(0) > 60 ? lightline#mode() : '' endfunction