1

Re: Paste and autoindent

This is probably a nitpicky thing, but I've not let such worries stop me in the past, so here goes.

If I cut a line using "normal" vs (2005) editing, and then paste it, the auto-formatter-a-jiggy will indent my line appropriately. It'll add/remove tabs to make it fit the rest of the source...

If I Shift-V,y or yy a line in vi mode, it doesn't do this, it keeps whatever indenting that was originally in the line.

Is it possible to get the auto-formatter-a-jiggy thing to work with vi commands, too? Or was this a "maintain vi behavior" thing?

Also, note that if I am in insert mode, and I use Ctrl-C, Ctrl-V to yank and paste, the autoformatter-a-jiggy works its magic.

thanks.

2

Re: Paste and autoindent

Hmm... I'll have a more detailed look and let you know. It's doable, but I seem to recall the results were not quite satisfactory and I opted for the vi-compatible behavior.

3

Re: Paste and autoindent

I'll second this as a (very) nitpicky item.

Any updates on this?

4

Re: Paste and autoindent

kirkus,

I added the vim "]p" command a few versions ago, which does "paste-with-autoindent". You can even do ":nnoremap p ]p" to get this by default all the time (and probably ":nnoremap P [p" too for consistency).

Hopefully that should be enough?

Regards,

  Jon