-
.zlogin (or .zshrc) parse error near `\n’
This code was at the end of my .zlogin on my mac and was causing .zlogin:152: parse error near `\n’. The problem is rather bone-headed, but I went through trying to :set ff=unix, :set ff=mac in vim to try and remedy bad line endings. function notify_preexec() { # Note the date when the command started,…
-
Moving back to the last cursor position in line in vim
Ever have a stray keystroke in vim that jumped to somewhere you didn’t intend to go? Two backticks “ will jump to the exact position of where you were. Two single quotes ” will jump to the first non-blank character where you were. This also works for moving to the beginning of a line/cursor position…
-
Moving Static Files to the Assets Pipeline (upgrading from 3.0 to 3.1+)
For those who have done the upgrade, this is probably second nature: Recently stumbled upon static files in the public/javascripts directory and wanted to get them moved to the $RAILS_ROOT/app/assets/ directory. This RailsCast, 282 Upgrading to Rails 3.1 provides most of the notes you need on doing this. The first key is to include: config.assets.enabled…