Giter VIP home page Giter VIP logo

screenshot's Introduction

This is a mirror of http://www.vim.org/scripts/script.php?script_id=1552

ScreenShot.vim enables you generate HTML code for screenshot of all open windows at once.
Windows layout will be preserved, and status line for every window will be displayed.
In other words, the resulted HTML will look the same as you VIM looks, with exception of menu, toolbar and other GUI items. 
Here(http://community.livejournal.com/screenshot_vim/4086.html) you can see a few examples.

ScreenShot.vim defines three commands:
1) ScreenShot  -- to make screenshot itself
2) Text2Html -- to generate HTML code for syntax highlighting of  peace of selected text  or of all current buffer if nothing selected. This command resemles standard command TOhtml, though has a few differences:
   a) Generation of HTML code is designed in assumption that this code will occupy just a region of HTML page rather than all page, so it wrapped in <table> tag and has no <body> tag. Background color and default text color for this region of page will be setted properly.
   b) Width of resulted HTML will be always equal to the width of current window. When 'wrap' setting is on, lines longer than the width of the window will wrap and  displaying continues on the next line.  When off lines will not wrap and only part of long lines will be displayed. So, you do not need to take in account long lines which may broke you page.
   c) Foldcolumn will be displayed
3) Diff2Html -- to display two files comparing with differencies highlighted. You may select any part of the first file, and obtain HTML code for this part and corresponding part of the second file separated with vertical split line.

ScreenShot.vim has a few global options which are stored in global dictionary g:ScreenShot:

g:ScreenShot.Title -- is title bar enabled
g:ScreenShot.Icon -- is VIM icon displayed in title bar (disabling of icon can significantly decrease size of document)
g:ScreenShot.Credits -- are credits displayed
g:ScreenShot.force_background -- force background color to some specific values 
g:ScreenShot.fill_screen -- force space from end of line to end of window to be filled with whitespaces(especially useful with command Text2Html to force highlighted text to occupy a region of HTML page with fixed width)

Color should be specified as a string in HTML color format #RRGGBB. This option may be useful as there is no reliable method to find out background color for console versions of VIM.

For instance, if you want to disable icon and credits you should insert in your vimrc : 

let ScreenShot = {'Icon':0, 'Credits':0, 'force_background':'#FFFFFF'}

By default all these options enabled.



screenshot's People

Contributors

brmglt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

taku-o

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.