"Colors to get: "Vydark: http://www.vim.org/scripts/script.php?script_id=3309 "{{{ Custom Paths let $dropbox="E:\\Dropbox" let $unilua="$dropbox\\TAS Stuff\\Uniracers\\Scripts" let $vimwiki="~\\vimwiki" "}}} "{{{ Auto Commands " Automatically cd inot the directory that the file is in autocmd BufEnter * execute "chdir ".escape(expand("%:p:h"), ' ') " Remove any trailing whitespace that is in the file autocmd BufRead,BufWrite * if ! &bin | silent! %s/\s\+$//ge | endif " Restore cursor position to where it was before augroup JumpCursorOnEdit au! autocmd BufReadPost * \ if expand(":p:h") !=? $TEMP | \ if line("'\"") > 1 && line("'\"") <= line("$") | \ let JumpCursorOnEdit_foo = line("'\"") | \ let b:doopenfold = 1 | \ if (foldlevel(JumpCursorOnEdit_foo) > foldlevel(JumpCursorOnEdit_foo - 1)) | \ let JumpCursorOnEdit_foo = JumpCursorOnEdit_foo - 1 | \ let b:doopenfold = 2 | \ endif | \ exe JumpCursorOnEdit_foo | \ endif | \ endif " Need to postpone using "zv" until after reading the modelines. autocmd BufWinEnter * \ if exists("b:doopenfold") | \ exe "normal zv" | \ if(b:doopenfold > 1) | \ exe "+".1 | \ endif | \ unlet b:doopenfold | \ endif augroup END " Set word wrap for text files au BufRead,BufNewFile *.txt,*.tex,*.wiki set wrap linebreak nolist textwidth=0 wrapmargin=0 "}}} "{{{ Plugin Management " Necessary for lots of cool Vim things set nocompatible " Vundle config filetype off " set the runtime path to include Vundle and initialize set rtp+=~/vimfiles/bundle/Vundle.vim/ let path='~/vimfiles/bundle' call vundle#begin(path) " alternatively, pass a path where Vundle should install plugins "call vundle#begin('~/some/path/here') " let Vundle manage Vundle, required Plugin 'gmarik/Vundle.vim' " Goto vimawesome.com to find the entries to put here Plugin 'yaroot/vissort' Plugin 'vimwiki' Plugin 'bling/vim-airline' Plugin 'scrooloose/nerdtree' Plugin 'taglist.vim' Plugin 'xolox/vim-session' Plugin 'xolox/vim-misc' Plugin 'scrooloose/syntastic' Plugin 'Townk/vim-autoclose' Plugin 'thinca/vim-singleton' " use :PluginInstall to update plugins " All of your Plugins must be added before the following line call vundle#end() " required filetype plugin indent on " required " To ignore plugin indent changes, instead use: "filetype plugin on " " Brief help " :PluginList - lists configured plugins " :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate " :PluginSearch foo - searches for foo; append `!` to refresh local cache " :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal " " see :h vundle for more details or wiki for FAQ " Put your non-Plugin stuff after this line "}}} "{{{ Misc Settings " This shows what you are typing as a command. set showcmd " Folding Stuffs set foldmethod=marker " Needed for Syntax Highlighting and stuff filetype on filetype plugin on filetype plugin indent on syntax enable syntax on set grepprg=grep\ -nH\ $* " Who doesn't like autoindent? set autoindent " Spaces are better than a tab character set expandtab set smarttab " 4-character tab set shiftwidth=4 set softtabstop=4 set tabstop=4 " Use english for spellchecking, but don't spellcheck by default if version >= 700 set spl=en spell set nospell endif " Cool tab completion stuff set wildmenu set wildmode=list:longest,full set wildignore=*.swp,*.bak " Enable mouse support in console set mouse=a " Make Backspace and Delete work like I expect them to set backspace=2 " Line numbers set number " Make searching ignore case, unless I put an uppercase character in the search set ignorecase set smartcase " Incremental search set incsearch " Highlight search terms set hlsearch " This allows buffers to be hidden if you've modified a buffer. set hidden " Set off the other paren highlight MatchParen ctermbg=4 " Enable virtual space set virtualedit=all " Set no wrapping set nowrap " make sure the statusline shows set laststatus=2 " get rid of the default mode indicator set noshowmode " no backup files set nobackup set noswapfile " Enable the list of buffers let g:airline#extensions#tabline#enabled = 1 " Show just the filename let g:airline#extensions#tabline#fnamemod = ':t' let g:session_autosave='yes' let g:session_autoload='yes' call singleton#enable() "}}} "{{{ Look and Feel " Favorite Color Scheme colo vydark " other good themes: breeze, darkeclipse, dusk, lucius, oceanblack, " paintbox, rainbow_neon, rootwater, slate2, sorcerer, watermark, wuye, " xoria256 " Highlight the current line set cursorline " GUI options if has("gui_running") set encoding=utf-8 " Set font to Consolas " Download the Consolas for Powerline patch here: https://github.com/nicolalamacchia/powerline-consolas set guifont=Consolas:h10:cANSI " Powerline font configuration let g:airline_powerline_fonts = 1 " Remove toolbar and menu set go-=T set go-=m " Add horizontal scroll bar set go+=b " set startup size set lines=50 columns=250 endif "}}} "{{{ Mappings " \ev - Edit vimrc nnoremap ev :tabnew:e ~/_vimrc " Space will toggle folds! nnoremap za " Next Tab nnoremap :tabnext " Previous Tab nnoremap :tabprevious " New Tab nnoremap :tabnew " Bind autocompletion to Ctrl+Space imap " Use jj to exit insert mode imap jj " Mappings to move lines up and down nnoremap :m .+1== nnoremap :m .-2== inoremap :m .+1==gi inoremap :m .-2==gi vnoremap :m '>+1gv=gv vnoremap :m '<-2gv=gv " Open dialog nnoremap :tabnew:browse confirm e " Save dialog nnoremap :browse confirm w " move vertically by visual line nnoremap j gj nnoremap k gk " copy, cut and paste shortcuts nnoremap "+y nnoremap "+x nnoremap "+gP " Open a new buffer nnoremap bn :enew " close the current buffer and move to the previous one nnoremap bq :bp bd # " show all open buffers and their status nnoremap bl :ls " movement between buffers nnoremap :bnext nnoremap :bprevious nnoremap :tabnext nnoremap :tabprevious " plugin command mapping nnoremap pi :PluginInstall nnoremap nt :NERDTree " save some shift presses nnoremap ; : "This unsets the "last search pattern" register by hitting return nnoremap :noh "Ctrl-Backspace to delete a word in insert mode inoremap ldbi "}}} "{{{ Custom Commands command Pushvimrc call system("copy " . expand("$homepath\\_vimrc") . " " . expand(expand("$dropbox\\_vimrc"))) command Pullvimrc call system("copy " . expand(expand("$dropbox\\_vimrc")) . " " . expand("$homepath\\_vimrc")) command Wiki :e $vimwiki\index.wiki "}}}