Tab Key - No Contextual Behavior?

Typically, in Writer-like text editors, the behavior of the Tab key is:

*If Tab key is pressed while the cursor is at the start of a line, it increases indent (and Shift+Tab decreases indent).

*If Tab key is pressed while text is highlighted, it increases indent (and Shift+Tab decreases indent).

*If Tab key is pressed while the cursor is within a line, it inserts a tab character.

This is how it behaves in i.e. MS Office, Google Docs, SoftMaker Office, WPS Office, KWrite, VS Code, etc - pretty much any text editing software that a typist is likely to have experienced. However, what I’m finding in Libre is that it seems to ALWAYS just type a “tab” character; if you select some text & press tab, it erases the selection & replaces it with a tab.

Is there a way to get LibreWriter to behave like other text editor with regards to the “Tab” key?

(Note: I’m aware that there are different/separate shortcuts Ctrl+M/Ctrl+Shift+M to explicitly indent, but that’s beyond the scope of this question. Having to use 3 different shortcuts is much more cumbersome & impacts typing speed, and is unfamiliar to muscle memory for anyone with experience typing in other text editing software).

Thanks!

1 Like

In LO Writer, Tab never increases indent. In the three cases you describe, Tab is just considered as a character and is inserted or replaces the selection.

There is a special context in which Tab behaves as a control command: llists.

Other document processors do not manage cleanly styles. At best, they know about paragraph styles. LO Writer has more categories: character, page, frame ans so-called “list” styles (in fact, they should have been named “sequence” style).

When you combine a paragraph style and a “list” style, the resulting paragraph style is fit for formatting list items. In such paragraphs, with the cursor set at the very beginning of a list item, when you hit Tab, you increase the item level within the list (going from level-1 a; to level-2 a.a. and so on when you’re already at level-n). Reciprocally, Shift+Tab will reduce the item level.

This could visually change the indentation of the list item but Tab is not the key factor for that. Level indentation is defined by the list style (the category I named “sequence”) where you can set how each level is indented and how it is numbered (labelled).

(For lists implicitly created with the toolbar button, settings can be changed with Format>Bullet & Numbering (an implicit internal style independent from any custom style).)

As you can see, the semantics is quite different from other document application.

Note, by default, Ctrl+M is Format>Clear Direct Formatting, not increase indent (unless you customised your keyboard shortcuts).

For elaborate documents, I highly recommend to work with styles and no keyboard formatting equivalent. It is much better to separate content and appearance with an adequate and consistent use of styles. Direct formatting is a source of insurmountable problems. Usually you have a preferred aspect for your document. Translate this aspect into styles and stores them in a template which you’ll define as your default. Then all your documents will have the same look and you’ll type faster because you no longer need to manually format.

Of course, this is only a partial answer to your question.

To show the community your question has been answered, click the ✓ next to the correct answer, and “upvote” by clicking on the ^ arrow of any helpful answers. These are the mechanisms for communicating the quality of the Q&A on this site. Thanks!

In case you need clarification, edit your question (not an answer) or comment the relevant answer.

EDIT 2020-04-16

Remember that Writer is not Word and does not pretend to be a drop-in replacement.

Writer is different from Word and explores other ways of formatting text. Of course, the bases are shared by all programs but how it is implemented varies. One of the highest-valued progress in Writer is the very clean definition of styles.

Nolens volens, any change of tool requires an effort to accept the differences. This is the hardest psychological part, all the more M$ threatens the common user with their “FUD” (fear, uncertainty, doubt) propaganda.

