New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"gn" with [count] is useless #632
Comments
Other opinions? |
How about a command that could repeat single-repeats function! s:RepeatSingleRepeat()
for _ in range(v:count1)
normal! 1.
endfor
endfunction
nnoremap <silent> g. :<C-u>call <SID>RepeatSingleRepeat()<CR> So after |
On Wednesday, February 10, 2016 at 11:58:37 AM UTC-6, Justin M. Keyes wrote:
I thought you were saying "3cgn" or "c3gn" would only edit the third occurrence, which I could see being useful and not necessarily surprising. But then I experimented and you're saying "3." doesn't do the same thing as "...". I agree that's unexpected and not very useful. But it's actually consistent with things like ">>". For example, ">>2." does not do what I'd expect, either; I need to do ">>..". |
On Feb 11, 2016 2:16 PM, "Ben Fritz" fritzophrenic@gmail.com wrote:
"I could see it being useful" applies to almost anything and adds no The major use case of gn is to apply an operation in batches. Why insist on Justin M. Keyes |
On Feb 11, 2016 1:29 PM, "Jerome Castaneda" vim-dev-github@256bit.org
I can do all kinds of things with mappings. I am proposing improving user |
speaking of |
On Thursday, February 11, 2016 at 1:27:14 PM UTC-6, Justin M. Keyes wrote:
If the interface was perfect for me, I'd expect "3cgn" to change the next 3 matches, and "c3gn" to change the 3rd match only, because that's something I'd do on purpose from time to time. But to answer your question, no, I didn't realize [count]gn worked this way, especially when combined with the '.' repeat operator, so I've never done that on purpose so far. |
"gn" is very useful. But to repeat it, user must press "." over and over. Repeating it with a [count] only applies to the count'th instance, instead of repeating the operation [count] times. This is not how f, t, and / work.
Because the current behavior of "gn" with [count] is not useful, I doubt changing the behavior of "gn" would break any plugins. Can the behavior be changed?
The text was updated successfully, but these errors were encountered: