[Linux][VIM] – 自動化程式排版

剛才發現在 vim 編輯器發現 一個超酷的功能,

就可它可以幫你自動排版程式碥,

它是用 Tab 為排版間距,

自動會判示是否要進行排版,

而到底要如何開始呢 ?

^^

請看以下說明…

1、當您現在是在編輯狀態時( o 、i …等都可進到此狀態),請先回到瀏覽狀態( Esc 鍵 )

2、先打 gg 回到最上方

3、shift + v 進行整行反白

4、shift + gg 讓反白由第一行圈選到最後一行

5、重頭戲來了,如何自動化排版呢 ?

請按 = 它就是自動化開始排版了

超酷的啦 ^^

Filed under Linux · Tagged with

Comments

21 Responses to “[Linux][VIM] – 自動化程式排版”
  1. ccy77 says:

    可以直接打gg=G就可以囉~~

  2. KKman says:

    上面說的是FreeBSD??

  3. 夕口 says:

    我是在 CentOS 去使用的,
    但我想應在每一套 Linux 都應一樣貝!!

    正確的指令順序是 :

    gg 回到最前行
    ctrl +v 選第一整行
    GG 由第一整行選到最後一行
    = 進行程序

Trackbacks

Check out what others are saying about this post...
  1. [...] 引用 夕口技術錄 Category: 程式進修 You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site. Leave a Reply [...]

  2. [...] 引用 夕口技術錄 Category: 程式進修 You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site. Leave a Reply [...]

  3. [...] 引用 夕口技術錄 Category: 程式進修 You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site. Leave a Reply [...]

  4. [...] 調用方法: [root@localhost ~]# xkill 引用 夕口技術錄 Category: 程式進修 You can follow any responses to this entry through the RSS 2.0 feed. [...]

  5. [...] 引用 夕口技術錄 Category: 程式進修 You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site. Leave a Reply [...]

  6. [...] 引用 夕口技術錄 Category: 程式進修 You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site. Leave a Reply [...]

  7. [...] 引用 夕口技術錄 Category: 程式進修 You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site. Leave a Reply [...]

  8. [...] 引用 夕口技術錄 Category: 程式進修 You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site. Leave a Reply [...]

  9. [...] 引用 夕口技術錄 Category: 程式進修 You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site. Leave a Reply [...]

  10. [...] 引用 夕口技術錄 Category: 程式進修 You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site. Leave a Reply [...]

  11. [...] 引用 夕口技術錄 Category: 程式進修 You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site. Leave a Reply [...]

  12. [...] 引用 夕口技術錄 Category: 程式進修 You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site. Leave a Reply [...]

  13. [...] 引用 夕口技術錄 Category: 程式進修 You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site. Leave a Reply [...]

  14. [...] 引用 夕口技術錄 Category: 程式進修 You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site. Leave a Reply [...]

  15. [...] 引用 夕口技術錄 Category: 程式進修 You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site. Leave a Reply [...]

  16. [...] 引用 夕口技術錄 Category: 程式進修 You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site. Leave a Reply [...]

  17. [...] 引用 夕口技術錄 Category: 程式進修 You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site. Leave a Reply [...]

  18. [...] 引用 夕口技術錄 Category: 程式進修 You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site. Leave a Reply [...]



Speak Your Mind

Tell us what you're thinking...
and oh, if you want a pic to show with your comment, go get a gravatar!