aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2018-03-05Add license (GNU GPLv3+)HEADv0.0.1masterTeddy Wing
2018-03-05Add READMETeddy Wing
* Copy over plugin description from the Vim doc * Show demo gif screencast * Include license information
2018-03-05Add documentationTeddy Wing
2018-03-05Add comments to functions to describe what they doTeddy Wing
2018-03-05Add `g:loaded_rails_locale_alternate` headerTeddy Wing
Prevent double-sourcing the plugin.
2018-03-05Move functions to `autoload`Teddy Wing
Improve startup performance and be a good Vim plugin citizen.
2018-03-05Use an `autocmd` to create the commandsTeddy Wing
To ensure these commands are only created for Rails locale buffers, use an `autocmd` that matches any locale YAML files in the Rails `config/locales/` directory or subdirectories.
2018-03-05Move `ftplugin` to `plugin`Teddy Wing
Make this a regular plugin instead of a filetype plugin. Rails locale files are YAML files, but we don't want these commands to be available for all YAML files, only those that match the path for Rails locales. We won't be able to do the path match and filetype separation with an ftplugin, so instead we'll set up the commands to be defined by `autocmd`s that match the Rails locale path.
2018-03-05Match alphabetic characters in filename substitutionTeddy Wing
Instead of matching any two characters (`..`), match specifically alphabetic characters (`\a\{2}`) because all language codes are two-letter codes.
2018-03-05Accept command modifiersTeddy Wing
Allows us to call our commands like: :vertical RailsLocaleAlternate fr :rightbelow RailsLocaleAlternate en
2018-03-05Change `command!` `<args>` to `<q-args>`Teddy Wing
So language codes don't have to be quoted. Before: :VRailsLocaleAlternate 'fr' After: :VRailsLocaleAlternate fr
2018-03-05Add commands to open an alternate Rails locale fileTeddy Wing
Two new commands that will open an alternate Rails locale file in either a horizontal or vertical split. Takes the current filename and replaces the two-letter language code with the argument given to the command.