- 170 名前:名無しさん@お腹いっぱい。 mailto:sage [2007/09/24(月) 20:03:36 ID:6lhpPgYR0]
- >>161
kaoriya.netのBBSに昔貼ってあったやつ " Window位置の保存と復帰 if 1 && has('gui_running') let s:infofile = '~/.window.vim' function! s:WinPosSizeSave(filename) redir @a winpos redir END let px = substitute(@a, '.*X \(\d\+\).*', '\1', '') + 0 let py = substitute(@a, '.*Y \(\d\+\).*', '\1', '') + 0 execute 'redir! >'.a:filename if px > 0 && py > 0 echo 'winpos '.px.' '.py endif echo 'set lines='.&lines.' columns='.&columns redir END endfunction augroup WinPosSizeSaver autocmd! augroup END execute 'autocmd WinPosSizeSaver VimLeave * call s:WinPosSizeSave("'.s:infofile.'")' if filereadable(expand(s:infofile)) execute 'source '.s:infofile endif unlet s:infofile endif
|

|