看板 Editor 關於我們 聯絡資訊
最近開始使用emacs,也替emacs寫了一個小小的plugin smart-window.el https://github.com/dryman/smart-window.el 我自己原本是vim的重度使用者,其中最常用的功能之一就是在不同視窗及tab當中切換 轉換到emacs時除了快速鍵讓我覺得很難記之外,最想念的就是vim視窗的功能 網路上沒有找到別人寫過類似的模組,就捲起袖子自己跳下去寫 所幸emacs文件很齊全,花個三天就把模組加文件完成了 目前支援的功能有: M-x smart-window-move M-x smart-window-buffer-split M-x smart-window-file-split M-x smart-window-rotate M-x sw-above M-x sw-below M-x sw-left M-x sw-right 快速鍵則是 C-x w => smart-window-move C-x W => smart-window-buffer-split C-x M-w => smart-window-file-split C-x R => smart-window-rotate C-x 2 => sw-below C-x 3 => sw-right * * * 會想要寫這模組的動機是,在emacs中你很難將視窗改變位置 例如左邊的視窗要移到右邊,小視窗要變成大視窗等等 你必須要切換到那個視窗,然後再從buffer list中選取你要的buffer 再切到另一個視窗,重複步驟選取buffer vim 就方便的多:C-w加上大寫的HJKL就可以輕鬆的重組視窗 叫出新的視窗並讓內容是指定的檔案,也只需要:sp <FILE>即可 vim 也有window rotate還有切換成tab等等的東能 除了tab實作起來真的不容易外,其他我常用的功能我都搬上emacs了 重組視窗是smart-window-move 切割視窗並選取buffer現在一個步驟就可以完成 還有window-roate 快速鍵沒多少選擇,有更好的建議的話還請大家回饋意見 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 68.181.5.15
xatier:emacs 推! 02/16 02:36
herculus6502:推!有篇“大話 Emacs Shell Mode 第 3 部分"滿類似的 02/18 02:35
dryman:我之前查到的window rotate都只能適用一種window layout 02/18 06:52
dryman:其實只要用window-list然後拿出buffer, rotate再指派回去 02/18 06:53
dryman:就可以了... 02/18 06:53
herculus6502:對耶,沒想到說^^ 02/19 06:49
Ntst0:就捲起袖子自己跳下去寫 03/08 08:04
YuiHirasawa:這個好好用喔~~ 03/24 00:12