[ANN] winjumplist 1.0.0 - Windows Jump Lists with Vim

19 views
Skip to first unread message

Eli Young

unread,
Feb 22, 2015, 6:54:10 PM2/22/15
to vim...@googlegroups.com
Windows 7 introduced a feature called Jump Lists, which offer easy access to recently-used files. Unfortunately, Vim doesn't support it. To remedy this, I wrote winjumplist.vim, which is now ready for release.

Homepage:
https://github.com/elyscape/vim-winjumplist

Screenshot:
https://github.com/elyscape/vim-winjumplist/wiki/screenshots/withjumplist.png


## How it works

Windows populates the recent items in an application's Jump List from the entries it has added to the Recent Documents list in the Start menu. Files are added to the Recent Documents list when either of two things happen:

1. The user double-clicks on a file in Explorer.
2. The application calls SHAddToRecentDocs().

While Vim doesn't call SHAddToRecentDocs(), if you've associated any extensions with Vim, you may notice that files you've opened from Explorer have been added to Vim's Jump List. winjumplist.vim calls SHAddToRecentDocs() when Vim opens files so that you can get the full benefit of having Jump Lists.


## Installation

If you don't have a plugin manager, I highly recommend getting one.

* Pathogen (https://github.com/tpope/vim-pathogen)
* git clone https://github.com/elyscape/vim-winjumplist.git ~/vimfiles/bundle/vim-winjumplist

* NeoBundle (https://github.com/Shougo/neobundle.vim)
* NeoBundle 'elyscape/vim-winjumplist'

* Vundle (https://github.com/gmarik/Vundle.vim)
* Plugin 'elyscape/vim-winjumplist'

* Manual install
* copy the files into your ~/vimfiles directory


## Customization

You can tell winjumplist.vim to ignore certain files by setting g:winjumplist_excludes to be an array of regular expressions that match file paths you don't want added to Vim's Jump List. It defaults to ['\v\\doc\\[^\\]+\.txt$'], which should match any Vim help files.


## Requirements and caveats

* Obviously, this only does anything on Windows.
* Your copy of Vim must have been compiled with the libcall feature for winjumplist.vim to do anything. Most standard Windows distributions of Vim, including the official binary, include libcall.
* Files without extensions are not added to the Recent Documents list. This is a limitation of Windows itself and therefore not something I can fix.
* winjumplist.vim does not work with the console version of Vim and will silently refuse to load.


## Things to be aware of

Since SHAddToRecentDocs() is a Windows API function, calling it requires the use of a compiled DLL. For your convenience, I have provided precompiled DLLs for both 32-bit and 64-bit versions of Vim. If you don't trust me and want to build it yourself, I've included everything you need to do so. Just fire up Visual Studio and do a release build on the included solution. If you don't have a copy of Visual Studio, Visual Studio Community is available for free.
Reply all
Reply to author
Forward
0 new messages