" Vundle filetype off " required! set rtp+=~/.vim/bundle/vundle/ call vundle#rc() " let Vundle manage Vundle " required! Bundle 'gmarik/vundle' " Rest of my bundles " File Nav Bundle 'kien/ctrlp.vim' Bundle 'scrooloose/nerdtree' Bundle 'a.vim' Bundle 'file-line' " Needs Vim compiled with Ruby Bundle 'wincent/Command-T' Bundle 'tpope/vim-fugitive' " Buffer Nav Bundle 'kien/tabman.vim' Bundle 'sandeepcr529/Buffet.vim' " Needs Vim compiled with Ruby Bundle 'mutewinter/LustyJuggler' " Nav in file Bundle 'taglist.vim' " Text Manipulation Bundle 'tomtom/tcomment_vim' " GUI Bundle 'vividchalk.vim' Bundle 'gregsexton/MatchTag' "Allow arrow keys set nocompatible "Enable mouse input set mousehide set mouse=a "tab functionality "tabs inserted as 4 spaces "backspace deletes all spaces "autoindent enabled set expandtab set tabstop=4 set shiftwidth=4 set softtabstop=4 set autoindent filetype plugin indent on set virtualedit=onemore " allow for cursor beyond last character set scrolljump=5 " lines to scroll when cursor leaves screen set scrolloff=3 " minimum lines to keep above and below cursor "Set backup dirs set backup set backupdir=~/.vim/backup set directory=~/.vim/tmp "set theme :colorscheme vividchalk "Highlights the line the cursor is on set cursorline :hi CursorLine cterm=NONE ctermbg=darkred guibg=darkred guifg=white "Toggle highlighting with \hr (highlight row) nnoremap hr :set cursorline! "enable line numbers set nu "Toggle Line numbers with Ctrl+N double tap nmap :set invnumber nmap ln :set invnumber "Toggle line wrap with Ctrl+L double tap nmap :set wrap! nmap lw :set wrap! "Allows filetype detection filetype on "editing multiple files "Ctrl+j maximizes split below "Ctrl+k maximizes split above "allows size 0 splits "map j_ "map k_ "set wmh=0 "Move between splits using Ctrl+hjkl map k map j map l map h " map Shift+U to redo map " Buffet shortcut nnoremap :Bufferlist "LustyJugler settings let g:LustyJugglerShowKeys=1 "Show numbers for Lusty Buffers let g:LustyJugglerSuppressRubyWarning=1 "NERDTree nnoremap nn :NERDTreeToggle nnoremap nf :NERDTreeFind "CTags List nnoremap :TlistToggle let Tlist_Exit_OnlyWindow=1 let Tlist_Winwidth=30 "Syntax Hightlighting syntax on "Remap jk to esc inoremap jk "Remap Ctrl+Space for auto Complete inoremap inoremap " Stupid shift key fixes "cmap W w cmap WQ wq cmap Wq wq cmap W w cmap Q q "Enable search highlighting set hls "clearing highlighted search nmap / :nohlsearch " Change Working Directory to that of the current file cmap cwd lcd %:p:h cmap cd. lcd %:p:h " --------------- " Command T and ctrlp.vim " Snagged from mutewinter @ https://github.com/mutewinter/dot_vim " --------------- " Ensure Ctrl-P isn't bound by default let g:ctrlp_map = '' " Ensure max height isn't too large. (for performance) let g:ctrlp_max_height = 10 let g:CommandTMaxHeight = 10 " Set the default escape keybinding to, you guessed it, escape. let g:CommandTCancelMap = '' " Dynamically use Command T or ctrlp.vim based on availability of Ruby. " We do this because Command T is much faster than ctrlp.vim. if has('ruby') " -------- " Use Command T since we've got Ruby " -------- " Conditional Mappings if has('unix') nnoremap :CommandT else nnoremap :CommandT endif " Leader Commands nnoremap t :CommandT else " -------- " Use ctrlp.vim since we don't have Ruby " -------- " Conditional Mappings if has('unix') let g:ctrlp_map = '' else let g:ctrlp_map = '' endif " Leader Commands nnoremap t :CtrlPRoot nnoremap b :CtrlPBuffer endif " Always use CtrlP for most recently used files and relative dierctory. if has('unix') nnoremap :CtrlPCurFile else nnoremap :CtrlPCurFile endif " Also map leader commands nnoremap u :CtrlPCurFile nnoremap m :CtrlPMRUFiles nnoremap b :CtrlPBuffer