posts - 403, comments - 310, trackbacks - 0, articles - 7
            BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理

          Vim - Formatting the code

          Posted on 2007-08-06 21:24 ZelluX 閱讀(365) 評論(0)  編輯  收藏 所屬分類: Linux
          1. The following Vim command will perform a fast code block formatting:
          1G=G
          We can split it up in simply says:
          1G : Go to the first line(you can also use gg)
          = : Indent according to the configuration
          G : Go to the last line(tell Vim where to end indenting)

          2. Another way is to go into visual mode with V and press =  to reindent the chosen lines.

          3.
          =i{ will reindent everything between { and } excluding the brackets.
          other similar choices:
          a{ : all the code between { and } including the brackets.
          i(, a(, i<, a<, i[, a[

          主站蜘蛛池模板: 永年县| 岳阳县| 周至县| 资兴市| 萍乡市| 陵川县| 德庆县| 瓦房店市| 富源县| 葵青区| 盐亭县| 偏关县| 九寨沟县| 崇礼县| 盐源县| 安西县| 彰化市| 车险| 兴化市| 务川| 万州区| 普安县| 永修县| 阿荣旗| 沈阳市| 贞丰县| 冷水江市| 抚州市| 蚌埠市| 白城市| 彭山县| 高安市| 武定县| 临澧县| 和田市| 长治县| 赫章县| 雷州市| 湟中县| 嘉祥县| 敦煌市|