Giter Site home page Giter Site logo

stephensli / toggler Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 1.0 120 KB

Toggle words and symbols in VSCode using a user defined configuration.

Home Page: https://marketplace.visualstudio.com/items?itemName=tehstun.toggler

License: MIT License

TypeScript 100.00%
formatter vscode vscode-extension toggler

toggler's Introduction

Hi, I'm Stephen, a passionate backend software engineer from the UK. I take great care in the architecture and code quality of the things I build. When I have the time, I am also an open-source enthusiast and maintainer, you can find me dabbling with projects throughout Github.


Cars (Compile & Run Sandbox) 🚙 - stephensli/cars

This is currently the main project I'm working on when I have some spare time. Cars is a sandbox environment to allow execution of untrusted code with fixed time, and memory with support for output testing. It runs on all the major queue services, and data stores with a focus on container execution.

toggler's People

Contributors

bizoo avatar dependabot-preview[bot] avatar stephensli avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

bizoo

toggler's Issues

Allow change all matched replacements in selection

I use the extension mostly for changing from double quotes to single quotes in current "string". But doing it by every " is slow, even if you do a multi cursor selection.

Make a setting to allow changing all matches in selected text, so that if I select: "string" and press the shortcut it will switch to all combinations of ", or if there's a match to the entire selection, do the same.

"string"
// to
'string'
// to
`string`
// to 
"another-string"   // if any

Use the current word if selection is empty

If selection is empty, toggle the word under or next to the cursor (using API method getWordRangeAtPosition() ?).
This way you don't have to select the word prior executing toggler.

Thanks for this great plugin.

Cursor position leads to unexpected or impossible toggles

Without selection, if we take the test => test.only toggle, the cursor position leads to totally unexpected result.

toggler2

The ^ indicates the cursor position.

test will transform into test.only.
        ^

test.only will transform into test.only.only.
 ^

test.only will not even trigger a toggle.
                  ^

test.only will not even trigger a toggle.
          ^

test.only will transform into test.only.only.
        ^

Weird selection after toggling makes it impossible to toggle anymore

Without a selection, after toggling, some (random) parts of the words get selected making it unable to toggle anymore.

toggler1

The selection seems to always happen at the end of the word but the length is not always the same:

  • false
  • unload
  • disabled

This does not happens when selecting the word to toggle.

VSCode v1.14.0

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.