question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"Increase list level" action inserts keyboard key if the list indent is invalid

See original GitHub issue
- foo
<press-shortcut>- bar

- foo
  - bar

- foo
  <press-shortcut-again>- bar

// E.g. if we bind the shortcut to `alt + .` it will insert a special character `≥`.
- foo
  ≥-bar

First of all, I would expect it to do nothing rather than inserting the default shortcut.

Secondly, I think that it should allow you to make invalid indentations, otherwise it feels like Visual Basic popping up a modal dialog when you make a syntax error 😵 . All other editors don’t prevent me from writing invalid code - as sometimes you need to as part of refactoring, etc.

I also think that when there is an empty list, the tab key should behave like this action (see https://github.com/vsch/idea-multimarkdown/issues/469).

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
vschcommented, Aug 30, 2018

Addressed by #469 to use tab/backtab for indent/unindent

1reaction
vschcommented, Jul 21, 2017

@vjpr, the indent action is context sensitive and not just “insert spaces”. It will “indent” the item and its sub-items, if it has any, indent action on item 2:

1. item 1
2. item 2
   * sub item
     * sub-sub item

Will result in:

1. item 1
   1. item 2
      * sub item
        * sub-sub item

If you want plain text editing behaviour then you should use tab or spaces. I will add config option for number of spaces for a tab then you can set it to 2 and get what you want. However, setting smart tabs, which will use context sensitive behaviour will result in the “indent list item action” when appropriate or simple tab when not. So you will get the above indentation behaviour when the caret is after the list item marker.

Markdown has complex context, especially when it is being edited getting the AST and text can be out of sync. Trying to do the right thing as far as being intuitive is very difficult with lots of unexpected gotchas.

This is the reason why I have been hesitant to put in “smart” tab behaviour. There is a lot of trial and error with tons of special conditions leading to very long stabilization periods that the users hate.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Tab key in Microsoft Word does not increase indent in bullet lists
Use Alt + Shift + Right Arrow . You're welcome. Share. Share a link to this answer.
Read more >
Add a numbered or bulleted list to a message
Keyboard shortcut Type * (asterisk) to start a bulleted list or 1. to start a numbered list, and then press Spacebar or the...
Read more >
How to indent/format a selection of code in Visual Studio Code?
I want to indent a specific section of code in Visual Studio Code: Select the lines you want to indent, and; use Ctrl...
Read more >
EASY FIX: TAB KEY DOES NOT INDENT THE BULLET LIST!!!
Microsoft Word is a great program for great word documents, but sometimes settings get changed and you end up pulling your hair out...
Read more >
How to Adjust Bullet or Number List Indents in Microsoft Word
Right-click and select Adjust List Indents from the shortcut menu. Right-click and pick Adjust List Indents. When the small window appears, you ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found