Git Product home page Git Product logo

virtualtabstopsvsextension's Introduction

Feels like tabs

Feels like tabs is a Visual Studio 2022 extension that simplifies navigation in source code with keyboard when space indentation is used. Arrow key navigation, backspace, delete, and selection actions are modified to advance through whitespace as if the code contained tabs.

Why would you want to use this extension

Many developers discussed whether spaces or tabs are superior and some might say that spaces won this battle. There is, however, a minority of developers (like me) who prefer tabs despite the outcome of this war.

There are 2 major reasons why we will be using spaces instead of tabs:

  1. We must respect code style of already established projects.
  2. If you can't beat your enemy, it's usually better to join your enemy.

With the 2nd point in mind, I have switched to spaces instead of tabs, however, working with spaces drives me insane and here is why:

  • When you press tab, Visual Studio automatically inserts spaces.
  • When you want to delete this "fake tab" by pressing backspace, it won't work, it will delete only 1 of the (usually) 4 spaces inserted.
  • When you press left or right arrow buttons, it will move the caret by just 1 space and not 4 spaces.

So the task of this extension is simple: pretend, that the source code contains tabs, when it encounters consecutive spaces, that is:

  • When you press left/right arrows and all there is are just spaces, move the caret to the next tab stop.
  • When you press backspace/delete, delete all spaces to the next tab stop.
  • When you press shift + left/right arrows, extend the selection to the next tab stop.

How to use

Just install the extension from the vsix file. There is no configuration - tab/spaces settings is taken from Visual Studio.

To turn the feature off, simply uninstall the extension.

virtualtabstopsvsextension's People

Contributors

xmarkos avatar

Watchers

 avatar

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.