Php Storm : How can i automate breaking lines in PHPStorm 2.1

后端 未结 9 1364
攒了一身酷
攒了一身酷 2020-12-15 16:10

How can i automate breaking lines (word wrap) in PHPStorm 2.1?

相关标签:
9条回答
  • 2020-12-15 16:27

    For wrapping text/code line by deafault: File -> Settings -> Editor -> General -> section "Soft Wraps" -> checkbox "Use soft wraps in editor"

    0 讨论(0)
  • 2020-12-15 16:29

    In Webstorm 2020.3 i did not found any option for all files by default, but just change the pattern:

    Settings> Editor> General> Soft Warps Soft-wrap theses files: you can change value to: *.* (in the other words "ANY file name" and "ANY extension file")

    0 讨论(0)
  • 2020-12-15 16:31

    Using phpstorm 2019.3.4 as well as new and older version :

    1. Use Ctrl + Alt + S to open the settings menu

    2. Select and click Editor

    3. Choose Code Style

    4. Change the default value of the Hard wrap value to 90

    5. Apply and save changes

    6. Press Ctrl + A to highlight and select all your codes in the text editor

    7. Press Ctrl + Alt + L to format your code nicely

    Or when using the default settings for Hard wrap at 180 , follow 6 and 7

    0 讨论(0)
  • 2020-12-15 16:34

    To make it automatic

    After applying this point:

    Use Ctrl + Alt + S to open the settings menu

    1. Select and click Editor

    2. Choose Code Style

    3. Change the default value of the Hard wrap value to 90

    4. Go back to CodeStyle and choose any of the language you work with to make specific changes

    5.1 I choose HTML and Select Other and i change the value of Hard wrap at 90 and wrap on typing to Yes

    5.2 I choose JavaScript and Select Wrapping and Braces and change the Hard wrap at value to 90 and wrap on typing to Yes

    1. Continue to do it with all other languages you work with

    NB: other languages may be at a default values, change it if is not preferable to you

    1. Apply and Ok to save the changes
    0 讨论(0)
  • 2020-12-15 16:38
    1. Open Settings
    2. Type "Use Soft Wraps" in search box
    3. In keymap tab right click on "Use Soft Wraps" and add a custom shortcut

    You will be able to toggle them with that shortcut

    0 讨论(0)
  • 2020-12-15 16:44

    in phpstorm 2016:

    Settings/Preferences | Editor | Code Style | General --> default option-> uncheck wrap on typing
    
    0 讨论(0)
提交回复
热议问题