Variables in the status bar

Bug #931366 reported by Ulf Kohlmorgen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
UltiSnips
Triaged
Wishlist
Unassigned

Bug Description

Hi Holger,

I'd like to have the option to insert one or more variables into the status bar to let the user know at which position (jump mark) he currently is. Eventually with the current snippet name inside.

E.g.: <snippetName> Field: <curPosition> of: <maxPositions>

It would be nice to clear the whole string when the last jump mark is reached so we only have this visual "guide" when we are inside a current snippet.

All variables should be optional, e.g. if somebody doesn't want to see the name of the snippet he just omits that variable.

Regards,
Ulf

Revision history for this message
SirVer (sirver) wrote :

I agree that UltiSnips could provide an array of status information which can than be embedded in the statusbar. The way to do this is to maintain a Vim Dictionary with at least the following information

number of active snippets (can be > 1 because of recursion)
current tabstop number (can change when user deletes a tabstop in normal mode)
number of tabstops in this snippet (can change as well)

UltiSnips should not provide an embedding the statusbar by default, but the docs should mention the integration. Also, a complete fix should incorporate support for powerline as it is so common.

Contributions on this are welcome. Please also provide tests.

Changed in ultisnips:
status: New → Triaged
importance: Undecided → Wishlist
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.