Kaie"s Blog 2.0 beta!
Back to "Top"

My Secret Notebook
 Show "Table of Contents"
Contact Me
Subscribe to my Posts feed
Subscribe to my Comments feed
My Flickr
Back to "Top"
My Secret Notebook
 Show "Table of Contents"
Contact Me
Subscribe to my Posts feed
Subscribe to my Comments feed
My Flickr

Monday, March 23, 2009

[Linux/Vim] Vim session manager

  在使用Vim的時候,時常會在不同的Project或是Module之間切來切去,在修改某個Module時,有時變動比較大,不是短時間就可以修改完的,亦或是偶爾會有些Interrupt,必須馬上停止目前的工作,切換到另一個project去...切很大、切不用錢...囧rz,通常一個module一改就得開好幾個檔案,這時想到若能有相關的Tool來達到這應用不知該有多好,心想強大的VIM肯定有類似的plugin可用。
  於是乎馬上求助於Google大神,尋找輔助工具,一開始找到了vim內建的mksession,的確可以達到我想要的,但並不是那麼的好用,有些小細節要再tune一下,心想 Vim Scripts 站肯定有許多好心的強者包裝好更方便的plugin了,因此就找到了底下這個好玩意.Description: Vim provides a ':mksession' command to save the current editing session. This plug-in helps to work with Vim sessions by keeping them in the dedicated location and by providing commands to list all sessions, open session, open last session, close session, save session and show last session. From a list of sessions you can open session, delete session, edit session and edit extra session script. Please note that session name can contain spaces and does not have to have a .vim extension.
.Link: sessionman.vim : Vim session manager
  
  它幾乎具備了所有我想要的功能了,但美中不足的是,這plugin並沒有考慮到"set autochdir"這個option(這是項好東西呀,我已被寵懷了,不行沒有它呀),這個option會導致透過Vim session manager所產生的檔案的路徑有點錯亂(即使是原生的mksession也有這問題),相關的討論串在此,看來也不少人遇到這問題。將那個workaround solution加進sessionman.vim之後... Perfect! 推薦給有需要的人…

1 Comment:

Who: Anonymous Class:
When: April 15, 2009 10:26 AM  

试试看