KoIDE10 ;; setting filetype on current buffer using *only* the keyboard

Context

  • KOIDE10
  • UserDragonstoneRosevalor wants to use the keyboard to change the filetype of the current buffer to a different syntax. She does not care how, so long as she does not have to touch the mouse.

Question

Is it possible to set the file-type of current buffer using only the keyboard in KOIDE10?

Example image

Nope.

  • Thanks for the reference.

This can also be done using you’re acces-keys.

If you press you’re ALT key the menu will show, if you then type v the view menu is opened.
To open the “view as language” you type l you will now be able to switch you’re language using only the keyboard.

2 Likes

To open the file type menu in the current view, you could use a small userscript that will trigger on you’re custom key binding.

Made a small userscript that will open the file type menu in the breadcrumb-bar, when the menu is open you will be able to walk trough the menu items using only you’re keyboard:

var $                = require("ko/dom");
var view             = $(require("ko/views").current().get());
var languageMenu     = view.findAnonymous("anonid", "statusbar-language-menu")._elements;

if (languageMenu.length > 0) {
    languageMenu[0].open = true;
}

If you add this userscript to you’re toolbox and assign you’re custom key binding.

If you now trigger you’re custom key binding, the menu will open:

And you will be able to select the filetype using only you’re keyboard.

1 Like

@babobski,

This is way better than my idea of adding a laundry list of new cmds in Commando.

  • Carey
2 Likes