3,279 questions
0
votes
1
answer
45
views
Why does dart format code with three tabs?
I've got the dart formatter running on my code, and for some reason it insists on the following formatting:
String get display => switch (type) {
ListType.star => 'Starred',
...
1
vote
1
answer
60
views
Indentation rules in a VSCode plugin
I'm writing a VSCode plugin to handle a certain scripting language.
This is the "language-configuration.json" file:
{
"comments": {
"lineComment": {
"...
1
vote
0
answers
64
views
VSCode multiline pasting in integrated terminal powershell
when I try to paste anything multiline with tabs it gets mangled in the VSCode integrated terminal while it works fine if I use an external powershell, for example:
/game/systems/deterministic_rng.lua
...
2
votes
1
answer
119
views
How can I get CLion not to indent the case lines within a switch statement?
I'm using CLion to work on some C++ project. When I write case statements, CLion always indents my case lines, like so:
switch(foo) {
case bar_1:
do_stuff(); break;
case bar_2:
...
0
votes
0
answers
75
views
Custom programming language offside rule implementation using Flex/Bison
I am developing a compiler for a custom programming language. The initial parsing is done using Flex and Bison tools. The language supports statement blocks that are implemented in two different ways. ...
-4
votes
1
answer
125
views
Configure Dart indentation in VS Code [closed]
I’m using VS Code to code in Dart (for Flutter).
The default indentation is 2 spaces, but I want tabs instead of spaces.
I’ve set tabs (with tab size 4) in several places, but without success.
https://...
0
votes
0
answers
54
views
How to get astyle to wrap methods in Java-code?
I have max-code-length=80 set in my ~/.astylerc, along with indent=tab=4 but running astyle on the Java-code leaves some rather long method-declarations unwrapped.
How would I get the
private ...
1
vote
0
answers
190
views
Neovim indentation
I have recently switched to Neovim from Sublime Text. I mostly make edits in my code using mouse in insert mode, as I don't have enough practice of keyboard.
When I press enter to move to new line, ...
0
votes
0
answers
105
views
VS Code does not correctly indent closing parenthesis in Go import() or func(){} statement
I'm using VS Code on Nobara Linux (a Fedora-based distro) and working with the Go programming language.
When I type the following and press Enter after import(: import(⏎)
The result I get is:
import(
)...
1
vote
1
answer
88
views
LISP macro indentation for sub-expressions?
I'm using Emacs, and I have a macro that's like a switch for regexes, and runs an expression with variables bound to match results.
The indentation isn't what I'd like but I can't find if there's a ...
2
votes
1
answer
104
views
Block auto indentation in VS Code
In C++, I always align parameters on the open bracket (using clang-format). When I press the Enter key after that, the cursor always jumps to align with the indentation of the previous line by 4 ...
1
vote
2
answers
84
views
VSCode wrong indentation on multiline Powershell code
Problem
VSCode applyes wrong indentation to Powershell code that is multiline, so the inline code doesn't follow the indentation hierarchy he's in, but instead goes all the way to the left as shown in ...
0
votes
0
answers
80
views
Multi level paragraph indentation via VBA is not working
I have a paragraph, which is stored in a string. This string needs to be formatted as like below via VBA code and there by it is inserted in the document. Now I am stuck at the formatting stage, and ...
1
vote
1
answer
139
views
How do I parse ambiguous indented blocks like this using pyparsing?
I'm trying to parse data in the following format:
data = """\
map=1
sub=1
int=99
foo=bar
sub=2
foo=bar
int=99
bar=qux
"""
I based my grammar on ...
3
votes
2
answers
201
views
Shift+enter inserts extra indents
I have a Python source file with some dummy code:
a = 3
if a == 1:
print("a = 1")
elif a == 2:
print("a = 2")
else:
print("Other")
When I submit the code to ...