Dec 03, 2014 Tags: Linux, QandA

Troublesome Switching between Tabs and Spaces in PhpStorm

Updated on Mar 28, 2015: Added a “see also”.

Problem

When coding I often have to switch between “Tab” and “Spaces” mode. Sometimes I need a real tab inserted (chr(9), \t), sometimes it’s better to have spaces instead. I find switching between those modes troublesome. I will show you how I’m doing it. Is there a better way?

How I’m doing it

Tabs or Spaces

  1. This is an example spot: Tabs or Spaces?

    001

  2. Here is where I toggle the option:

    1. Settings

      002

    2. Code Style General

      003

    3. Default Indent Options

      004

  3. Additionally I want to make whitespace visible:

    005

Line Numbers

Another plague: I usually want to see line numbers.

  1. To turn line numbers on,

    1. I right click in the left margin area of the text pane:

      006

    2. Then I select “Show Line Numbers”:

      007

Questions

What can I do better?

Is there a way to make that “line numbers” selection permanent?

Answers

Updated on Dec 04, 2014: Tips I received:

  • Use Quick switch scheme
  • Use an .editorconfig file that scopes the usage of code style

Comments

comments powered by Disqus

Previous topic

Linux Scripts for Easy YouTrack Installation

Next topic

Thinkpad T-430

Tags

Archives

Languages

Recent Posts

This Page