Re: cc or S in normal mode did the wrong indent?
in normal mode,when i typed cc or S, the cursor was placed at the head of the line,
not like dd then O, the last one did the right indent.
but cc in vim perform the same thing like ddO.
You are not logged in. Please login or register.
in normal mode,when i typed cc or S, the cursor was placed at the head of the line,
not like dd then O, the last one did the right indent.
but cc in vim perform the same thing like ddO.
Hello caoyangorg,
Indeed, they act differently. The problem is that VS's language service model (which is the part responsible for autoindent and other features) is not accessible, so ViEmu has to simulate pressing <return> to get the effect. 'o' and 'O' do this, but 'cc' and 'S' don't, as there is no newline inserted.
Unfortunately, this is quite difficult to address directly. Since it seems it's not much used, it hasn't been a big problem so far. Using mappings could help somewhat if you are accustomed to using those: something like ":nnoremap S ddkA<return>" would mostly emulate vim's 'S' still using autoindent, and I plan to provide multi-key chord mappings in a future versions, which would allow to emulate 'cc' in a similar way.
Let me know what you think.
Regards,
- Jon
Thank you!
I put :nnoremap S ddkA<return> in my _viemurc and it did the right indent
You're welcome. I hope to have a better solution in future versions.
Regards,
- Jon
Currently installed 3 official extensions. Copyright © 2003–2009 PunBB.
[ Generated in 0.026 seconds, 9 queries executed ]