support more operator commands

Bug #640905 reported by Stefan Bethge
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ViGedit
Triaged
Undecided
Unassigned

Bug Description

As there is a subset of vims operator commands implemented, other could/should be added at some point.
Easiest might be g~, gu, gU and ! and =
http://vimdoc.sourceforge.net/htmldoc/motion.html#operator

Revision history for this message
Stephen Moore (delfick) wrote :

Unfortunately I have run out of time to do any implementation of anything for a while.

But feel free to try these yourself in the meantime.

They're inside /actions/ex.py

Each command is just a function with the regexDec decorator. i.e.

@regexDec("w")
def ex_Write(act, command, result):
    act.fileOps.saveFile(act)

The argument to the decorator is a regular pattern.

The function is only called if the command matches the regular expression.

It is given the act object, which has access to everything (look at /actions/__init__.py/VIG_Actions/__getattr__ to see what you can access from it), command is the full string that was given and result is the result of matching the command to the regular expression (http://docs.python.org/library/re.html#match-objects)

:)

Changed in vigedit:
status: New → Triaged
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.