Giter VIP home page Giter VIP logo

prettypaste's Introduction

Pretty Paste for Visual Studio

Download the extension

Fixes pasting from Internet Explorer and Word by removing the extra blank lines.

Works with:

  • Visual Studio 2012
  • Visual Studio 2013

Contribute

Check out the contribution guidelines if you want to contribute to this project.

For cloning and building this project yourself, make sure to install the Extensibility Tools 2015 extension for Visual Studio which enables some features used by this project.

License

Apache 2.0

prettypaste's People

Contributors

am11 avatar icodeit avatar madskristensen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

prettypaste's Issues

Too much newlines eaten when pasting documentation comments

Installed product versions

  • Visual Studio: 2017 Enterprise
  • This extension: 1.9.12

Description

Too much newlines eaten when pasting documentation comments

Steps to recreate

Paste documentation comments:

/// <summary>
/// docs
/// </summary>

before a declaration

public class C

Current behavior

The declaration becomes part of the comment

/// <summary>
/// docs
/// </summary>public class C

Expected behavior

The result should be

/// <summary>
/// docs
/// </summary>
public class C

Duplicate code on paste being at virtual end of line

Installed product versions

  • Visual Studio: 2015 Professional
  • This extension: 1.9.12

Description

Weird duplicating part of line when pasting and being at virtual end of line.

Steps to recreate

  1. Prepare any file (e.g. class) with:
        {
            Trace.WriteLine("Line 1", "Test");
            Trace.WriteLine("Line 2", "Test");
        }
  1. Copy above 2 lines with Trace being on first character on each line - position cursor on first character on first line with Trace and SHIFT+CursorDown 2 times:
%from%            Trace.WriteLine("Line 1", "Test");
            Trace.WriteLine("Line 2", "Test");
%to%        }
  1. Selection should show two end of lines.
  2. Copy text to clipboard.
  3. Create some other code and position cursor at virtual end of middle empty line by using END key - do not use tabs or spaces:
        {
            %here%
        }
  1. Paste (CTRL+V) and see:
        {
            Trace.WriteLine("Line 1", "Test");
            Trace.WriteLine("Line 2", "Test"); ", "Test");

        }

Current behavior

Duplicating some extra code. When used CTRL+Z after paste it shows selection of duplicated part of code.

Expected behavior

It should paste original code.

Doesn't remove line numbers

I pasted this (copied from here) using Chrome:

     1:  <Fragment>
     2:    <CustomAction Id='SaveCmdLineValue' Property='CMDLINE_REMEMBERME'
     3:                  Value='[REMEMBERME]' Execute='firstSequence' />
     4:    <CustomAction Id='SetFromCmdLineValue' Property='REMEMBERME'
     5:                  Value='[CMDLINE_REMEMBERME]' Execute='firstSequence' />
     6:  
     7:    <InstallUISequence>
     8:      <Custom Action='SaveCmdLineValue' Before='AppSearch' />
     9:      <Custom Action='SetFromCmdLineValue' After='AppSearch'>
    10:        CMDLINE_REMEMBERME
    11:      </Custom>
    12:    </InstallUISequence>
    13:    <InstallExecuteSequence>
    14:      <Custom Action='SaveCmdLineValue' Before='AppSearch' />
    15:      <Custom Action='SetFromCmdLineValue' After='AppSearch'>
    16:        CMDLINE_REMEMBERME
    17:      </Custom>
    18:    </InstallExecuteSequence>
    19:  </Fragment>

The extension doesn't seem to clean it up:

image

Does it not work if there are no extra blank lines?

Problem with unicode data.

hi.
thanx for nice work.
I have problem with unicode data.
after paste unicode data, only show ?????.

One line issue (copied bug from my blog)

I've installed into VS2012, and found a defect. Is it just me? Copying items from a browser gives me this:

RouteTable.Routes.MapHubs();.MapHubs; 

instead of

RouteTable.Routes.MapHubs(); 

Confirmed this behaviour exists when Pretty Paste is enabled, and doesn't exist when it's disabled.

Copying text in Visual Studio

I'd like to be able to copy text out of Visual Studio without the formatting or tabs/extraneous spaces that may be present.

E_Fail COM exception when pasting a block selection

Installed product versions

  • Visual Studio: 2019 professional 16.5.5
  • This extension: 1.9.15

Description

E_Fail com exception after block selection paste

Steps to recreate

Example code:

public void TestFunction()
{
	var array = new Barcode[]
	{
		new Barcode { Id = 1, Code = "barcode" },
		new Barcode { Id = 1, Code = "barcode" },
		new Barcode { Code = "barcode" },
		new Barcode { Code = "barcode" },
	};
}
  1. block select both the Id property's
  2. copy the selection
  3. set a multiline caret on the last two classes before the Code property
  4. paste

Current behavior

After the paste:

  • an error pops up that gives the non descriptive E_Fail error message image
  • ctrl-z does not work any more till restart of VS
  • when pasting something else an error message pops up saying "only one undo context can be open at a time" image

Expected behavior

No error message and correct paste functionality.

I am not expecting a fix, just want to make sure that this information is available for others running into this issue.

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.