GithubHelp home page GithubHelp logo

surround-template-shortcuts's Introduction

VSTSBuild

Surround Template Shortcuts for ReSharper

This plugin for ReSharper creates keyboard shortcuts to activate Surround Templates.

Surround Templates in ReSharper can be assigned a "mnemonic" number, which is normally only used to show in the surround-with dropdown (Ctrl+E, U). This plugin adds additional keyboard shortcuts that activate Surround Templates on the current text selection.

The shortcut defaults are Ctrl+0 to Ctrl+9 (corresponding to mnemonic numbers 0 to 9) and these can be changed from the Visual Studio keyboard options (search for SurroundTemplateShortcuts).

Please add suggestions on UserVoice

https://dsschneidermann.uservoice.com

Features

  • Activate Surround Template for current text selection

Example

  • Activate Surround Template on language element at cursor

    Activate with the cursor on a reference, method use or object initializer (new ...) and the whole language element will be surrounded.

  • Shortcut to "Move brace to end of selection" (Ctrl+Alt+0)

    Moves the first brace of the text selection to the end. Intended to make it easier to move auto-inserted braces down.

Instructions

  • Due to ReSharper limitations, the keyboard bindings must be activated (one-time) from the button in the ReSharper -> Tools menu.

Example

  • Import some premade Surround Templates (ReSharper -> Tools -> Templates Explorer...):

https://github.com/dsschneidermann/surround-template-shortcuts/blob/master/SurroundTemplateShortcuts.DotSettings?raw=true (8 templates)

  • Note: you will have to clear the mnemonic numbers from any other Surround Templates (or just remove them entirely, if you've never used them like me). Also note the mnemonics have been made with a euro-keyboard where the parenthesis are 8 and 9 - just change if desired.

Planned

  • Support for adding Postfix commands to active Surround Templates
  • Settings page (if options are needed for the plugin)

Release Notes

[1.0.0]

• [Added] Support for ReSharper 2017.1

• [Added] Caret on certain language elements will surround to it (eg. on method use, object initialization)

• [Fixed] Caret placed at end of word now selects correctly for surrounding

[0.9.0]

• Initial version

surround-template-shortcuts's People

Contributors

dsschneidermann avatar dsschneidermann1 avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

deus-amd

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.