However, you can usually emulate Word behaviour with Tools>Customize, Keyboard` tab by assigning key combination to an action.

In your case, commands Increment/Decrement indent value are available. But, the Tab key (with or without other modifiers) can’t be used. You might use another key but your users will have to get used to it.

Note that you can customise key bindings and install it on all your PCs so that all machines behave identically.

Thanks for the quick & detailed response :slight_smile:

All that info about lists seems to relate to a different scenario than my question, however I believe I can summarize:

LibreWriter cannot be made to replicate the tab key behavior of other MS Office-like applications. In other words, I didn’t find an option to do so, because one isn’t there. Is that accurate?

Regarding “I highly recommend to work with styles and no keyboard formatting equivalent,” there are multiple users of this PC, all of whom have extensive backgrounds with MS Word. The goal was to have as frictionless a migration as possible. I personally have been using it for decades, & am very comfortable with being able to easily indent/un-indent with a single keyboard stroke (never encountered an insurmountable problem). Also, consistent behavior across platforms is important - if users are often going back & forth, it seems counterproductive to have to keep track of differing behaviors […continued…]

…i.e. between local editing & GDocs.

In any case, I posted this because just in the first few days of use, I kept on wiping out text when I instinctively tried to select-and-indent. To make sure I wasn’t crazy (& it wasn’t actually Word that’s the outlier in terms of behavior), I tried all those other examples (plus WPS Office), but wasn’t able to find another software where “tab” can’t be used to increase/decrease indent. So I assumed I was just missing a simple option somewhere, as it’s so standard & widespread a behavior.

Fingers really crossed that there is an option & perhaps someone else might be aware of it? :slight_smile:

Understood - thanks, accepted.
Just one comment I’d make in response to the edit: “Writer is not Word and does not pretend to be a drop-in replacement” - Agreed, but again, it isn’t just Word that behaves this way. It’s indeed all other editors (that I could find): WPS Office, SoftMaker Office, FreeOffice, Google Docs, & OnlyOffice. I get that Libre may provide an alternative/different way to accomplish formatting, and it’s always great to have options. But it’s a bit of a bummer that it doesn’t also provide the opportunity to optionally use the common/accepted way. Anyway, just my 2c.

Every piece of software which uses text uses TAB in the correct way. Nano (Linux command line editor), virtually all coding/scripting editors, and so on, they all use TAb in the correct way. Only LO Writer doesn’t.

@ptbarnum: never had that happen when I still worked with MS Word, which is long ago. The tab key is inherited from the old typewriters, and hitting Tab would move the insertion point /the carriage to the next tab position. That is exactly what pressing the Tab key does in Writer (and in the versions of Word that I have used). There is no “correct way” to use any key. The developers od some software define key bindings for certain actions, and as long as the description of the effect of using key bindings matches the implementation of the key bindings in the software, it is correct.

Increasing or decreasing indent by pressing Tab or Shift+Tab is direct formatting, and direct formatting is frowned on by regular users of LibreOffice and Apache OpenOffice. Define indentation in styles and you will have much less trouble handling your formatting.

There is no “correct way” to use any key. The developers od some software define key bindings for certain actions,

I understand your point, but I don’t entirely agree. On one hand, developers of a given software are, of course, entitled to implement things in any way they see fit. On the other hand, there are some basic norms. When literally every text editor you’ve ever used behaves one way, and one single software behaves an entirely different way, it’s understandable that it would be perceived as “incorrect.” At the very least, it seems logical that the one outlier might provide an option, so those who prefer it to behave similarly to all other editors can maintain that broad coherence - while still allowing users familiar with its different/unique way to continue as they are familiar. Personally, I’m using WPS Office solely because of this issue. It’s much easier to just have the same method for formatting used across every single editor I use.

direct formatting is frowned on by regular users of LibreOffice and Apache OpenOffice

Whether some users “frown on” the approach used by others, if it works well for them, who are they to say “our way is the right way?” I certainly don’t presume to say LO must match all other editors - but it does seem a bit odd that there isn’t even the option to make it behave in a way that, clearly, millions and millions of users are more familiar.

Define indentation in styles and you will have much less trouble handling your formatting.

I have never had any trouble whatsoever handling my formatting by using a keypress to indent/un-indent a paragraph.

What is indent? It is a change in the left “margin” of a paragraph. How much should it be incremented? It depends on every user. Then every user should be capable of customising it.

Writer is based on very rigorous definition of styles. Therefore, your indent behaviour must be compatible with styles. Remember that a style is a semantic markup of your text. It is not a formatting directive. Formatting is a (very versatile and powerful) by-product of style. Styling is the way by which an author confers its perception of significance to text.

A change of indent corresponds to a change of meaning. Another style is the right way. This style can be associated with a shortcut.

Direct formatting marks up independent anonymous semantic bits. Being anonymous, they can’t be controlled centrally. They completely distort author’s intent.

Efficient use of Writer requires accepting its founding principles.

Efficient use of Writer requires accepting its founding principles.

Every other text editor & code editor lets you indent or un-indent full paragraphs by using Tab or Shift+Tab. It’s as simple as that. You may think there’s a better way to do it, and that’s fine, you’re entitled to that opinion. But from a usability standpoint, you’re never going to convince me that it makes sense to have one software behave differently than literally every other text & code editor on every OS I’ve ever used. I go back & forth between Google Docs, VS Code, KWrite, & MSO frequently. All let you indent+un-indent this way. Only LO does not, which makes it cumbersome to switch back & forth.

You repeat all you want that LO’s way is right and every other application in existence is wrong, but even if that’s the case, norms matter, user experience matters, & your desired user experience is not the same as everyone’s, and it’s not what the vast majority of PC users are used to.

When you go to UK, do you insist on driving on the right side of the road because the vast majority of other countries drive right?

Text editors don’t indent with Tab. They insert the Tab. You indent only if you press Tab when full lines are selected and this is only a shortcut to insert Tabs into the selection. Formally there is no notion of “indent” in a text editor.

I don’t say that Writer way of doing things is superior to other ways. I only say it is different. Either you accept this difference as a challenge or you avoid it completely and keep on with your present apps.

When you’re used to nails and switch to screws, do you use your hammer to drive screws because this is the tool you always used and don’t want to learn screwdriver?

Note this is my last comment. Everybody is entitles his/her own opinions and apparently we can’t meet.

When you go to UK, do you insist on driving on the right side of the road because the vast majority of other countries drive right?

This is not a valid analogy. When you live day to day in the UK, you only drive in the UK. When you work on a computer day to day, you use many different applications, often from minute to minute. A better analogy would be i.e. “when you’re in a given country, do you insist on all the streets driving on the same side as all the others?” Obviously, yes. It would make no sense for one street to be right-sided, and then a random street in the midst of all the others to be left-sided.

Text editors don’t indent with Tab. They insert the Tab. You indent only if you press Tab when full lines are selected and this is only a shortcut to insert Tabs into the selection.

False. Try kwrite.

When you’re used to nails and switch to screws, do you use your hammer to drive screws because this is the tool you always used and don’t want to learn screwdriver?

Again, not even a remotely applicable analogy. If you want to talk about screws & nails, a more relevant analogy would be i.e. mounting a frame by using nails on 3 sides, and screws on just the 4th side. It’s inconsistent. Either you use screws all the way or nails all the way. All apps behave one way, so switching back to one app that doesn’t behave like all the others is a needless hassle, in my opinion & clearly the opinion of others.

I don’t say that Writer way of doing things is superior to other ways. I only say it is different.

I also didn’t state that my way is superior - I stated multiple times that each user should be entitled to their preference. I only suggested that LO could support the current way (aka your way), in addition to the standard way, as an option. Your response: no, it’s this way or nothing

File an enhancement request. That’s the only way to get that implemented. No amount of whining here will have that effect. Please read https://wiki.documentfoundation.org/Ask/Getting_Started for how this board works.

All those were valid analogies. LibreOffice is built around styles, and it is designed that way because it is believed that other similar applications do it wrong, they emphasize direct formatting, and that made billions of word processors users to generate trillions of “documents” that lack any structure, leading to uncountable person-hours wasted later to reformatting, restructuring, etc - all that without even understanding by those billions of users that they waste time. They believe they are “efficient” when they create the documents, and the following work is perceived “normal” - because they don’t know there could be an alternative.

LibreOffice tries to make it easy to work with styles, and any of its direct formatting tools must not make it easy to break working with styles. Making Tab do DF would directly contradict the paradigm.

For any software, it is perfectly reasonable to follow well-established practices in the area - as long as this does not contradict its core ideas. And LibreOffice does its job there, trying to not introduce unneeded obstacles to users coming from other softwares - but this is exactly the case where adopting other softwares’ behavior would be destructive to the core ideas of the program: the central thing that is believed in LO to be the most important when working with documents. Hence this difference; and you happen to insist on “your idea is wrong, since every software does it the other way” - which could be extended to “every software must do every bit identically”, since for any bit, you would find that most do it some way, and only few do it differently, according to their vision.

Implementing this behavior would mean that any user, including those using the main intended workflow (styles), must be mindful to not introduce direct formatting inadvertently, when they use the button that inserts the perfectly normal character -Tab. Well - everywhere, except some special cases, that some other softwares decided worth that exception - because those other softwares don’t emphasize styles over DF, and so of course LibreOffice should make its style-using users suffer.

Every feature in LO must be designed to not make its main intended workflow more difficult.

@anon87010807: So you close it saying it’s too argumentative, but then stick your own condescending & obnoxious last word. Real nice.

It’s not “whining.” It was initially a question, to which he keeps explaining why it’s wrong to prefer any other way. When a point is made, I respond. That’s how discussions work. Just because you happen to agree with his view doesn’t make my explanations of my view “whining.”

Anyway, I asked this a year ago & as mentioned, am using WPS now, which works properly. I merely responded because others did.

you happen to insist on “your idea is wrong, since every software does it the other way” - which could be extended to “every software must do every bit identically”,

Not sure how many times I need to keep saying this, as it seems no matter how many times I say it, it’s ignored. There’s absolutely nothing wrong with providing an alternative/better way of doing it. The issue is that there is no option, for those who prefer the common/standard way. If LO had a better way to do things, but you could simply enable the tab key to work the standard way, that would make everyone happy. Even if you think we’re shooting ourselves in the foot by preferring consistency across all platforms, it should be the user’s perogative how they choose to interact with their software.