10000 Indent operations preceded by a number should indent multiple times in visual mode. by mwleeds · Pull Request #798 · atom/vim-mode · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Apr 6, 2018. It is now read-only.

Indent operations preceded by a number should indent multiple times in visual mode. #798

Merged
merged 3 commits into from
Aug 12, 2015

Conversation

mwleeds
Copy link
Contributor
@mwleeds mwleeds commented Jul 28, 2015

Preceding '>' with a number didn't indent lines multiple times, but this fixes that.

@maxbrunsfeld
Copy link
Contributor

Could you add a small test for this, or modify an existing test so that it supplies a count?

@mwleeds
Copy link
Contributor Author
mwleeds commented Jul 28, 2015

Sure. Do you have an automated way to run all the spec files?

@maxbrunsfeld
Copy link
Contributor

Yeah, you can run the Window: Run Package Specs from Atom, or run apm test from the command line.

@mwleeds mwleeds force-pushed the fix-multi-indent branch from 9d96a8b to 062be87 Compare July 29, 2015 04:34
* `<<` - outdent current line one level
* `<2<` - repeated linewise
* `2<<` - repeat outdent operation
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried it and in normal mode >2> behaves the same as 2>> - indenting two lines once; that's consistent with VIM. The docs above seem to imply this PR was introducing a difference there - is it?

@mwleeds
Copy link
Contributor Author
mwleeds commented Aug 2, 2015

Thanks for the help @jacekkopecky. Should be fixed now.

@bronson
Copy link
Contributor
bronson commented Aug 2, 2015

I had the same misconception as Jacek. Just making sure, this PR:

  • implements and documents v2> so it works the same as Vim
  • it also documents 2>> and >2>, which currently work in vim-mode

Merged to vim-mode-next, looking good.

@mwleeds
Copy link
Contributor Author
mwleeds commented Aug 2, 2015

Right. I should have made that more clear.

@maxbrunsfeld
Copy link
Contributor

👍 Thanks @mleeds95! Nice work.

maxbrunsfeld pushed a commit that referenced this pull request Aug 12, 2015
Indent operations preceded by a number should indent multiple times in visual mode.
@maxbrunsfeld maxbrunsfeld merged commit 7aeac71 into atom:master Aug 12, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
0