2015-09-05 32 views
1

我正在尋找粘貼代碼但禁用自動縮進的vim命令。所以我找到這些命令,我​​可以只使用一個命令並粘貼,然後輸入<Ctrl+C>,非常容易。插入和:append之間有什麼區別?

但是,我不明白:insert:append之間有什麼區別。

他們真的有同樣的行爲嗎?

+1

我相信你實際上是在尋找':set paste'。 –

+0

@BillLynch嗯,太棒了!但我仍然想知道這些命令之間有什麼區別。 –

+1

':設置粘貼'變得老得很快。如果你想使用vim插件,那麼當粘貼到大多數終端時,https://github.com/ConradIrwin/vim-bracketed-paste會自動設置「粘貼」和「設置nopaste」。這也是neovim內置的。 – skyler

回答

1

:insert:append的行爲是不一樣的。光標前

:insert 

插入文本

:append 
光標

:h append

追加後

插入文本(從{lnum},{EXPR})
追加()

When {expr} is a |List|: Append each item of the |List| as a 
    text line below line {lnum} in the current buffer. 
    Otherwise append {expr} as one text line below line {lnum} in 
    the current buffer. 
    {lnum} can be zero to insert a line before the first one. 
+0

我明白,像'a'和'我'。謝謝:) –

+0

婭。類似於a和i。 –

相關問題