Skip to content

Instantly share code, notes, and snippets.

@JeffreyWay
Created January 29, 2016 20:21
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save JeffreyWay/e48947e1a46c9fb09b02 to your computer and use it in GitHub Desktop.
Save JeffreyWay/e48947e1a46c9fb09b02 to your computer and use it in GitHub Desktop.
syntax enable
set backspace=indent,eol,start "Make backspace behave like every other editor.
let mapleader = ',' "The default is \, but a comma is much better.
set number "Let's activate line numbers.
"-------------Visuals--------------"
colorscheme atom-dark
set t_CO=256 "Use 256 colors. This is useful for Terminal Vim.
set guifont=Fira_Code:h17 "Set the default font family and size.
set linespace=15 "Macvim-specific line-height.
set guioptions-=l "Disable Gui scrollbars.
set guioptions-=L
set guioptions-=r
set guioptions-=R
"-------------Search--------------"
set hlsearch "Highlight all matched terms.
set incsearch "Incrementally highlight, as we type.
"-------------Split Management--------------"
set splitbelow "Make splits default to below...
set splitright "And to the right. This feels more natural.
"We'll set simpler mappings to switch between splits.
nmap <C-J> <C-W><C-J>
nmap <C-K> <C-W><C-K>
nmap <C-H> <C-W><C-H>
nmap <C-L> <C-W><C-L>
"-------------Mappings--------------"
"Make it easy to edit the Vimrc file.
nmap <Leader>ev :tabedit $MYVIMRC<cr>
"Add simple highlight removal.
nmap <Leader><space> :nohlsearch<cr>
"-------------Auto-Commands--------------"
"Automatically source the Vimrc file on save.
augroup autosourcing
autocmd!
autocmd BufWritePost .vimrc source %
augroup END
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment