Questions tagged [tabs]

Questions about the inserting/manipulating/displaying TAB characters in Emacs files. Do not use this tag for questions related to browser style "tabs".

Filter by
Sorted by
Tagged with
1
vote
0answers
54 views

Python indent alignment for the inner if condition

I am using tab for indent alignment, I believe its a built-in emacs behavior in python-mode. In most cases if cursor is at the beginning of the line and when I press TAB, first** cursor jumps to first ...
0
votes
0answers
11 views

Lock tab. Not change content of tab until unlock it

Linux Mint 21, Emacs 27.2 Suppose I create new tab (M-x tab-new) in folder Temp. The title of tab is Temp Here result: Nice. But if I open another folder (myFolder) then title of tab is change to ...
1
vote
2answers
32 views

`dtrt-indent-mode` erroneously uses Tab characters

Here is an example file (/tmp/asdf.sh), for which I want dtrt-indent-mode to do the right thing. #! /usr/bin/env bash function asdf() { printf "asASDFASDF" echo "1234" } ...
0
votes
1answer
35 views

Tex indentation with TAB

Recently, when editing files in LaTex, upon pressing TAB, I get a huge indentation. Instead, the default behavior used to be to align with respect to previous environment definition. : I start with ...
0
votes
0answers
45 views

Not work C-t (tab-new) in the dired mode

Linux Mint 20, Emacs 27.2 Here my keybinding ;; You can run the command ‘tab-new’ with C-x t 2 (global-set-key (kbd "C-t") 'tab-new) (global-set-key (kbd "C-<tab>") 'tab-next)...
0
votes
1answer
29 views

How to stop Emacs from highlighting Linux Tab characters?

So I opened a c++ script made in Xubuntu and every tab character was highlighted with grey. That doesn't happen when I open scripts made on Windows. How do I stop Emacs from highlighting them, it's ...
0
votes
1answer
26 views

How to match emacs column count to gofmt column count?

I am writing Go code but the error messages do not agree with Emacs' column count. Is there an off-the-shelf solution for this? I'm wondering about a minor mode or even a few lines for my .emacs file....
1
vote
1answer
72 views

I am writing Fortran code in emacs but the tab key behaviour changes in F90 mode. Can I change it back?

On loading a f90 file, emacs changes to F90 mode, which changes some emacs behaviours. When I press <tab> emacs inserts two spaces at the left margin. Now when I use the backspace key it deletes ...
0
votes
0answers
30 views

Why is a TAB character added when using kill-rectangle and yank-rectangle to insert multiple rows into an org-mode table?

I noticed an annoying behaviour when copying multiple rows (a list) from a web page into an org-mode table, following a process inspired by Is it possible to copy /paste multiple lines of text into ...
0
votes
3answers
137 views

elpy (and evil-mode) do not react on TAB

This is my elpy-config 1Elpy Configuration 2 ...
0
votes
2answers
170 views

How to set js-mode indent in Emacs >= 27.1

I have my tab width set to two spaces and this has worked fine for many years. I have just upgraded to Emacs 27.1, and now js-mode is displaying tabs as three spaces wide, ignoring my preferred ...
1
vote
1answer
34 views

Emacs converting spaces to tabs when using X11 primary selection in a terminal window

When I use emacs in a terminal window on linux, I am often getting spaces unexpectedly converted to tabs when I cut and paste using the X11 primary selection. What reproduces the problem for me is the ...
1
vote
2answers
88 views

How to NOT Auto Indent when a specific Character is inputted?

