When pasting content into vim, such as a code snippet, it may mess up the indentation in a nested kind of way, with indentation increasing the further down you go.
The vim paste option fixes this - just issue :set paste before pasting, and :set nopaste when done.
As noted by the vim documentation, the underlying problem is that a terminal program, in contrast to a GUI one, may not recognize the difference between pasted and typed text.
No comments:
Post a Comment