Issue #169 resolved

Numbered block indenting indents once

epich avatarepich created an issue

In several major modes including Python, Java, and text, I find 2> doesn't indent a block of code twice.

For example: foo.txt

aaa
    bbb
    ccc

I highlight bbb and ccc and do 2>. It indents as though I had done >. If I do >, select the same text, and > again then it indents twice as expected.

I witness this after rebuilding the latest and using a minimal .emacs . My hg tip is changeset: 1051:374ea7a251a4

Comments (2)

  1. Frank Fischer

    This is because > is an operator and usually the count of an operator is handled by the motion used to specify the range (e.g. 2>> does not indent the current line twice but two lines once).

    If the operator is called from visual state then the count has not been handled by a motion because the range is not specified by a motion but by the visual selection. Thus count is "free" for the operator. But this has not been implemented, yet (although it's not difficult).

  2. Frank Fischer

    Make shift operators handle count in visual state

    In visual state operators may deal with the command count on their own because that count is not used by the motion to specify the range. Shift operators interpret the count as usual repeat count. This fixes #169.

    c458644459bf

  3. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.