Skip to content

Instantly share code, notes, and snippets.

@changa
Created April 1, 2011 09:05
Show Gist options
  • Save changa/897915 to your computer and use it in GitHub Desktop.
Save changa/897915 to your computer and use it in GitHub Desktop.
Vim snippet for automatically prepending an encoding line for ruby files
# .vimrc
" Add default utf-8 encoding to ruby files
:autocmd BufNewFile *.rb,*.rake 0r ~/.vim/skeletons/skeleton.rb
$ cat ~/.vim/skeletons/skeleton.rb
# encoding: utf-8
$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment