Shifting Right/Left by Space

34 views
Skip to first unread message

Christopher Stone

unread,
Jan 4, 2021, 4:30:16 AM1/4/21
to BBEdit-Talk
Hey Folks,

When you use Cmd-Shift-[ or Cmd-Shift-] BBEdit will shift the selection or the line the cursor is on by 1 space.

The problem is that when you reach the number of spaces in the tab-width the spaces convert to a tab.

I was thinking there was a way to prevent this and force the indent/outdent to stay spaces only.

But I didn't find anything when I was looking through the prefs or the expert prefs.

Do I remember correctly?  Or am I dreaming?

TIA.

--
Best Regards,
Chris

Nestor Aguilera

unread,
Jan 4, 2021, 7:38:07 AM1/4/21
to BBEdit Talk
Hi Christopher:

> On 4 Jan 2021, at 06:30, Christopher Stone <listmei...@gmail.com> wrote:
>
> Hey Folks,
>
> When you use Cmd-Shift-[ or Cmd-Shift-] BBEdit will shift the selection or the line the cursor is on by 1 space.
>
> The problem is that when you reach the number of spaces in the tab-width the spaces convert to a tab.

I don't see that if there is something that is not a space. The behavior of Cmd-Shift-] seems different when the line only contains spaces. But it could be my settings (I use no tabs and "auto expand tabs" checked in the editor default preferences, but it could be something else).

> [...]

Best,

Nestor

Christopher Stone

unread,
Jan 5, 2021, 12:50:39 AM1/5/21
to BBEdit-Talk
On 01/04/2021, at 06:37, Nestor Aguilera <nestore...@gmail.com> wrote:
I don't see that if there is something that is not a space. The behavior of Cmd-Shift-] seems different when the line only contains spaces. But it could be my settings (I use no tabs and "auto expand tabs" checked in the editor default preferences, but it could be something else).


Hey Nestor,

Cmd-Shift-] x 3:


Cmd-Shift-] x 4:


BBEdit automatically turns the spaces into tabs at my designated tab-width.

I particularly dislike this behavior.

I don't have Auto-Expand tabs ON, because I like tabs most of the time.

Nevertheless – thanks for the reminder.

I can toggle it with AppleScript and get the behavior I want at need.

The setting is also available in the Text-Options for the given editing window.  Cmd-Opt-.

The global setting does NOT affect the current editing window.

--
Best Regards,
Chris

@lbutlr

unread,
Jan 5, 2021, 12:55:24 AM1/5/21
to BBEdit Talk
On 04 Jan 2021, at 22:50, Christopher Stone <listmei...@gmail.com> wrote:
> Cmd-Shift-] x 4:

> BBEdit automatically turns the spaces into tabs at my designated tab-width.

Aha! That explains something that annoyed me and I didn't dig into to see what the cause was a week or two ago. It was very confusing and I just threw a regex hammer at it, but I think this might be what happened.

--
We are born naked, wet and hungry; then it's all downhill.

Christopher Stone

unread,
Jan 5, 2021, 1:12:27 AM1/5/21
to BBEdit-Talk
On 01/04/2021, at 23:55, @lbutlr <kre...@kreme.com> wrote:
Aha! That explains something that annoyed me and I didn't dig into to see what the cause was a week or two ago. It was very confusing and I just threw a regex hammer at it, but I think this might be what happened.


usually use Text › Detab to handle that little problem.

Turn on show-invisibles and then hit Cmd-Opt-] several times to watch it in action.

Entab and Detab are very handy at times, particularly when bound to keyboard shortcuts.

--
Best Regards,
Chris

Reply all
Reply to author
Forward
0 new messages