Code Monkey home page Code Monkey logo

viasfora's Introduction

Viasfora

A Visual Studio 2022 extension that enhances the text editing experience!

Official Site: http://viasfora.com/

Build Status: Build Status

Last version supporting Visual Studio 2019 and previous releases can be found Here.

Rainbow Braces

Colorize ()/[]/{} based on depth!
Rainbow Braces

Keyword classification

  • Colorize flow-control keywords
    Flow Control Keywords
  • Colorize LINQ keywords
    LINQ Keywords
  • Colorize visibility keywords
    Visibility keywords

String colorization

  • Highlighting escape sequences in strings
    Escape Sequences
  • Highlighting C/C++ format specifiers in strings
    C format specifiers

Outlining

  • User-defined Outlining regions
    User outlining
  • Creating new outlining sections based on selected text
    Outline selection

Text obfuscation

Provides an easy way to hide text in the editor during presentations, based on regular expressions.

Configuration Obfuscation configuration

Runtime Enable with the View -> Obfuscate Text command: Text obfuscation

XML editor extensions

  • Colorizing namespace prefixes
    XML Namespaces
  • Coloring closing element tags
    XML closing tags
  • Matching element tags
    Matching elements
  • Resolving namespace prefixes
    XML Prefixes

Other features

  • Presentation Mode
  • Simple modelines support
  • Editor margin for extension developers
  • All options configurable from the Visual Studio Options dialog

Supported Languages

Most features include support for the following languages

  • C/C++
  • C#
  • VB, VBScript
  • F#
  • JavaScript
  • SQL, U-SQL
  • TypeScript
  • Python
  • PowerShell
  • CSS, SASS, LES
  • S
  • R
  • HLSL
  • Fortran

Building

Visual Studio 2022 is needed for building from source.

viasfora's People

Contributors

tomasr 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  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  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  avatar  avatar  avatar  avatar

Watchers

 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

viasfora's Issues

v1.3 Exception: Winterdom.Viasfora.Text.RainbowTagger.ContentTypeChanged

Hi,

Since updating to v1.3 I'm getting the following error when trying to edit an MVC view (as per the activitylog.xml file):

System.NullReferenceException: Object reference not set to an instance of an object. at Winterdom.Viasfora.Text.RainbowTagger.ContentTypeChanged(Object sender, ContentTypeChangedEventArgs e) in C:\tomasr\viasfora\Text\RainbowTagger.cs:line 169 at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.RaiseEvent[TArgs](Object sender, EventHandler`1 eventHandlers, TArgs args)

The view I'm currently editing which generated the exception above is incredibly basic as per the screenshot attached.
view

Let me know if you require any additional information.

Rob

Bug: Plain-Text Completion Triggered by Non-Matching Char

When the plain-text completion is triggered, if the current content does not have any straight matches, the closest match might be committed, even if it is not the right fit.

I.e. say you have typed 'hell' and are about to press 'o' and the closest match is 'heaven', then that your hell will be replaced with heaven.

This does not happen always; have not found a clear repro yet.

Add Rainbow Parentheses support for VB

  • Refactor BraceExtractor to support parameterized brace chars list
  • Refactor BraceExtractor to take brace/comments configuration arguments from language item
  • Change RainbowTagger to support VB

Feature: Plain-Text Completion

Provide the option to augment the built-in Visual Studio text completion mechanism with one that is based off plain-text analysis of the current document, instead of the one provided by the language provider.

This could be used to provide completion on plain-text documents, as well as provide completion in regular code files in places where it does not usually work (like inside strings)

ArgumentOutOfRangeException in Winterdom.Viasfora.Text.BraceCache.FindIndexOfFirstBraceInSpan()

Getting this pretty often (version 1.2 installed):

System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.ThrowHelper.ThrowArgumentOutOfRangeException()
at Winterdom.Viasfora.Text.BraceCache.FindIndexOfFirstBraceInSpan(SnapshotSpan wantedSpan) in C:\tomasr\viasfora\Text\BraceCache.cs:line 177
at Winterdom.Viasfora.Text.BraceCache.Invalidate(SnapshotPoint startPoint) in C:\tomasr\viasfora\Text\BraceCache.cs:line 43
at Winterdom.Viasfora.Text.RainbowClassifier.UpdateBraceList(ITextSnapshot snapshot, INormalizedTextChangeCollection changes) in C:\tomasr\viasfora\Text\RainbowClassifier.cs:line 89
at Winterdom.Viasfora.Text.RainbowClassifier.BufferChanged(Object sender, TextContentChangedEventArgs e) in C:\tomasr\viasfora\Text\RainbowClassifier.cs:line 155
at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.RaiseEvent[TArgs](Object sender, EventHandler`1 eventHandlers, TArgs args)

Request: Add support for Typescript