So I recently encountered a problem programming in C that whenever I enter the left parenthesis character, (, Emacs auto-idents the code. [4 spaces here]DATA *SeqQueueOut( I know that there is this ...
0
votes
0answers
42 views

Make tabs be visually 4 spaces long but 1 column only

I indent my code with tabs and I want my tabs to be visually 4 spaces long but to be 1 column only. Currently with my configurations my tabs are 4 spaces long but also 4 columns long and I can't find ...
2
votes
1answer
88 views

How do I stop tab from being electric in Text mode?

When editing a plain-text document in Text mode when I press tab emacs inserts spaces until the cursor appears directly beneath the beginning of a word it finds in the line above. I don't want it to ...
0
votes
0answers
32 views

emacs sometimes inserts tabs at weird places

Sometimes when I am typing in emacs, I type a space and emacs actually inserts a tab instead of the space. For example, while typing "Four score and seven years ago" emacs actually inserts ...
0
votes
0answers
555 views

Make tabs behavior like in other IDEs

How can I force Emacs to use tab button and TAB character in "normal stupid way"[1], like in nano or VScode or JetBrain's IDEs. All I can find is smart-tabs package and indent-tabs-mode, but ...
0
votes
2answers
180 views

How do I disable Centaur Tabs in ispell Choices buffer

I need to disable the Centaur-Tabs in the Choices buffer of ispell/flyspell. In Centaur Tab's site it says to add a hook, so I tried this: (add-hook 'ispell-choices-buffer 'centaur-tabs-local-mode) ...
0
votes
2answers
52 views

Set tabs instead of spaces when programming

I have been using Emacs for a while and it has been one of my favorite editors of all time, even more so than Vim. However, I've had a problem in regards to setting tabs and spaces. Whenever I try to ...
0
votes
0answers
16 views

TCL is adding different tab widths in the program

I am trying to rearrange the columns of below file input.txt, Contents of this file: Name Location Purpose --------------------------------------------- Andy US Business1 ...
3
votes
0answers
67 views

Markdown equivalent of `org-indent-mode`?

What's the simplest way of ensuring that the text below a headline in a Markdown file is aligned with the headline? In org-mode you can accomplish this by calling org-indent-mode. Is there a similar ...
0
votes
1answer
164 views

Missing tabs on Emacs

I have been using Emacs for one week, so all of it is really new for me. I saw that there are two types of commands in order to navigate in emacs : - Some "tabs" on the top - Commands like shortcuts ...
0
votes
0answers
62 views

Tabs on windows with custom buffers

I am new to Emacs and I am trying to set up a decent workflow for projects I already have. What I want to do is to be able to have tabs of buffers on each window (not frame). What I want ...
2
votes
1answer
691 views

How to change shell-script-mode indentation not to use tabs?

To reproduce my issue, open your .bashrc or a .sh file and type the following: if while echo The if has no indentation. Good. The while has the default four spaces of indentation. Good. ...
1
vote
1answer
53 views

Dual-language text mode using the original interpretation of tabs

Does there exist an Emacs mode that replaces the contemporary interpretation of tabs (move to 8, 16, 24, .. or a multiple of some constant) with their original typewriter interpretation (set stops at ...
1
vote
1answer
200 views

Previous indentation is discarded on newline

Let's say I have the following code: void foo(){ ~ } I have marked point with ~. When I press enter the electric indentation works as normal but it doesn't keep the indentation for the previous ...
1
vote
0answers
842 views

How can I make Emacs enter a TAB character when I press the TAB button, without modifying my config file?

I am looking for a command I can enter that will make the TAB key input an actual TAB character. I'm open to anything that is temporary or that will not stomp on TAB mappings that do things other ...
0
votes
2answers
535 views

CC mode: make Tab just insert one tab or complete, no auto-indenting

I am dissatisfied with current behaviour of Emacs in CC Mode. I'm not sure if this applies to other major modes, but that's one I'm currently struggling with. Here are my problems: When I press tab, ...
2
votes
1answer
324 views

How can I configure the tab width for TCL files

I set all tab-width parameters and indent parameters to 2, but Emacs always uses 8 for the tab space when I press the TAB key at the beginning of a line, if i opened one bracket. How can i set the ...
0
votes
1answer
133 views

Make `tab` key insert 5 space characters in Latex Mode

In Latex mode, the tab key runs the command indent-for-tab-command From the output of C-h k tab when in Latex mode I rarely need to indent lines in my Latex files, and so I want to disable this ...
1
vote
2answers
246 views

Convert tabs to spaces when copying text to external applications

I use tabs in C/C++ but want to convert those tabs to spaces when copying code that I'm going to paste into an external program. However, I want the original code to retain tabs. Additionally (if ...
1
vote
2answers
2k views

Confusion about space and tab characters in Emacs

I am confused by space (SPC) and TAB characters in Emacs. I am often using the default fundamental mode. When I select a region and indent the lines in the region by C-u 9 C-x TAB, I intend to ...
0
votes
2answers
132 views

How to configure C-M-q and TAB key to expand pre-existing TAB characters into spaces in C/C++ files

In C and C++ files, I want to configure the mode so that any time I request indentation, that it will always expand all of the embedded TAB characters in indentation (at the start of the line, and no ...
2
votes
2answers
138 views

Does typing TAB key provide a fixed length blank?

In Fundamental mode, I type a tab following typing each number, but it seems the separator between the numbers are not the same length. I was wondering why? 1 22 333 444
0
votes
1answer
142 views

How to reveal tabs in the indentation in a cpp file?

My friend and I collaborate on a C++ project and we agree to use 4 whiltespaces for indentation. I am using Emacs and this is my indentation setting (setq-default c-basic-offset 4) By doing this, I ...
2
votes
1answer
145 views

How do I keep the cursor from going to the beginning of the line when there's no text on said line?

I want the cursor to stay in the same column whilst moving up and down on tabbed lines. But instead the cursor goes to the beginning of the line if there's no text on that line. How do I get rid of ...
4
votes
1answer
1k views

Org external link - can I indicate which browser/tab to be used

Suppose I have several browsers running at any given time. Google Chrome Google Chrome Canary Chromium Opera Safari How can I indicate in my org mode links [[https://www.gnu.org/software/emacs/][...
2
votes
2answers
200 views

Accessing the character in the line below

I am writing an Emacs Lisp function which needs to know the character directly under point in the line below, returning nil when no such character exists. I thus defined the function char-below, which ...
2
votes
1answer
741 views

org-mode setting to preserve spacing in SRC code, with verbatim latex output to pdf

Like this post, when I indent within a SRC code block in org-mode, 8 consecutive spaces are converted to a tab. Moreover, when I export to LaTeX 8 consecutive spaces are converted to tabs in the ...
1
vote
1answer
515 views

Making AUCTeX use tabs for leading indentation doesn't work

This answer says how to make AUCTeX use tabs for leading indentation. However, it doesn't work for me and I don't understand why it doesn't. After adding the code to my init file, LaTeX-mode just ...
3
votes
2answers
849 views

css-mode: use tabs and not spaces

How do I make it so tabs are used instead of spaces when TAB is pressed? I've tried setting indent-tabs-mode to t but no dice. On my other modes, such as php-mode and c-mode, tabs are inserted. CSS ...
1
vote
1answer
2k views

How can you make conf-mode indent with tabs?

When I open a config file that has been indented with tabs, the mode shows as (Conf[Space] WS) and pressing Tab indents with spaces, even though the rest of the file is using tabs. How can I change ...
6
votes
0answers
803 views

Display tab characters as arrows of varying length

I would like to make tab characters ("\t") display as arrows of varying length, just like in editors such as Notepad++, gedit, Geany, etc. Here is an example with tab width set to 4 and space ...
1
vote
1answer
3k views

How to detect tabs or spaces in Emacs

By default I want all indentation (when I hit the tab key) to be 2 spaces. However, when I am editing certain Python files (where I can not mix tabs and spaces) I would like to use whatever the ...
2
votes
1answer
6k views

Python mode indentation

Working on .py files, I know how to get emacs to use 4 spaces as an indent by default. I also know how to get it to use the tab character by default. I'd like to leave it at using spaces by default, ...
0
votes
1answer
61 views

How to account for tabs in `hl-line-range-function`?

To avoid conflicts with highlighting indentation, I made the highlight line begin after the current indentation. This works well, except when tabs are used as leading white space. How could the my-...
1
vote
1answer
707 views

How to indent the selected line one “tab” forward or backward [duplicate]

In a lot of text editors there is a keystroke used to move the selected lines one "tab" to the right, usually 4 whitespace or one "tab" to the left. How can I do this in emacs? I have only found ...
0
votes
2answers
105 views

Tab key getting bounded to forward-button

Launching emacs with the -Q option (default settings) shows TAB being correctly bound to indent-for-tab-command. If I launch emacs without the -Q, TAB is always being bound to forward-button which is ...
0
votes
1answer
175 views

Smart Tab : indenting with C-u <tab> does not work (beginning of a line)

(I haven't find any answer in previous topics) I am using Smart Tab globally, i.e. I have put the following code in my .emacs : (require 'smart-tab) (global-smart-tab-mode 1) I am writing a program ...
0
votes
1answer
194 views

modify tab length for eclim-java-format

So I'm trying to use eclim with spacemacs and I have this function called eclim-java-format which reformat the text as in eclipse. The problems is that it reformats tabs as tabs and not as space and ...