aboutsummaryrefslogtreecommitdiffstats
path: root/ftplugin/ruby.vim
AgeCommit message (Collapse)Author
2019-06-17vimrc: Don't preserve indentation on empty linesTeddy Wing
Over the years and as I've been using Vim, I've gradually stopped liking this style, and now prefer blank lines without whitespace. Rather than continuing to override the default for different filetypes, it feels like it's time to change the default.
2019-06-08vimrc: Move RSpec mappings to ftplugin/ruby.vimTeddy Wing
Since I'm not writing Ruby regularly right now, move these mappings to the Ruby ftplugin so I don't accidentally try to run a spec in another language where it makes no sense.
2017-12-05ftplugin/ruby.vim: Add mapping to reset the Rails test databaseTeddy Wing
Occasionally I need to drop and reload the Rails test database. Recently I've been working on something that requires a "truncation"-cleaned test, and have had to reset my database regularly while writing the test to eliminate inconsistent state. This command gives me the ability to reset with a single key press. I've been testing it out for a few days in a Vim session and have found it very helpful.
2017-12-05ftplugin/ruby.vim: Add `RubyNewHashSyntax` commandTeddy Wing
I've had to use a similar pattern a couple of times in the past to convert files or sections of files from the old Ruby hash syntax (`:key => 'value'`) to the new syntax (`key: 'value'`). Give the pattern and substitution a command to make it readily available the next time I need to use it.
2017-09-22ftplugin/ruby.vim: Add command to stop SpringTeddy Wing
I love Spring, it makes it so much nicer to run tests in Rails apps. That's why I set 'vim-rspec' to use it. However, sometimes it gets confused and doesn't load the latest code, and a load error occurs. Recently I started a new project and those errors occur every few times I run the tests. It's absolutely unbearable. To make life a tiny bit easier, make a command that allows us to stop Spring from Vim, to avoid having to <C-z> and type the command by hand. You can tell I was frustrated when I decided to make this command.
2017-03-09ftplugin/ruby.vim: Add maps to insert debug breakpointsTeddy Wing
Make it easier to insert `byebug` debug statements. Currently working in Rails so assuming `byebug` is already required. Might want to add new maps or modify these later if I end up needing to do a `require 'byebug'` beforehand. These keys didn't seem to be used for anything, so I figured they would be a nice quick combination for this. Didn't really feel like adding a long leader command to do it.
2017-02-22ftplugin/ruby.vim: Don't preserve indentation on empty linesTeddy Wing
My tastes have changed over time. These days I normally prefer to remove indentation on empty lines, and this is my general default working on codebases with other people. Change our Ruby config to remove indentation on empty lines so I don't have to keep doing it myself manually.
2014-05-23Add ftplugin/ruby for Ruby indentation settingsTeddy Wing
Set two space indentation for Ruby.