sponsor Vim development Vim logo Vim Book Ad

autopreview : a light script to immediately preview definitions like source insight

 script karma  Rating 176/49, Downloaded by 1831  Comments, bugs, improvements  Vim wiki

created by
Baohua Yang
 
script type
utility
 
description
The "autopreview" plugin is a light script plugin for Vim that could automatically preview the definition of variables or functions in a preview window like source insight.
I think this script should be helpful when you're insighting a lot of code files and wanna to see the definition of a new variable or function in the source codes immediately without having to input "ptag" each time.
Taglist plugin is needed for this plugin which is alreasy integrated into the latest version of Gvim.

#Usage
If you add "let g:AutoPreview_enabled = 1" into your vimrc file, the autopreview window will be open when vim is started; otherwise add "let g:AutoPreview_enabled = 0" (which is default if you do not set this value) into your vimrc file, the autopreview window will be open only after you press your mapped hotkey.
Any time you press your mapped hotkey, you could enable or disable the autopreview window
 
install details
If you haven't installed taglist, please install it first: http://vim.sourceforge.net/scripts/script.php?script_id=273

#1 Download autopreview.vim into your favorite plugin directory or source the script from your .vimrc file (_vimrc for windows)

#2 Add the following context into your .vimrc file
     " Automatically enable the preview function with vim starting
     let g:AutoPreview_enabled =1

     " make you could press F5 key to enable or disable the preview window, you can also set to other favorite hotkey here
     nnoremap <F5> :AutoPreviewToggle<CR>
     inoremap <F5> <ESC>:AutoPreviewToggle<CR>i

     " set the time(ms) break to refresh the preview window, I recommend 500ms~1000ms with good experience
     set updatetime=500

#3 Restart Vim.
     (Press F5 to enable the plugin if you set "let g:AutoPreview_enabled =0")
     Just Enjoy It!
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
autopreview.vim 1.0 2008-07-29 7.0 Baohua Yang a stable and total version
several changes list below:
add highlight effect with previewword
deal with folded codes
some changes with the use guide document
autopreview.vim 0.2 2008-05-12 7.0 Baohua Yang Release 0.2: cleanup, optimize and enhance based on release v0.1
Thanks to Liu Yubao <yubao.liu@gmail.com>
autopreview.vim 0.1 2008-05-06 7.0 Baohua Yang Initial upload
ip used for rating: 3.145.17.46

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
Vim at Github