SecureCRT will send your original text to the server in a string style. So when vim on your server is set to autoindent, in I mode, it will indent the strings transmitted by secureCRT. If the copied text contains spaces or tabs that indicate indentation, it will also be indented as a string.
Solution:
1. Input: set paste before copying (in this case, vim will not start automatic indent, but just copy and paste it)
2. After the copy is complete, enter: set nopaste (disable paste)
Paste knowledge
'Paste 'Boolean (disabled by default)
Global
{Vi does not have this function}
Switch Vim to the paste mode. It can be used to cut or copy text from a window and paste it to Vim. It
To avoid unexpected results.
Set this option to run Vim on the terminal, because Vim cannot distinguish the input and pasted files.
. In the GUI, Vim knows who is from pasting, even if 'paste 'is not enabled, it basically does not do
Error. This is also true for the terminal where Vim can handle mouse clicks by itself.
Reset this option when you start the GUI. So if you set it in. vimrc, you can make it in the terminal
Work, but not in the GUI. Setting 'paste 'in the GUI has the following side effects: for example, paste job
The column button cannot work in insert mode because it uses ing.
When the 'paste 'option is enabled (including the one that is originally opened ):
-Shield the ing between the insert mode and the command line mode.
-Shield abbreviations
-Set 'textidth' to 0.
-Set 'wrapmargin 'to 0.
-'Autoindent 'is reset.
-'Smartindent 'is reset.
-'Softtabstop' is set to 0.
-"Revins" is reset.
-'Rsequence' is reset.
-'Showmatch' is reset.
-The usage of 'formatoptions' is the same as if it is null.
The following options keep the original values but do not have the actual effect:
-'Lisp'
-'Indentextpr'
-'Cindent'
Note: When the 'paste 'option is enabled, if you start to edit other files, the mode line or automatic command can
These settings can be changed again, causing trouble when pasting text. At this time, you may need to reset
Bit 'paste.
When the 'paste 'option is reset, the options mentioned above are restored to the settings of the last 'paste' from off to on
. Resetting 'paste 'before 'paste' has no effect. Because 'paste 'is not activated
You can use ing. The 'pastetoggl' option can be used to specify the hotkey for switching the 'paste 'option.