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

          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[

          主站蜘蛛池模板: 华坪县| 城固县| 海丰县| 萨迦县| 龙泉市| 松溪县| 太湖县| 松阳县| 巴塘县| 古浪县| 万宁市| 奉贤区| 陵水| 长汀县| 平阳县| 大足县| 泽普县| 塘沽区| 乌兰浩特市| 长汀县| 宁武县| 固始县| 仁寿县| 定远县| 察哈| 邮箱| 靖西县| 稻城县| 瓦房店市| 屯门区| 清流县| 香港 | 阜宁县| 烟台市| 绥宁县| 五原县| 九龙坡区| 德州市| 库伦旗| 徐州市| 萍乡市|