Sunday 25 August 2013

Current Windows Environment

Small intro:
I have been introduced to vagrant and rvm several years back when they were both rather unpolished and I ran into several issued with them at the time. rvm still has some obscure bugs when you are really stretching the limits of what it was built for but I now feel comfortable that both of these tools have come far enough to surpass my usual workflow and they have entered my normal use now.

This is all installed ontop of Windows 7 x64.


 You may need to install VirtualBox before vagrant as it needs to hook into it.
 Install cygwin for the terminal, Vagrant for the machine and Sublime for the editor.

In cygwin: using Solarized Dark set in my .minttyrc for theme.
Using Arnold Clark's polygot for aliases in cygwin and vagrant.

I picked a debian box running on virtualbox but you can set this how you like. Vagrant Boxes

In cygwin terminal, cd ~
vagrant box add deb http://puppet-vagrant-boxes.puppetlabs.com/debian-607-x64-vbox4210-nocm.box
vagrant init deb
vagrant up
vagrant ssh

That's the machine done.
Now for ruby.

curl -L https://get.rvm.io | bash -s stable --ruby=1.9.3

Done!
Sublime setup:

Download sublime text 2
Package manager:
https://sublime.wbond.net/installation#st2
Get packages:
"Arnold Clark Snippets for Ruby",
"CoffeeScript",
"ERB Snippets",
"Rails Partial",
"rails_go_to_spec",
"rspec-snippets",
"Sass",
"SideBarEnhancements",
"StringEncode",
"TrailingSpaces"

Set keybindings (I've been working on a mac lately so some of these keybindings may seem wonky.)
{ "keys": ["alt+shift+l"], "command": "reindent", "args": { "single_line": false } },
{ "keys": ["alt+shift+`"], "command": "delete_trailing_spaces" },
{ "keys": ["alt+shift+h"], "command": "html_entitize" },
{ "keys": ["alt+shift+."], "command": "rails_go_to_spec" },
{ "keys": ["alt+control+right"], "command": "indent" },
{ "keys": ["alt+control+left"], "command": "unindent" },
{ "keys": ["alt+control+up"], "command": "swap_line_up" },
{ "keys": ["alt+control+down"], "command": "swap_line_down" },

{ "keys": ["alt+left"], "command": "move_to", "args": {"to": "bol", "extend": false} },
{ "keys": ["alt+right"], "command": "move_to", "args": {"to": "eol", "extend": false} },
{ "keys": ["shift+alt+left"], "command": "move_to", "args": {"to": "bol", "extend": true} },
{ "keys": ["shift+alt+right"], "command": "move_to", "args": {"to": "eol", "extend": true} }

Set preferences:
"ensure_newline_at_eof_on_save": true,
"ignored_packages":
[
"Vintage"
],
"save_on_focus_lost": true,
"tab_size": 2,
"trailing_spaces_trim_on_save": true,
"translate_tabs_to_spaces": true