Skip to content

Instantly share code, notes, and snippets.

@jacobsimeon
Created November 1, 2013 22:12
Show Gist options
  • Save jacobsimeon/7272815 to your computer and use it in GitHub Desktop.
Save jacobsimeon/7272815 to your computer and use it in GitHub Desktop.
Open most recent migration in vim.
function! OpenMostRecenMigration()
exec 'vsp' system('echo db/migrate/`ls db/migrate | tail -n 1 | cut -f 1`')
endfunction
nnoremap <Leader>m :call OpenMostRecenMigration()<CR>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment