Open henrik opened 13 years ago
I see there is a :Rlocale
currently that will open single locale files. I love being able to open multiple locales in splits, but I'm not sure how best to integrate that functionality. Maybe simply have that be the behavior with an empty argument, instead of opening the default locale file? For apps that only have one locale, the effect is the same. For apps with multiple locales, the new behavior might be more useful. Though I'm not sure how opening multiple windows/splits would go together with variations like :RSlocale
and :RVlocale
.
I wasn't on board until you mentioned the default would be the same with one locale. When I refactor the navigation code (it's long overdue: it's some of the oldest Vimscript I've written), I'll see if I can accommodate that. Until that refactoring is done, however, trying to bolt on this behavior is a fool's errand.
That's good enough for me. Thanks!
Possible extensions: provide arguments with autocompletion to jump to or add a specific key (":Rloc foo.bar.baz"), and/or provide arguments to open other locale files than the root set (":Rloc" to open config/locales/.yml, ":Rloc defaults" to open config/locales/defaults/.yml).
How would this work when any given locale has X files? Like this:
config/locales/
en/
flashes.yml
models.yml
forms.yml
sv/
defaults.yml
flashes.yml
models.yml
forms.yml
I've implemented a simple version of this: https://github.com/henrik/dotfiles/blob/master/vimrc#L251-263
Possible extensions: provide arguments with autocompletion to jump to or add a specific key (":Rloc foo.bar.baz"), and/or provide arguments to open other locale files than the root set (":Rloc" to open
config/locales/*.yml
, ":Rloc defaults" to openconfig/locales/defaults/*.yml
).