You could use a Palette:
CreatePalette @ PasteButton @ Indexed[\[SelectionPlaceholder], \[Placeholder]]
Or an Input Alias:
AppendTo[
CurrentValue[$FrontEndSession, "InputAliases"],
"idx" -> TemplateBox[{"\[SelectionPlaceholder]", "\[Placeholder]"}, "IndexedDefault"]
]
For a system-wide keyboard shortcut you can copy KeyEventTranslations.tr from SystemFiles\FrontEnd\TextResources\(your OS) within $InstallationDirectory to the like path within $UserBaseDirectory and replace the line containing "KeypadSubtract" with:
Item[KeyEvent["KeypadSubtract", Modifiers -> {Control}],
FrontEndExecute[{
FrontEnd`NotebookWrite[FrontEnd`InputNotebook[],
TemplateBox[{"\[SelectionPlaceholder]", "\[Placeholder]"}, "IndexedDefault"], After]
}]],
This will allow insertion of the same template as above. I am still seeking a way to emulate the default Subscript behavior where a template is inserted for a blank line, but the first element is auto-filled if an expression exists.
With the hint from Kuba to use NotebookApply we can get nearly perfect emulation with:
Item[KeyEvent["KeypadSubtract", Modifiers -> {Control}],
FrontEndExecute[{
FrontEnd`SelectionMove[FrontEnd`InputNotebook[], All, Word];
FrontEnd`NotebookApply[FrontEnd`InputNotebook[],
TemplateBox[{"\[SelectionPlaceholder]", "\[Placeholder]"}, "IndexedDefault"]]
}]
],
Related:
Part's ugly double-bracket notation. They're also useful for integration over multidimensional regions, e.g.,Integrate[Indexed[x, 1]^2 Indexed[x, 2]^2, Element[x, Rectangle[]]]. – David Zhang Feb 19 '15 at 05:59x1, rather thanSubscript[x,1]. The question is, if this is not a problem for calculations with indexed variables, as OP states? – Alexei Boulbitch Feb 19 '15 at 08:50Subscripts? I've never run into any such problems with eitherSubscriptorIndexed, but my use cases of both are admittedly limited. – David Zhang Feb 19 '15 at 09:06Subscripts can cause problems. – David Zhang Feb 19 '15 at 09:38