Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to indent in GitHub wiki's editor?

Tags:

github

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?

like image 660
pulkitsinghal Avatar asked Nov 07 '22 04:11

pulkitsinghal


1 Answers

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
like image 53
Chris Avatar answered Nov 15 '22 07:11

Chris