//z 2012-4-26 16:42:21 PM IS2120@CSDN
Well it depends. Notepad++ has two distinct, independent answers to this:
If a line is too long only because of trailing whitespace, this may be removed using theEdit -> Trim Trailing Space command. Use this instead of the shipped macro with a similar name, as the latter is provided mostly for testing and demonstration purposes.
Word Wrap is toggled on or off using View -> Wrap. It takes place as you type, creating secondary lines when the current line wouldn't fit in the current window. If line numbers are displayed, a word-wrapped line continuation is designated by a period (".") in the line number column.
Word Wrap has been reported to noticeably slow down display updates when editing 20+ MB files. You may consider disabling it when processing such files.
Using Settings -> Preferences -> Editing -> Word wrap, you can control the appearance of spillover lines. Options are:
<Macro name="macro_1" Ctrl="yes" Alt="yes" Shift="no" Key="100"> <Action type="0" message="2464" wParam=new_indent lParam="0" sParam=""/> </Macro> |
new_indent is given in text columns. |
<Macro name="macro_2" Ctrl="yes" Alt="yes" Shift="no" Key="100"> <Action type="0" message="2268" wParam=new_mode lParam="0" sParam=""/> </Macro> |
new_mode is either:
|
<Macro name="macro_5" Ctrl="yes" Alt="yes" Shift="no" Key="100"> <Action type="0" message="2406" wParam=new_mode lParam="0" sParam=""/> </Macro> |
new_mode is either:
|
<Macro name="macro_3" Ctrl="yes" Alt="yes" Shift="no" Key="100"> <Action type="0" message="2460" wParam=new_mode lParam="0" sParam=""/> </Macro> |
new_mode is either:
|
<Macro name="macro_4" Ctrl="yes" Alt="yes" Shift="no" Key="100"> <Action type="0" message="2462" wParam=new_mode lParam="0" sParam=""/> </Macro> |
new_mode is either:
|
All the above macros above are bound to Ctrl+Alt+Numpad 4, but this can be changed effortlessly from the Shortcut mapper.
Note that the View -> Show Symbol -> Show wrap symbol toggle can be used to control whether Word Wrap symbols are displayed. This may be enough. Use the macros for finer appearance tuning.
The Settings -> Preferences -> Editing -> Vertical edge settings frame has:
In addition, the edge color is configured from Settings -> Styler Configurator -> Global Styles , Edge color.
//z 2012-4-26 16:42:21 PM IS2120@CSDN
While text won't wrap at a fixed width as you type, you can reformat existing text using the TextFX Edit plugin. To select a width, enter it somewhere and cut it to clipboard. If clipboard is empty, holds something that is not a number, or a number not between 8 and 2048, a value of 72 is assumed. Now select the text and use the Rewrap text to (Clipboard) or 72 command. Removing the wrapping is done using the Unwrap text command from the same TextFX Edit menu.
The Split line command (Ctrl+I) will split the current line, or the selected lines, at the right edge and at word boundaries if possible. While this is not wrapping, the effect is somehow similar. It is possible to devise a macro that splits the current line/block at a fixed position, but the position is measured in pixels, which makes it harder to define correctly.
//z 2012-4-26 16:42:21 PM IS2120@CSDN