Enter Key wont add line in between

Answered

Hi, 

 

Out of no where my enter key stopped working by how if you're at line 150 out of 180, by how you press enter it will create a new line in between,  i want to know how i can restore that to normal rather than any shift+enter or only being able to add new lines at the very end of the code file.

please and thank you!

0
7 comments

Check that you do not have Tools | Vim Emulator mode enabled.

0

I can't find this option and I don't have the IdeaVim plugin installed, but I am still having this issue.

0

you might of pressed the insert button. try pressing it

5

Thanks, I did try that, as well as seeing if any of ctrl, alt, meta, shift were stuck.

It seems to work most of the time, but yesterday I was trying to put a line break in a json file.  Specifically in a string value, which I know doesn't support line breaks.  I just wanted the line break temporarily.  I ended up pasting a line break (ctrl+alt+shift+v so it doesn't add \n).

0
A temp workaround can be right-clicking on that JSON file, and then selecting the "Override file type" to plain text. This will allow you to add new lines wherever you want.

You can revert the file type override from the same place.
1

it seems to depend on the specific JSON schema.  i can't add a newline in the middle of a package.json script but i can in firebase.json.

0

It's the same from my side. Here are the samples.

firebase.json:

```

"users": {   
"alovelace": {     
"name": "Ada Lovelace",     
"contacts": { "ghopper": true },   
},   
"ghopper": { ... },   
"eclarke": { ... } 
}}
```

package.json:

```
{
"name": "node-js-sample",
"version": "0.2.0",
"description": "A sample Node.js app using Express 4",
"main": "index.js",
"scripts": {
"start": "node index.js" },
"dependencies": {
"express": "^4.13.3" },
"engines": {
"node": "4.0.0" },
"repository": {
"type": "git",
"url": "https://github.com/myuser/mysample" },
"keywords": [
"node",
"heroku",
"express" ],
"author": "Mark Pundsack",
"contributors": [
"myuser (http://my.page.com)" ],
"license": "MIT"}
```

0

Please sign in to leave a comment.