Created
July 22, 2010 04:23
-
-
Save hotoo/485565 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- C:/Documents and Settings/wb-tianliang/My Documents/下载/calendar.vim Thu Jul 22 12:22:37 2010 | |
| +++ D:/Vim/vimfiles/plugin/calendar.vim Thu Jul 22 12:21:37 2010 | |
| @@ -1191,7 +1191,21 @@ | |
| let vbufnr = bufnr('__Calendar') | |
| " load the file | |
| - exe "sp " . sfile | |
| + if winnr('#') == 0 | |
| + if a:dir == "V" | |
| + exe "vsplit " . sfile | |
| + else | |
| + exe "split " . sfile | |
| + endif | |
| + else | |
| + wincmd p | |
| + if !&hidden && &modified | |
| + exe "new " . sfile | |
| + else | |
| + exe "edit " . sfile | |
| + endif | |
| + endif | |
| + | |
| setlocal ft=calendar | |
| let dir = getbufvar(vbufnr, "CalendarDir") | |
| let vyear = getbufvar(vbufnr, "CalendarYear") |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
让日记在最近未修改的窗口中打开,
而不是在狭窄的 calendar 窗口上方打开。