Skip to content

Instantly share code, notes, and snippets.

@benjaminparnell
Created July 27, 2014 16:39
Show Gist options
  • Save benjaminparnell/970311bd63839f6645d3 to your computer and use it in GitHub Desktop.
Save benjaminparnell/970311bd63839f6645d3 to your computer and use it in GitHub Desktop.
execute pathogen#infect()
syntax enable
let g:jekyll_path = "~/Documents/blog"
execute "autocmd BufNewFile,BufRead " . g:jekyll_path . "/* syn match jekyllYamlFrontmatter /\\%^---\\_.\\{-}---$/ contains=@Spell"
colorscheme herald
" autoindent on when programming
set noai
" turn on line numbers
set number
filetype plugin on
" turn on ruler
set ruler
set nocursorline
let loaded_matchparen=1
set noshowmatch
set nocursorcolumn
set scrolljump=8
let html_no_rendering=1
set bs=2
" set tabs to 4 spaces
set expandtab
set tabstop=2
set softtabstop=2
set shiftwidth=2
set encoding=utf-8
set colorcolumn=80
set encoding=utf-8
" show invisible characters
set list
set listchars=eol:¬
" turn off swapfiles
set noswapfile
" show incomplete commands
set showcmd
" set encryption type to something stronger
set cryptmethod=blowfish
" keymaps
cmap w!! w !sudo tree > dev/null %
au FileType go nmap <leader>i <Plug>(go-info)
" Auto remove whitespace on write
function! TrimWhiteSpace()
%s/\s\+$//e
endfunction
nnoremap <silent> <Leader>rts :call TrimWhiteSpace()<CR>
autocmd FileWritePre * :call TrimWhiteSpace()
autocmd FileAppendPre * :call TrimWhiteSpace()
autocmd FilterWritePre * :call TrimWhiteSpace()
autocmd BufWritePre * :call TrimWhiteSpace()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment