Last active
January 14, 2016 15:43
-
-
Save w0ng/7e3f41b75c50fa3eb984 to your computer and use it in GitHub Desktop.
Vim with no plugins
This file contains hidden or 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
" | |
" ~/.vimrc | |
" | |
" No plugins. Based on https://github.com/w0ng/dotfiles/blob/master/.vimrc | |
" Compatability | |
set nocompatible " use vim defaults instead of vi | |
set encoding=utf-8 " always encode in utf | |
filetype plugin indent on | |
syntax on | |
" General | |
set backspace=2 " enable <BS> for everything | |
"set colorcolumn=120 " visual indicator of column | |
set completeopt-=preview " dont show preview window | |
"set cursorline " visual indicator of current line | |
set hidden " hide when switching buffers, don't unload | |
set laststatus=2 " always show status line | |
set lazyredraw " don't update screen when executing macros | |
"set mouse=a " enable mouse in all modes | |
set showmode " show mode in status line | |
set nowrap " disable word wrap | |
set number " show line numbers | |
set showcmd " show command on last line of screen | |
set showmatch " show bracket matches | |
set spelllang=en_au " spell check with Australian English | |
set textwidth=0 " don't break lines after some maximum width | |
set ttyfast " increase chars sent to screen for redrawing | |
"set ttyscroll=3 " limit lines to scroll to speed up display | |
set title " use filename in window title | |
set wildmenu " enhanced cmd line completion | |
" Folding | |
set foldignore= " don't ignore anything when folding | |
set foldlevelstart=99 " no folds closed on open | |
set foldmethod=indent " collapse code using indent levels | |
set foldnestmax=20 " limit max folds for indent and syntax methods | |
" Tabs | |
set autoindent " copy indent from previous line | |
set expandtab " replace tabs with spaces | |
set shiftwidth=4 " spaces for autoindenting | |
set smarttab " <BS> removes shiftwidth worth of spaces | |
set softtabstop=4 " spaces for editing, e.g. <Tab> or <BS> | |
set tabstop=4 " spaces for <Tab> | |
" Searches | |
set hlsearch " highlight search results | |
set incsearch " search whilst typing | |
set ignorecase " case insensitive searching | |
set smartcase " override ignorecase if upper case typed | |
" Colours | |
set t_Co=256 | |
set background=dark | |
" Copy to OSX CLIPBOARD | |
"vnoremap ,c "*y | |
" vimdiff display | |
if &diff | |
set diffopt=filler,foldcolumn:0 | |
endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment