Questions tagged [indent]

28 questions
16
votes
4 answers

How can I show vertical indentations markers with Emacs?

I'm looking for an Emacs package or configuration that makes it possible to mark indentations with vertical lines, like those shown in the following screenshot of Sublime Text:
8
votes
4 answers

Find and replace in Notepad++: How to insert above line with same amount of indents?

I need to replace, in a large number of Python files with many function definitions, all occurrences of def some_func(foo, bar): with @jit(parallel=True) def some_func(foo, bar): with whatever level of indentation def some_func(foo, bar)…
srhslvmn
  • 259
  • 2
  • 12
3
votes
1 answer

Tidy command that only fixes indent

I have a number of HTML files that contain snippets of HTML code (not full pages, so no body tags, etc). Unfortunately the HTML in those files is completely unindented. I'd like to run tidy to re-indent the file, but tidy tries to do a lot of other…
Herms
  • 9,992
2
votes
3 answers

Python auto indents when I copy/paste

I have tried to copy/paste my code into my code editor on my MAC. However, it auto indents everything. Is there a way to un-indent multiple lines at once?
user1740280
1
vote
2 answers

GNU indent: How to forbid inserting newlines before `,' in declaration of struct arrays?

See following example. I don't want the , char in a separate line. I go through all indent options but seems like no one is for this. $ indent -version GNU indent 2.2.9 $ cat foo.c void foo () { struct_a arr[] = { {&a, sizeof (a)}, {&b,…
su.root
  • 1,080
1
vote
2 answers

Vim indentation mapping: how to insert a line break that indents up the column I was at?

In Vim, I want to bind a key which will insert a newline and indent that newline up to the column where the cursor used to be. It's a little strange, so let me illustrate: Example: before and after, with the cursor at | Before: a = str "Hello…
Ein
  • 337
1
vote
1 answer

vim fortran indentexpr issue

Strange issue here with getting indentexpr=FortranGetFreeIndent() to be set correctly. The first time I open a file (free form, of course), say new.f90, :set gives :set --- Options --- autoindent filetype=fortran incsearch …
MarkWayne
  • 111
1
vote
1 answer

Disable indent selection by tab

When I select text in Visual Studio (C++ if it matters) and hit the tab key, instead of replacing the selected text with a tab, it instead indents the selected code. I really want to disable this "feature", as I have a different shortcut for doing…
1
vote
2 answers

Indent one level deeper rather than smart indent?

When in markdown-mode, I would like to disable smart indent. Instead, when I highlight a block of code and press TAB, I would like the block to be indented one level deeper, like how Sublime does it. What goes in my ~/.emacs to achieve this?
mcandre
  • 3,098
1
vote
1 answer

nnoremap with vnoremap

with vim, I use object indent. and frequently I use this vii:!sort for sort a block with same indent. I try set this nnoremap nn ss vii:!sort but don't work, any suggestion? ii is a vnoremap for object-indent, maybe this is the…
juanpablo
  • 7,424
1
vote
2 answers

Resizing the Ruler Sliders

Is there a way to resize the indent slider arrows in Word? I feel like half the time when I'm trying to either move the whole margin or try to only move the lower arrow, I have to try three or four times to grab (or not grab) the correct handle. It…
1
vote
1 answer

vscode: how to just format indent?

I want to use vscode to format my js code. But I just want it to format indent, not any other space in my statement. But I have not found any way to control this config. e.g.: If I have some code like this(where the colons is aligned but no…
1
vote
0 answers

Indentation in empty lines

I'm using the Brackets text editor. Is there a way to preserve indentation in empty lines? Before Indention After Indention lines 4 and 6 should have an indent guide too If I indent again (and again, and again...), lines 4 and 6 remain empty…
0
votes
0 answers

TextEdit indent with numbers

To indent a paragraph in TextEdit I found that I can go to Format > Text > Show Ruler and then drag the indent. The problem is that it is very difficult to give a exact number, for instance 1cm. Is there a better way to select only some specific…
Nrc
  • 139
0
votes
1 answer

Notepad++ to enter new line and not get indented hotkey?

Auto-indent in Notepad++ sometimes turns out to be very annoying - e.g. when we work with text/note file. Very often do I want to enter a new line and the cursor is NOT indented i.e. at the beginning of the line. Lovely to have it with Ctrl-Enter.…
Nam G VU
  • 12,548
1
2