language selection ^ + shift + L works only with cursor
Closed this issue · 5 comments
From @aymericbouzy on May 7, 2015 10:57
If I select a document in the tree view and then press ctrl shift L, nothing happens. However, when I click inside the document, so that the cursor appears, the combination works fine.
I would like to be able to chose the language immediately after having opened a document, not after having started editing it.
Copied from original issue: atom/atom#6678
This is because the grammar selector only works when the editor is focused – when a file is opened from the Tree View, the Tree View stays focused. So there are a few possible ways to go about this:
- Enable the grammar selector when the Tree View is focused (and just change the grammar for the most recently active file)
- Focus the editor when a file is opened from the Tree View
From @aymericbouzy on May 7, 2015 13:26
Double clicking allows to focus the file.
So after all, it is fine this way I believe. sorry 0:-)
From @lee-dohm on May 7, 2015 14:34
This should probably be moved the the atom/grammar-selector repository?
@lee-dohm I was thinking about it, but I wasn't sure if it was intended behavior that the Tree View doesn't focus the editor when single-clicking to open a file (but double-clicking does).
From @lee-dohm on May 7, 2015 14:46
@mnquintana Yes, that is the intended behavior.