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

          Vim - Formatting the code

          Posted on 2007-08-06 21:24 ZelluX 閱讀(364) 評論(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[

          主站蜘蛛池模板: 泰安市| 永登县| 卢湾区| 泸州市| 沐川县| 任丘市| 鄱阳县| 玉屏| 长春市| 茂名市| 中西区| 通化市| 温州市| 获嘉县| 宜宾县| 陆川县| 商丘市| 宁安市| 克拉玛依市| 抚松县| 诸城市| 南宫市| 炉霍县| 芜湖市| 海原县| 天台县| 云龙县| 衡水市| 京山县| 和龙市| 开阳县| 巴马| 绩溪县| 柯坪县| 深水埗区| 枝江市| 黄冈市| 浦北县| 蓝田县| 镇康县| 凤凰县|