Indentation And Format Code In Vim | ATLASSC.NET
Skip to main content
/// .DATA.FRAGMENT_20201112

Indentation And Format Code In Vim

1 minAuthor: Z.SHINCHVEN

indentation

basics

press v to enter selection mode, then...

indent

  • indent by default configuration: >
  • indent 4 spaces: 4 >

unindent

  • unindent by default configuration: <
  • unindent 4 spaces: 4 <

indent selected lines

  • use v command to enter select mode, select lines you want to indent
  • indent selected lines: j j >

v j j >

indent particular lines

Example is set to 5 lines

5 > >

references

format code

configure indent size

add configurations to ~/.vimrc

:set shiftwidth=2
:set autoindent
:set smartindent
:set tabstop=2

command

g g = G

references

RackNerd Billboard Banner
Share node:
/// .RELATED.DATA_STREAMSShared tags

Related posts

Scanning_database_for_correlations…

/// .UPLINK.SUBSCRIBE

Keep your deck synced with every new transmission from ATLASSC.NET. Subscribe over RSS or Atom, or wire the whole archive straight into your AI assistant with the MCP server.