Add TypeScript support to:

Rainbow Parentheses
Keyword Classifier

TODO: Review what possible keywords to classify

(Based on your existing F# enhancement)

I guess this would build upon the Javascript classifier?

Feature: Presentation Mode

Implement a new feature called "Presentation Mode". When enabled, all text windows automatically switch to a predefined zoom level (example: 150%).

Should be enabled/disabled using an option in the View menu.

NotImplementedException - GetCurFile

Hi,

Since updating to version 1.5 I'm seeing the following error in the activitylog file when editing an aspx web forms page in VS 2012:

  <entry>
    <record>1017</record>
    <time>2014/02/04 11:01:40.399</time>
    <type>Error</type>
    <source>Editor or Editor Extension</source>
    <description>System.NotImplementedException: The method or operation is not implemented.&#x000D;&#x000A;   at Microsoft.VisualStudio.Editor.Implementation.SecondaryVsTextBufferAdapter.Microsoft.VisualStudio.Shell.Interop.IPersistFileFormat.GetCurFile(String&amp; ppszFilename, UInt32&amp; pnFormatIndex)&#x000D;&#x000A;   at Winterdom.Viasfora.TextEditor.GetFileName(ITextBuffer buffer) in C:\tomasr\viasfora\Viasfora\TextEditor.cs:line 51&#x000D;&#x000A;   at Winterdom.Viasfora.Text.UserOutliningTagger.LoadRegions(ITextBuffer buffer) in C:\tomasr\viasfora\Viasfora\Text\UserOutliningTagger.cs:line 94&#x000D;&#x000A;   at Winterdom.Viasfora.Text.UserOutliningTagger..ctor(ITextBuffer buffer) in C:\tomasr\viasfora\Viasfora\Text\UserOutliningTagger.cs:line 19&#x000D;&#x000A;   at Winterdom.Viasfora.Text.UserOutliningTaggerProvider.&lt;&gt;c__DisplayClass1.&lt;Get&gt;b__0() in C:\tomasr\viasfora\Viasfora\Text\UserOutliningTaggerProvider.cs:line 25&#x000D;&#x000A;   at Microsoft.VisualStudio.Utilities.PropertyCollection.GetOrCreateSingletonProperty[T](Object key, Func`1 creator)&#x000D;&#x000A;   at Winterdom.Viasfora.Text.UserOutliningTaggerProvider.Get(ITextBuffer buffer) in C:\tomasr\viasfora\Viasfora\Text\UserOutliningTaggerProvider.cs:line 24&#x000D;&#x000A;   at Winterdom.Viasfora.Text.UserOutliningTaggerProvider.CreateTagger[T](ITextBuffer buffer) in C:\tomasr\viasfora\Viasfora\Text\UserOutliningTaggerProvider.cs:line 20&#x000D;&#x000A;   at Microsoft.VisualStudio.Text.Tagging.Implementation.TagAggregator`1.GatherTaggers(ITextBuffer textBuffer)</description>
  </entry>

Please let me know if you require more information.

Rob

Rename the colors in the VS options

Viasfora adds a bunch of new items to the fonts & colors part of the VS options dialog. However, these are not that easy to find, since the list is sorted alphabetically and it isn't clear which ones are added by Viasfora.

A simple solution would be adding a prefix (as is done by other extensions), ex. Viasfora_RainbowBrace_1, etc.

Feature: User-defined Outlining Regions

Allow the user to define arbitrary collapsible regions based on a selection the selection.

Initially, this might not be persisted after closing the file, but this should be added later.

Feature: Extension Developer Margin

Implement a text editor margin that is useful for developers writing extensions for the text editor. Initial features include:

  • Visualizing the buffer graph of the current text view
  • Explore the contents of each ITextBuffer in the buffer graph
  • Visualizing the caret position in the current text buffer (rather than line/column)

Column Highlighting: Wide columns stuck

When the caret goes over a collapsed region, the current column highlighting will get stuck sometimes using the width of the collapsed region display and not revert back to single-char width.

Clean up categories in Options Dialog.

With support for more languages is added, the categories in the Options dialog is becoming a mess. Organize these by adding all language-specific settings into a Languages category:
image

visual studio 2012 throwing error.

I am getting this error in visual studio 2012. An exception has been encountered. This may be caused by an extension. I checked the log file and found this entry.

System.NotImplementedException: The method or operation is not implemented. at Microsoft.VisualStudio.Editor.Implementation.SecondaryVsTextBufferAdapter.Microsoft.VisualStudio.Shell.Interop.IPersistFileFormat.GetCurFile(String& ppszFilename, UInt32& pnFormatIndex) at Winterdom.Viasfora.TextEditor.GetFileName(ITextBuffer buffer) in C:\tomasr\viasfora\Viasfora\TextEditor.cs:line 51 at Winterdom.Viasfora.Text.UserOutliningTagger.LoadRegions(ITextBuffer buffer) in C:\tomasr\viasfora\Viasfora\Text\UserOutliningTagger.cs:line 94 at Winterdom.Viasfora.Text.UserOutliningTagger..ctor(ITextBuffer buffer) in C:\tomasr\viasfora\Viasfora\Text\UserOutliningTagger.cs:line 19 at Winterdom.Viasfora.Text.UserOutliningTaggerProvider.<>c__DisplayClass1.<Get>b__0() in C:\tomasr\viasfora\Viasfora\Text\UserOutliningTaggerProvider.cs:line 25 at Microsoft.VisualStudio.Utilities.PropertyCollection.GetOrCreateSingletonProperty[T](Object key, Func`1 creator) at Winterdom.Viasfora.Text.UserOutliningTaggerProvider.Get(ITextBuffer buffer) in C:\tomasr\viasfora\Viasfora\Text\UserOutliningTaggerProvider.cs:line 24 at Winterdom.Viasfora.Text.UserOutliningTaggerProvider.CreateTagger[T](ITextBuffer buffer) in C:\tomasr\viasfora\Viasfora\Text\UserOutliningTaggerProvider.cs:line 20 at Microsoft.VisualStudio.Text.Tagging.Implementation.TagAggregator`1.GatherTaggers(ITextBuffer textBuffer)

Add way to highlight user outlines in editor

Need to have a way to separate regular structural outlining regions, from user outlining regions created through Viasfora.

Initial idea is to put a mark on the VS Marker Margin. We could also click on the mark to remove the region.

Modeline: Parse more than the first line

On the initial implementation of modelines, we only parse the first line of the document. However, this is not acceptable for some formats, such as XML files, that require that the very first line of the document contains specific data (such as an xml directive, or a hash-bang command).

Add support for F#

Add F# support to:

  • Rainbow Parentheses
  • Keyword Classifier

TODO: Review what possible keywords to classify

Modeline: Support modelines on any text file

Currently, modelines are only supported on file types for which we have specific parsers to handle the comment syntax. Most formats could be handled with a single parser that recognizes the most common comment styles.

Syntax highlighting when exploring buffers

When exploring the contents of text buffers using the developer margin, all buffers are opened as text files without any syntax highlighting.

Save the temporary file using the right extension (according to content type) so that it has syntax highlighting.

Rainbow parenthesis extremely slow

When the rainbow parenthesis option is enabled, this slows down the editor a lot, based on the size of the file being edited. Additionally, if ReSharper is enabled, this feature interacts negatively with ReSharper, slowing down everything exponentially.

Some rough numbers on what I mean. This is with a large file, ex. 50000 LOC. But even with a medium-sized file, ex. 2000 LOC you'll notice this. My machine is a Core i7-2600 with 3.4GHz running Windows 7, 64bit, VS2010, ReSharper 8.0.1.

If I type by holding down a key, the repeat rate is slowed down to less than 10 characters per second. If I then press Undo (Ctrl+Z), the main thread of VS is stuck at 100% for several minutes (!!!).

If I disable ReSharper, then the numbers are much better, about 20 cps and maybe 3 secs pause.

With ReSharper and rainbow parenthesis disabled, I have 30cps and instantaneous Undo.

With rainbow parenthesis disabled, ReSharper enabled, I have 30cps and maybe a half-second pause on Undo.

I did a quick debug of the VS process. The time is spent in Text/RainbowTagger.cs, line 66. Apparently this is called over and over again.

viasfora highlighting random single characters in vb.net

Thanks for bringing rainbow braces to vb.net. I disabled keyword classifier and Enabled only Rainbow braces. In vb.net, the rainbow braces working fine but at the same time, its highlighting odd single characters randomly. it also highlighting random single characters when I comment the code block.

Error Removing contents of an HTML Tag

Hi,

I'm getting the following error when removing the contents of an HTML tag:

  <entry>
    <record>1213</record>
    <time>2014/02/05 12:52:32.164</time>
    <type>Error</type>
    <source>Editor or Editor Extension</source>
    <description>System.InvalidOperationException: Nullable object must have a value.&#x000D;&#x000A;   at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)&#x000D;&#x000A;   at Winterdom.Viasfora.Xml.XmlTagger.&lt;DoXAMLorHTML&gt;d__d.MoveNext() in C:\tomasr\viasfora\Viasfora\Xml\XmlTagger.cs:line 112&#x000D;&#x000A;   at Microsoft.VisualStudio.Text.Tagging.Implementation.TagAggregator`1.&lt;GetTagsForBuffer&gt;d__5.MoveNext()</description>
  </entry>

I've attached an animated gif which shows what I was doing to cause the error message.

errormessage

Rob

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.