Questions tagged [autoformat]

27 questions
8
votes
1 answer

Auto format javascript code in Android Studio

Android studio allows to auto format HTML code but not JavaScript. Is there anyway i can achieve such thing? I already looked for plugins and file types, but it seems like nothing really helped. what i have already tried: import CSS & JavaScript…
Nguyen Quoc Dat
  • 201
  • 3
  • 7
8
votes
2 answers

How to indent/autoformat HOCON in EMACS?

Haven't found a way to indent/autoformat HOCON config files. What is you way here?
Andrew Gaydenko
  • 267
  • 2
  • 11
3
votes
1 answer

JSON: Adding missing quotes and commas automatically in WebStorm

I get from a service json-like-data with several hundred different structures: { car112: { n: Audi type: A4 20 TDI ultra daylight sd: 01.07.2016 p: 34216 st: false } car113: { n: BMW …
user2227400
2
votes
1 answer

Eclipse Autoformat Parenthesis

I have a problem whenever I use the Scanner class in my java code: Say I type Scanner in = new Scanner(System.in) As soon as I press the semicolon, it becomes/autoformats to this: Scanner in = new Scanner(System.in; This is the only case where…
Jay Schauer
  • 477
  • 1
  • 5
  • 15
2
votes
1 answer

Android Studio AutoFormat Plugin

Is there any plugin to autoformat code like this? myObject.methodName = "foo"; myObject.longMethodName = "foo"; myObject.evenLongerMethodName = "foo"; myObject.theLongestMethodName1234 = "foo"; Equal sign in the same…
Lau
  • 1,804
  • 1
  • 23
  • 49
1
vote
1 answer

Forbid an alignment of consecutive comments in VSCode auto formating for C++

VSCode auto formatting in C++ programs produces this code by aligning consecutive comments: if (true) { // if begin // if inner part int x = 3; int a = 1; // some inner calculations } // if end …
Sergey Beloglazov
  • 342
  • 1
  • 3
  • 14
1
vote
1 answer

My VS Code doesn't respect PEP8 line limit on auto formatting

I already enabled autopep8 extension and It shows rendering on bottom of my VS Code when I save the file, but It doesn't respect the line wrap in PEP8 not matter how big It is. How can I enable word wrap? Here's my settings.json: { …
1
vote
2 answers

Auto format Indian currency number

I am using following code to display currency in Indian numbering system: