Created
July 20, 2018 21:13
-
-
Save DavidBrower/01bd4854fcb7eea4b53e620df1e04415 to your computer and use it in GitHub Desktop.
vimrc file
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
" Use Vim settings, rather than Vi settings (much better!). | |
" This must be first, because it changes other options as a side effect. | |
set nocompatible | |
set wildmenu | |
set wildmode=full | |
let mapleader = "," | |
" toggle on whether to show line numbers | |
nmap <leader>n :set number!<CR> | |
" CTRL-U in insert mode deletes a lot. Use CTRL-G u to first break undo, | |
" so that you can undo CTRL-U after inserting a line break. | |
inoremap <C-U> <C-G>u<C-U> | |
set number | |
set linebreak | |
set shiftwidth=4 | |
set softtabstop=4 | |
set expandtab | |
set formatprg=par\ -w60 | |
set clipboard=unnamed | |
" Spelling settings | |
nmap <silent> <leader>s :set spell!<CR> | |
set spelllang=en_gb "Set language to British English | |
set listchars=tab:▸\ ,eol:¬ | |
set guifont=Andale\ Mono:h15 | |
set noundofile "Don't have those .swp files lying cluttering up the place | |
" toggle on whether to show invisibles | |
nmap <leader>l :set list!<CR> | |
"Remove all trailing whitespace by pressing F5 | |
nnoremap <F5> :let _s=@/<Bar>:%s/\s\+$//e<Bar>:let @/=_s<Bar><CR> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment