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[

          主站蜘蛛池模板: 龙州县| 铁力市| 明光市| 客服| 临漳县| 乡城县| 曲沃县| 卓尼县| 灌云县| 六盘水市| 平远县| 昭苏县| 普陀区| 永德县| 天水市| 太和县| 武强县| 沛县| 原平市| 商都县| 府谷县| 丹寨县| 偏关县| 工布江达县| 泊头市| 靖边县| 通许县| 胶州市| 北辰区| 济宁市| 图木舒克市| 中卫市| 天柱县| 周口市| 文水县| 江都市| 仁寿县| 榆中县| 三江| 张家川| 柳河县|