none
Extra spaces in Visual Studio Schema.xml

    Question

  • I'm developing a SharePoint add-in in Visual Studio 2015 community. In every project I have, the list Schema.xml has tons of extra spaces in between the elements. I don't know how to get rid of these extra spaces. When I try "Edit > Advanced > Format Document" it does not get ride of the spaces:



    Wednesday, October 12, 2016 2:23 PM

Answers

  • Hi Jsquared Solutions,

    As far as I know, the Edit > Advanced > Format Document used to sort the codes in editor, such as text-indent, space between properties and so on.

    If you want to remove the blank lines in editor, please use the Find and Replace window. You could open it with Ctrl + Shift + H.

    And then use regex of "^(?([^\r\n])\s)*\r?$\r?\n" to find all blank lines in editor and click the Replace All button to remove them.

    Best Regards,
    Weiwei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, October 14, 2016 6:19 AM
    Moderator

All replies

  • Hi,

    Thanks for posting in SharePoint forum.

    This forum is for developers discussing developing issues involve SharePoint and Apps for Office and SharePoint . Since the issue is more relative to Visual Studio formatting, I would move it to Visual Studio Development forum.

    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. 

    Thanks for your understanding.

    Best Regards,

    Lee


    Please remember to mark the replies as an answers if they help and unmark them if they provide no help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Thursday, October 13, 2016 9:05 AM
  • Hi Jsquared Solutions,

    As far as I know, the Edit > Advanced > Format Document used to sort the codes in editor, such as text-indent, space between properties and so on.

    If you want to remove the blank lines in editor, please use the Find and Replace window. You could open it with Ctrl + Shift + H.

    And then use regex of "^(?([^\r\n])\s)*\r?$\r?\n" to find all blank lines in editor and click the Replace All button to remove them.

    Best Regards,
    Weiwei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, October 14, 2016 6:19 AM
    Moderator
  • Is there possibly a Visual Studio extension that does this automatically? 
    Friday, November 4, 2016 7:00 PM
  • Hi Jsquared Solutions,

    I don't find such VS extension could replace all blank lines in code editor at present.

    I suggest you use above workaround to replace the blank lines in Visual Studio before there has such VS extension. If any news about such extensions, I will update the news here as soon as possible.

    Best Regards,
    Weiwei


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, November 7, 2016 6:21 AM
    Moderator