sponsor Vim development Vim logo Vim Book Ad

dictview.vim : print the contents of a variable

 script karma  Rating 2/2, Downloaded by 1317  Comments, bugs, improvements  Vim wiki

created by
Andy Wokula
 
script type
utility
 
description
Print the contents of a variable (or any expression), useful for lists and dictionaries.

Adds the command
    :DictView {expr}

Examples:
:let mylist = ["foo","bar"]
:DictView mylist
* [
    'foo'
    'bar'
* ]
:DictView {1: mylist}
* {
*   1:
    [
      'foo'
      'bar'
    ]
* }

Custom variables:
g:dictview_shiftwidth (default 2)
g:dictview_maxlevel (default 10)

Global functions:
func! DictView_PrintList(value, ...)
func! DictView_Print(value)

2009 Nov 21 also check out: PrettyPrint  vimscript #2860, it is much better
 
install details
copy to plugin folder (e.g. ~\vimfiles\plugin)
 

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
dictview.vim 0.1 2008-08-14 7.0 Andy Wokula Initial upload
ip used for rating: 216.73.216.103

Questions about Vim should go to the maillist. Help Uganda.     Vim at Github