The attached does this experimentally. It looks good... what we lose is the possibility to get the previous word automatically into the index inset. But I suspect there's a trick even for that if we go this way.
The question is, do we? - Martin (Some other rough edges still. It's the idea that counts)
Index: src/insets/InsetFlex.cpp =================================================================== --- src/insets/InsetFlex.cpp (revision 20348) +++ src/insets/InsetFlex.cpp (working copy) @@ -46,7 +46,7 @@ InsetFlex::InsetFlex(BufferParams const & bp, InsetLayout il) - : InsetCollapsable(bp, Collapsed) + : InsetCollapsable(bp, Open) { params_.name = il.name; setLayout(il); Index: src/Text3.cpp =================================================================== --- src/Text3.cpp (revision 20348) +++ src/Text3.cpp (working copy) @@ -1682,7 +1682,8 @@ InsetLayout il = cur.buffer().params().getTextClass().insetlayout(from_utf8(s)); if (il.lyxtype != "charstyle" && il.lyxtype != "custom" && - il.lyxtype != "element") + il.lyxtype != "element" && + il.lyxtype != string()) enable = false; break; } Index: lib/layouts/stdinsets.inc =================================================================== --- lib/layouts/stdinsets.inc (revision 20348) +++ lib/layouts/stdinsets.inc (working copy) @@ -101,4 +101,14 @@ EndFont End +InsetLayout Index + LabelString Idx + LatexType command + LatexName index + Decoration classic + LabelFont + Color Red + Size Small + EndFont +End Index: lib/ui/stdmenus.inc =================================================================== --- lib/ui/stdmenus.inc (revision 20348) +++ lib/ui/stdmenus.inc (working copy) @@ -304,7 +304,7 @@ Item "Cross-Reference...|R" "dialog-show-new-inset ref" Item "Label...|L" "label-insert" Item "Caption" "caption-insert" - Item "Index Entry|d" "index-insert" + Item "Index Entry|d" "flex-insert Index" Item "Nomenclature Entry...|y" "nomencl-insert" Separator Item "Table...|T" "tabular-insert"