Created
March 19, 2016 21:35
-
-
Save LLBlumire/a1f5f0653d252f228175 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" | |
" ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ | |
" ┃ Lucille Blumire's One Vimrc To Rule Them All ┃ | |
" ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ | |
" | |
" If you get any errors while running this please let me know. | |
" | |
" Please check every instance of `IMPORTANT:` in this file to make sure you have made appropriate | |
" replacements to convert this from my filesystem to yours. | |
" You can quickly scan through instances of this by typing `/IMPORTANT:` in normal mode | |
" | |
set nocompatible " Disable Legacy Vi Support | |
" ===== Plugin Handling ===== | |
" IMPORTANT: Set the following to the path to your Vundle.vim | |
set rtp+=C:\Users\Sam\vimfiles\bundle\Vundle.vim | |
call vundle#begin() " The Vundle Prelude | |
" Let Vundle manage itself. | |
Plugin 'VundleVim/Vundle.vim' | |
" Programming Language Plugins (alphabetical) | |
" Languages Liable to be Added and Removed Randomly as I see fit. | |
" IMPORTANT: Change Language Support Here to your Prefered Stuff | |
Plugin 'hail2u/vim-css3-syntax' " CSS3 | |
Plugin 'mattn/emmet-vim' " Emmet | |
Plugin 'othree/html5.vim' " HTML5 | |
Plugin 'tpope/vim-markdown' " Markdown | |
Plugin 'rust-lang/rust.vim' " Rust | |
Plugin 'wavded/vim-stylus' " Stylus | |
Plugin 'cespare/vim-toml' " Toml | |
" Color Theme | |
Plugin 'NLKNguyen/papercolor-theme' | |
" Airline | |
Plugin 'bling/vim-airline' | |
" File Browser | |
Plugin 'scrooloose/nerdtree' | |
" Write Time Syntax Checking | |
Plugin 'scrooloose/syntastic' | |
" Node Graph Rendering for Undo History | |
Plugin 'sjl/gundo.vim' | |
" Git Integration | |
Plugin 'tpope/vim-fugitive' | |
" Additional Navigation Commands | |
Plugin 'tpope/vim-unimpaired' | |
" Collaborative Editing | |
Plugin 'FredKSchott/CoVim' | |
call vundle#end() " The Vundle Postlude | |
" ===== Colorscheme ===== | |
set t_Co=256 " 256 bit Color | |
set background=light " Light Background | |
colorscheme PaperColor " PaperColor Colours | |
" ===== Interface ===== | |
" Configure the Status Bar | |
set laststatus=2 | |
let g:airline_left_sep='' | |
let g:airline_right_sep='' | |
set statusline+=%#warningmsg# | |
set statusline+=%{SyntasticStatuslineFlag()} | |
set statusline+=%* | |
if !exists('g:airline_symbols') | |
let g:airline_symbols = {} | |
endif | |
let g:airline_symbols.branch = '~ ' | |
" Configure Syntastic Settings | |
let g:syntastic_always_populate_loc_list = 1 | |
let g:syntastic_auto_loc_list = 1 | |
let g:syntastic_check_on_open = 1 | |
let g:syntastic_check_on_wq = 0 | |
" Configure CoVim | |
let CoVim_default_name = "LucilleBlumire" | |
let CoVim_default_port = 7777 | |
" Disable GUI Nonsense | |
if has("gui_running") | |
set go+=c " Console Dialogs insted of Popups | |
set go-=e " Text based Tab Pages | |
set go-=m " Remove the Context Menu | |
set go-=T " Remove the Icon Toolbar | |
set go-=r " Remove the Right hand scrollbar | |
set go-=R " Remove the Right hand scrollbar 2 Electric Boogaloo | |
set go-=l " Remove the Left hand scrollbar | |
set go-=L " Remove the Left hand scrollbar 2 Electric Boogaloo | |
set go-=b " Remove the Bottom scrollbar | |
endif | |
" Turn on Syntax Hilighting as Filetype Magic | |
filetype plugin indent on | |
syntax on | |
" Enable Folding By Syntax | |
set foldmethod=syntax | |
" Set Spelling Lnaguage so Something Sensible | |
set spelllang=en_gb | |
" Line Number Settings | |
set number " Turn on Line Numbers | |
set relativenumber " Line Numbers should be Relative, not absolute | |
" Set a Nice Font | |
if has("gui_running") | |
set guifont=Fira_Mono:h11:cANSI | |
endif | |
" Incremental Searching | |
set incsearch | |
" Wild Menu for Tab Completion | |
set wildmenu | |
" Sensible Whitespace Deliminating Characters | |
set listchars=eol:#,tab:->,trail:-,extends:>,precedes:<,conceal:?,nbsp:+ | |
" Always show one line above and bellow the cursor, and 5 chars left and write | |
set scrolloff=1 | |
set sidescrolloff=5 | |
" ===== Editing ===== | |
" Limit Text Width | |
set textwidth=100 "Wrap after 100 characters | |
set colorcolumn=100 "Color our Final Column | |
" Allow backspace to behave in a sane mannor | |
set backspace=indent,eol,start | |
" Sensible Tab Settings | |
set tabstop=4 " Tabs Render as 4 Characters | |
set expandtab " Using Tab inserts Spaces | |
set softtabstop=4 " Tabs are Inserted as 4 spaces | |
set shiftwidth=4 " Using > and < shifts text by 4 spaces | |
" Unicode Support | |
if has("multi_byte") | |
if &termencoding == "" | |
let &termencoding = &encoding | |
endif | |
set encoding=utf-8 | |
setglobal fileencoding=utf-8 | |
set fileencodings=ucs-bom,utf-8,latin1 | |
endif | |
" ===== File Writing ===== | |
" Turn off All backups, everything important is in version control anyway | |
set nobackup | |
set nowritebackup | |
" Turn off swap files, because I have ram. | |
" IMPORTANT: REMOVE THIS IF YOU DON'T HAVE RAM | |
set noswapfile | |
" ===== MAPS ===== | |
" Command line mode remaps | |
" | |
" %% - Path to current File | |
" %^ - Current file with no extention | |
" IMPORTANT: Replace '\' with '/' in *nix Systems. | |
cnoremap %% <C-R>=fnameescape(expand('%:h')).'\'<cr> | |
cnoremap %^ <C-R>=fnameescape(expand('%:r'))<cr> | |
" Normal Mode Maps | |
" (Editing) | |
map <leader>ew :e %% | |
map <leader>es :sp %% | |
map <leader>ev :vsp %% | |
map <leader>et :tabe %% | |
" (Rust) | |
map <leader>cb :! cargo build<CR> | |
map <leader>ct :! cargo test<CR> | |
map <leader>cr :! cargo run<CR> | |
map <leader>cd :! cargo doc<cr> | |
" (Latex) | |
" IMPORTANT: Replace with your pdf editor of choice | |
map <leader>lb :! xelatex %<CR> | |
" ===== File Type Options ===== | |
" | |
autocmd BufNewFile,BufReadPost *.md set filetype=markdown " Load all .md files as markdown | |
autocmd BufNewFile,BufReadPost *.rs set filetype=rust " Load all .rs files as rust | |
autocmd BufNewFile,BufReadPost *.toml set filetype=toml " Load all .toml files as toml |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment