Home  >  Q&A  >  body text

How to move a large section of Python code forward by one tab under vim?

I pasted a large section of python code under vim, but starting from a certain line, all the code was moved back by one more tab. There were more than 100 lines. I manually adjusted them one by one, and I was exhausted.

Is there any way to make it easier?

伊谢尔伦伊谢尔伦2712 days ago1627

reply all(11)I'll reply

  • 为情所困

    为情所困2017-05-16 16:43:40

    set nu
    set encoding=utf-8
    set fdm=marker
    set autoindent
    set smartindent
    set tabstop=4
    set shiftwidth=4"每次shift+<移动4格
    if has("syntax")
      syntax on
    endif
    set list
    set listchars=tab:>-,trail:-

    reply
    0
  • Cancelreply