標籤:vim如下面一段代碼 我們準備讓代碼更加具有可讀性,在+前後添加空格變為如下: make the change repeatablef+執行在當前行尋找字元命令,s命令包含兩個操作,刪除當前字元和變為insert 模式。 在圖中我們用s命令刪除+,然後輸入空格+空格,esc退出insert模式變為normal模式。執行了一個完整的change。make the motion
標籤:1、vim ~/.vimrc 進入設定檔如果不知道vimrc檔案在哪,可使用 :scriptnames 來查看set nu #行號set tabstop=4 #一個tab為4個空格長度set ai #設定自動縮排syntax on #高亮 2、基本空格鍵 向右移動一格x 刪除後面的字元 X 刪除前一個字元 刪除3個字元就是3x dd:刪除一行 D
標籤:工具 vim 雖然現在有很多圖形介面的diff工具,但對於有命令列情節的人來說,當飛快的在terminal下敲擊鍵盤時,總不希望再拿滑鼠去點擊其它地方,況且有時候圖形介面佔用資源多,我的MBA就經常啟動diffmerge時卡住,但vimdiff又只能在一個標籤裡比較一組檔案的diff,如果想比較兩個目錄下檔案的diff,它就顯得無能為力了假設我們要實現一個工具叫diffdir,先讓我們腦洞開啟設想一下它應該是怎樣的我希望能
標籤:vimTip28Use Line Numbers as an Address If we enter an Ex command consisting only of a number, then Vim will interpret that as an address and move our cursor to the specified line.Specify a Range of Lines by Visual Selection Instead of addressing
標籤:Why not use tabs (introduced in Vim 7)? You can switch between tabs with :tabn and :tabp, With :tabe <filepath> you can add a new tab; and with a regular :q or :wq you close a tab. If you map :tabn and :tabp to your F7/F8 keys you can