Coder Social home page Coder Social logo

selectionwrapper's People

Contributors

emartineau 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

Watchers

 avatar  avatar

selectionwrapper's Issues

Pasting text with open parentheses on a selection does not replace selection

  • Copy text test( [into clipboard]
  • Select content text abc
  • Paste with CTRL+V

Expected: abc is replaced with test(

Actual: abc is wrapped with test(and)resulting intest(abc)instead oftest(`

Especially problematic example/consequence:

For content abc() with clipboard content test(:

  • Select abc(
  • Paste

Expectation: test()

Actual: test(abc())

Breaks multi-cursor editing

  • Use SHIFT+ALT+Arrow-Down to enter multi-row/multi-cursor edit
  • Enter ( to write a (

Expected: It writes a ( or a () on every cursor

Actual: It writes

(

)

(on every cursor position)

ability to keep the selection?

so if you select some code and wrap it in ( )s, it wont deselect the code, allowing you to move the caret to the start of the brackets (like what you can do in intellij for example).

great plugin btw :)

[Feature request] Delete matching character

I really like this extension and think its functionality should be the default behavior in Visual Studio.

One thing I'm missing however is this:
If the cursor is placed between two matching characters and I press Backspace I'd like to delete the one on the right as well automatically instead of having to manually press Delete afterwards.

So e.g. "foo.Bar(|);" becomes "foo.Bar|;" (where | is the cursor) when pressing Backspace.

Would it be possible to add this?

[Feature Request] Support multiple selection

Apparently the extension doesn't work when using multiple selection. Instead of wrapping in parenthesis, it just prints the opening character, removing all the selected text in the process. This could be a bug, also.

NullReferenceException in TextBuffer_PostChanged -> Wrapper.Wrap

I am not sure what I did specifically but a NullReferenceException occurred.

3080 | ERROR | System.NullReferenceException: Object reference not set to an instance of an object.
   at SelectionWrapper.Wrapper.Wrap(ITextBuffer textBuffer)
   at SelectionWrapper.EditorListener.TextBuffer_PostChanged(Object sender, EventArgs e)
   at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.RaiseEvent(Object sender, EventHandler eventHandlers)
 --- End of stack trace from previous location where exception was thrown ---
   at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)

3081 | ERROR | System.NullReferenceException: Object reference not set to an instance of an object.
   at SelectionWrapper.Wrapper.Wrap(ITextBuffer textBuffer)
   at SelectionWrapper.EditorListener.TextBuffer_PostChanged(Object sender, EventArgs e)
   at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.RaiseEvent(Object sender, EventHandler eventHandlers)
 --- End of stack trace from previous location where exception was thrown ---
   at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)

Deleting contents between brackets with "Automatic brace completion".

Selecting all text inside brackets (parenthesis, square, curly, etc..) and pressing delete or backspace will not delete the text. Instead a closing bracket will be appended to the selection.

This might be related to having "Automatic brace completion
" turned on (Options > Text Editor > [language])

selection_bracket_issue

[Feature request] automatically close brackets even when no text is selected

Please add in your extention the ability to automatically close brackets even when no text is selected.

Automatic brace completion does not works properly in Visual Studio IDE:

vs-img

but VSCode does this job correctly:

vscode-gif

I would disable Visual Studio standard behavior:

image

and enable your extension's option. I suggest to add into settings one more option:

SelectionWrapper.AutomaticalyCloseAnyBraces: true/false

enabling this option should cause automatically close open braces: (), {}, []

mouse cursor should be between braces: (|), {|}, [|]

to avoid incorrect behavior angle brackets should not auto close:

if(a<>b)

NullReferenceException when opening files

Multiple times now I have opened/switched files and VS reports exceptions. Checking the activity log its NullReferenceExceptions from this plugin.

System.NullReferenceException: Object reference not set to an instance of an object.
   at SelectionWrapper.Wrapper.Wrap(ITextBuffer textBuffer)
   at SelectionWrapper.EditorListener.TextBuffer_PostChanged(Object sender, EventArgs e)
   at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.RaiseEvent(Object sender, EventHandler eventHandlers)
 --- End of stack trace from previous location where exception was thrown ---
   at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)
--

Just now I opened a file with CTRL+T, typing part of the file name, and hitting enter.

I can not directly reproduce it though. So probably depends on some state.

Please tag releases in Git

Please tag the releases in this Git repository so changes can be checked and whether changes have been made since the currently released version.

Thank you

Multi-cusor editing does not wrap selections

For content

abstract
abstract
  • Place cursor after a, and enter multi-cursor editing (SHIFT+ALT+Down) to place a second cursor on the second line after the a.
  • Use SHIFT+Right to select both b characters.
  • Type (

Expected: both b characters are wrapped in parentheses (just like when this is done with a single cursor on a single line)

Actual:

a(b
b
)stract
a(b
b
)stract

When multi-cursor mode is entered from bottom to top instead the b is being replaced:

a(stract
a(stract

Error when wrap only one word

It works great if there are many words but if you want to wrap only one word then occurs this error. Error depends on automatic brace completion:

image

  1. if you have unchecked automatic brace completion:

111

  1. if you have checked automatic brace completion:

ooo

VS2022 support

Pretty self-explanatory. The only version supported currently is vs2019.

It should only be a matter of changing manifesto, and there are already 3 forks doing that.

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.