How can I enable word wrapping in PhpStorm?
I need to enable it only for some of my files (with extension .txt). Is it possible?
asked Apr 27, 2012 at 13:33
2
For all files (default setting for opened files): Settings/Preferences → Editor → General → Use soft wraps in editor. You can now specify file names/extensions where this option will be enabled by default:
For the currently opened file in the editor: menu → View → Active Editor → Use Soft Wraps (Note: I’ve assigned custom Ctrl + Alt + R + shortcut for that)
For quite a while (since v2016 or so) you can also access this option via the context menu for the editor gutter area (the area with line numbers on the left side of the editor):
(Note: I have customised this menu quite a bit; by default it has much less items here)
Search Everywhere (Shift 2x times) or menu Help → Find Action… (Ctrl + Shift + A on Windows using the Default keymap) can also be used to quickly change this option (instead of going into Settings/Preferences).
answered Apr 27, 2012 at 14:05
LazyOneLazyOne
157k44 gold badges380 silver badges386 bronze badges
9
You have to enable Soft Wraps. Find that option through this path.
Menu View → Active Editor → Use Soft Wraps
answered Oct 5, 2015 at 19:45
JGallardoJGallardo
11k8 gold badges81 silver badges96 bronze badges
Right click on the line number area and choose:
Soft-Wrap All Files or Soft-Wrap Current File, i.e.:
answered May 1, 2017 at 18:41
Pedro LobitoPedro Lobito
92.1k30 gold badges246 silver badges265 bronze badges
-
Menu File → Settings → Editor → Use soft wraps in editor: to turn them on for all files by default.
-
Menu File → Settings → Code Style → General → Wrap when typing reaches right margin
.. but that’s different (it will make new line).
answered Oct 25, 2012 at 15:01
Hueston RidoHueston Rido
8091 gold badge11 silver badges16 bronze badges
2
In addition to Settings -> Editor -> Use soft wraps in editor I recommend Use soft wraps in console and Use custom soft wraps indent with a setting of 4 to make the wraps indented to match the line they started on.
answered Aug 22, 2013 at 14:30
In PhpStorm 2019.1.3, it is possible to enable soft wrap for some file types only.
answered Jul 16, 2019 at 12:30
SithuSithu
4,7049 gold badges64 silver badges109 bronze badges
0
In PhpStorm 2019.1.3, you should add the file type you want to make soft wrapping on.
Go to Settings → Editor → General → Soft-wrap files, and then add any types you want:
answered Aug 28, 2019 at 9:47
1
You may also want to consider the Wrap to Column plugin, which implements the equivalent to Alt + Q in Emacs and gq in Vim. This may be preferable to having very long lines that are wrapped by the editor.
This plugin can be installed from any IntelliJ IDEA-based IDE by searching for Wrap to Column.
It has the additional benefit that you can choose to wrap only sections of text that you want
answered Jan 6, 2015 at 20:02
Andrew MaoAndrew Mao
35.4k23 gold badges142 silver badges223 bronze badges
If using PhpStorm 2019 and higher
Menu File → Settings → Editor → General.
There is the ‘Soft-wrap files’ input under the ‘Soft Wraps’ Header.
*.md; *.txt; *.rst; .adoc;
Add the file types to this field in which files you want them to be used.
*.md; *.txt; .rst; .adoc;.php;.js
answered Oct 8, 2019 at 11:57
WebStorm 10.0.4
For wrapping text/code line by default, but for all types of file:
menu File → Settings → Editor → General → section «Soft Wraps» → checkbox «Use soft wraps in editor».
answered Aug 10, 2015 at 3:19
1
For word wrapping in PhpStorm 2019.1.3, just follow below steps:
From the top navigation menu:
View → Active Editor → Soft-Wrap
That’s it so simple.
answered Aug 19, 2019 at 17:05
1
I want to soft-wrap .php files. Putting that in the allowed list still was not working. (For a screenshot, see Mohammed Zayan’s answer.)
I entered *.*
there, allowing all the files (I am fine with that) and soft wrap worked fine.
answered Mar 8, 2021 at 15:53
For word wrapping in PhpStorm:
- Select File from the menu
- From File select Setting
- From Setting, select Editor
- Select General from Editor
- In general, checked Use soft wraps in editor from the Soft wraps section
answered Mar 10, 2018 at 5:50
1
Mouse Control
Change font size with Ctrl/Command+Mouse Wheel
Enable this option to be able to change font size in the editor by rolling the mouse wheel while holding the Ctrl key.
-
Select Active editor to change font size only in the current editor tab. If you close and reopen the document, the font size will be reset to the default font or to the color scheme font according to your settings.
-
Select All editors to change font size in all editor tabs. When you change the font size this way, the new font size is saved in the current color scheme and will apply to all open documents as well as to the newly opened ones. If necessary, you can change it on the Editor | Color Scheme | Color Scheme Font page of the IDE settings Ctrl+Alt+S.
This checkbox also allows you to change font size in Quick Documentation popup.
Move code fragments with drag-and-drop
If this checkbox is selected, you can drag-and-drop code fragments in the editor.
Soft Wraps
Soft-wrap these files
Use this field to apply soft wraps to specific file types (For example, it might be helpful when you are writing documentation in markdown files). Enter file extensions separating them with semicolon.
You can also enable or disable soft wraps right in the editor:
-
Right-click the left gutter and from the context menu, either select or clear the Soft-Wrap Current Editor option. Keep in mind that these settings affect only the current editor, not a file.
-
To quickly access the settings, select Configure Soft Wraps from the list of options.
Use the original line’s indent for wrapped fragments
Select this checkbox to use custom indentation for soft wraps on resizing the editor or console. Use the Add additional indent field to specify the indent number.
Only show soft-wrap indicators for the current line
If this checkbox is selected, the soft wrap characters will be shown in the active logical line only.
Otherwise, soft wraps characters will be shown at the end of each line, and at the beginning of each next line.
Virtual Space
Allow caret placement
-
After the end of line: if this checkbox is selected, you will be able to set your caret anywhere after the last character in any line. As soon as you start typing at a position beyond the end of the line, the necessary number of spaces will be added between the end of the line and the beginning of your input.
-
Inside tabs: select this checkbox to allow placing the caret inside tab characters. The reason is that each tab character shows in the editor as a set of ‘virtual’ space characters.
Show virtual space at the bottom of the file
If this checkbox is selected, the currently edited line (even if it is the final line) can be scrolled to the top of the screen. PhpStorm adds the necessary amount of virtual lines.
Caret Movement
When moving by words
Use this list to configure where the caret should stop when moved by words. You can select from the following options:
-
Jump to current word boundaries: this is the default option. When you move the caret forward (Ctrl+Right), PhpStorm places it to the end of the current word.
When you move the caret to the previous word (Ctrl+Left), PhpStorm places the caret at the beginning of the current word.
-
Always jump to word start: when you select this option, the caret always moves to the beginning of the word.
-
Always jump to word end: when you select this option, the caret always moves to the end of the word.
-
Jump to next/previous word boundaries: when you select this option, the caret moves forward to the start of the next word, and when moved backwards, the caret jumps to the end of the previous word.
-
Stop at both word boundaries: when you select this option, the caret stops at both the start and the end of each word.
Upon line break
Use this list to configure where the caret should stop on line breaks. You can select from the following options:
-
Jump to next/previous line boundaries: when you select this option, the caret moves forward to the beginning of the next line, and when moved backwards, the caret jumps to the end of the previous line.
-
Ignore line breaks: when you select this option, PhpStorm ignores the line breaks, and the caret moves according to the configuration specified in the Moving by words list.
-
Stop at both line boundaries: when you select this option, the caret stops at both the start and the end of each line.
-
Jump to current line boundaries: when you select this option, the caret always jumps to the end of the current line (when moved forward) or to the beginning of the current line (when moved backwards).
Check the following example when you have Always jump to word start specified in the Moving by words list and Jump to current line boundaries specified in the Upon line break list:
-
Always jump to line start: when you select this option, the caret always moves to the start of a line.
-
Always jump to line end: when you select this option, the caret always moves to the end of a line.
Scrolling
Enable smooth scrolling
If this option is enabled, the editor scrolls the page when you navigate to an element, instead of just jumping to the target location.
Caret behavior
-
Keep the caret in place, scroll editor canvas: select this option to choose scrolling editor canvas and keeping the caret at place.
This can be helpful in course of debugging session. As you step through the lines of code, the editor canvas scrolls, while the line at caret is always in the center of the screen.
-
Move caret, minimize editor scrolling: click this option to choose moving the caret.
When you step through the lines of code during the debugging session, the caret moves down, and the editor canvas doesn’t scroll until the caret line reaches the bottom of the screen.
Rich-Text Copy
Copy (Ctrl+C) as rich text
Select this checkbox to copy a rich text from the editor to any other editor that recognizes RTF. Otherwise, the IDE copies a plain text.
Color scheme for copied fragment
Use this list to select a color scheme for the text copy. You can select from the following options:
-
IntelliJ Light
-
Active scheme
-
Darcula
-
Classic Light
-
High contrast
On Save
Remove trailing spaces on
Select the mode in which PhpStorm will handle trailing spaces at the end of lines on file saving:
-
Modified lines: strips trailing spaces only in the end of modified lines.
-
All lines: strips trailing spaces in all lines.
Keep trailing spaces on caret line
If this option is unselected, trailing spaces will be stripped on the line where the caret is placed on save operation.
Remove trailing blank lines at the end of saved files
If this checkbox is unselected, PhpStorm will keep the trailing blank lines on saving files.
Ensure every saved file ends with a line break
Select this checkbox to have PhpStorm automatically add an empty line in the end of a file during the save procedure.
Где в phpstorm устанавливается перенос строк по умолчанию?
Каждый раз при открытии проекта в каждом документе делать это отдельно очень напрягает.
Ответы (6 шт):
Ctrl + Alt + S → Editor → Code Style → …
Выбираете язык, и там можете настраивать любые отступы.
→ Ссылка
Автор решения: Кирилл
Отвечу уже не для автора, а для тех, кто гуглит этот вопрос. По умолчанию для всех файлов ставим так:
-
Идем в File > Settings > Editor > General. Ставим галочку
Use Soft wraps in Editor
-
Если что-то все равно вылазит, то идем File > Settings > Editor > Code Style > PHP. Находим вкладку
Wrapping and Braces
и выставляем вездеWrap if long
-
Можно еще перейти на вкладку Php doc и поставить галочку на
Wrap long lines
. Я эффекта пока не прочувствовал, но вдруг.
→ Ссылка
Автор решения: Дмитрий Шигаев
В версии 2019.1.2 нужно зайти file > settings > editor > general в разделе Soft Wraps отметить галочку напротив Soft-wrap files и написать расширение того файла с которым работаете пример: *.md; *.txt; *.rst; *.adoc; *php; *html
→ Ссылка
How can I enable word wrapping in PhpStorm?
I need to enable it only for some of my files (with extension .txt). Is it possible?
Answer
For all files (default setting for opened files): Settings/Preferences → Editor → General → Use soft wraps in editor. You can now specify file names/extensions where this option will be enabled by default:
For the currently opened file in the editor: menu → View → Active Editor → Use Soft Wraps (Note: I’ve assigned custom Ctrl + Alt + R + shortcut for that)
For quite a while (since v2016 or so) you can also access this option via the context menu for the editor gutter area (the area with line numbers on the left side of the editor):
(Note: I have customised this menu quite a bit; by default it has much less items here)
Search Everywhere (Shift 2x times) or menu Help → Find Action… (Ctrl + Shift + A on Windows using the Default keymap) can also be used to quickly change this option (instead of going into Settings/Preferences).
Attribution
Source : Link , Question Author : Hast , Answer Author : Peter Mortensen
Открыть настройки File -> Settings…
открыть закладку Editor -> General
поставить галочку на Soft-wrap these files и добавить в поле напротив: ; *.php; *.css; *.js
Как я могу включить обертывание Word в phpstorm? Мне нужно включить его только для некоторых моих файлов (с расширением .формат txt.) Это возможно?
835
8
8 ответов:
для всех файлов (настройка по умолчанию для открытого файла):
Settings/Preferences | Editor | General | Use soft wraps in editor
для текущего открытого файла в Редакторе:
Menu | View | Active Editor | Use Soft Wraps
обновлен ответ, чтобы отразить новый путь к параметру, используемому в текущих версиях IDE.
вы должны включить мягкие обертывания. Найдите этот вариант через этот путь.
Вид > Активный Редактор > Использовать Мягкие Обертывания
File | Settings | Editor --> Use soft wraps in editor
: чтобы включить их для всех файлов по умолчанию.File | Settings | Code Style / General —> Wrap при вводе достигает правого поля
.. но это другое (это сделает новую линию).
кроме настройки ->редактор ->используйте мягкие обертывания в Редакторе рекомендую используйте мягкие обертывания в консоли и используйте пользовательские мягкие обертывания отступ параметр 4 чтобы сделать обертки отступом, чтобы соответствовать линии, с которой они начали.
Right click
в области номера строки и выберите:
Soft-Wrap All Files
илиSoft-Wrap Current File
, например:
вы также можете рассмотреть Wrap to Column плагин, который реализует эквивалентную
Alt-q
в Emacs иgq
в vim. Это может быть предпочтительнее, чем иметь очень длинные строки, которые завернуты редактором.этот плагин может быть установлен из любой IDE на основе идеи путем поиска
Wrap to Column
.он имеет дополнительное преимущество, что вы можете выбрать, чтобы обернуть только те разделы текста, которые вы хотите: -)
WebStorm 10.0.4
для обертывания текста / кодовой строки с помощью deafault,
но для всех типов файлов:
Файл — > Настройки — > редактор — > общие — > раздел «мягкие обертывания» — > флажок «Использовать мягкие обертывания в Редакторе»(имхо)
для переноса слов в PHP Storm
1. Выберите файл в меню
2. Из файла выберите параметр
3. Из Настройки выберите редактор
4. Выберите Общие в Редакторе
5. В общем проверено использование мягких обертываний в редакторе из раздела мягкие обертывания