'How to indent in GitHub wiki's editor?

I'm using chrome with macbook. When I attempt to use tab to indent code blocks in GitHub wiki's editor/textarea, I fail miserably because tab is meant for shifting focus between fields ... as it should be in a browser.

I tried the outdated advice from the web:

In order to actually insert a tab you need to press the following key combination: ctrl + alt + tab. Note: depending on your keyboard, the alt key is sometimes called the option key.`

But it does NOT work.

On gitlab its easy to use tab because they have a full-screen mode in their wiki. But I'm stuck working on a GitHub repository's wiki.

So question(s):

a) How to indent a line in GitHub wiki's editor or textarea?

b) How to indent a a selected set of lines in GitHub wiki's editor or textarea?



Solution 1:[1]

A simpler solution might be to use GitHub's fenced code blocks, e.g.

```python
from foo import Foo

bar = Foo()
```

This has at least two benefits:

  • You don't have to worry about indenting whole blocks of code; you can simply mark the beginning and end of the block
  • You can optionally include a language hint (here I've used python) so GitHub can add syntax highlighting to your code block

Solution 2:[2]

for me its option ? + control ? + tab

not only for GitHub, but also StackOverflow and every other Website this problem occurs:)

ps.: I am using safari...

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Chris
Solution 2 Manu_Ebg