Command (":Rlocales"?) to open locale files in splits #113

Open
henrik opened this Issue Aug 27, 2011 · 4 comments

Projects

None yet

3 participants

@henrik
henrik commented Aug 27, 2011

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 open config/locales/defaults/*.yml).

@henrik
henrik commented Aug 27, 2011

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.

@tpope
Owner
tpope commented Aug 27, 2011

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.

@henrik
henrik commented Aug 27, 2011

That's good enough for me. Thanks!

@Mange
Mange commented Nov 29, 2011

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment