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

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

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

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

    Automatic wrap example aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa‌aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa :

    This expression has automatic wrap, because I did not press return.

    As I understand you want Soft Wraps, when long line is wrapped on screen into multiple lines, but still remains as single line in file.

    Soft Wraps

    on per file basis
    View | Active Editor | Use Soft Wraps

    for all files by default
    Settings/Preferences | Editor | General | Use soft wraps in editor

    Right margin setting

    There is also Settings/Preferences | Editor | Code Style | General --> Wrap when typing reaches right margin

    But that's different (it will make actual new line).

    UPDATE: In current builds IDE can use separate value for right margin per different "language" -- as long as that language has an entry in Code Style settings.


    Also keep in mind that any settings from .editorconfig files (if you have such files in your project and EditorConfig plugin is installed & enabled) will override the same from Code Style settings -- it's the nature of the plugin and not a bug (it meant to work this way).

    Using EditorConfig support you can configure certain settings that otherwise may not be possible to do via Code Style (e.g. settings for languages/file types that have no separate Code Style entry).

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

    In PhpStorm 2019.1.3 You should add file type you want to make soft wrapping on it

    go to Settings -> Editor -> General -> Soft-wrap files then add any types you want

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

    simple:

    cmd+F8

    You can find the list of shortcut by PhpStorm in menu Help -> Default Keymap Reference!

    0 讨论(0)
提交回复
热议问题