0

On Notepad++, if I select the first character of a paragraph, and press the 'spacebar', the entire paragraph gets indented by a space. How should I configure it so that only the first character moves one character to the right?

E.g., if I hit spacebar at this cursor location:

enter image description here

I get something that looks like this:

enter image description here

Even though I want only the first word ("Start") to have a space in front of it.

thanks_in_advance
  • 418
  • 1
  • 7
  • 22

2 Answers2

2

Preferences > Editing > Line Wrap: Default works for me in version 7.5.9

  • I'd add "settings" as the first click, so it would be: Settings > Preferences > Editing > Line Wrap: Default What is weird, to me, about this problem, is that I never intended to change "Line Wrap" to "aligned" instead of "default" but that's the setting I found (thanks to you)!. All good now. – AngelSix Jan 08 '21 at 15:31
  • *"What is weird [to me] is that I never intended to change "Line Wrap" to "aligned" instead of "default" but that's the setting I found[.]"* - "Aligned" was/is the "default" setting, as far as I am aware. Again, Notepad++ wasn't really intended as a "word processor", so the "Default" word wrap behavior isn't likely to be automatically selected. – Anaksunaman Jan 09 '21 at 00:24
0

Updated Answer

Per the answer by Felipe G. Nievinski (below), with current versions of Notepad++ (e.g. v. 7.9.1 - November 2020 or v 7.9.2 - December 2020), you can change the Line Wrap settings under Settings → Preferences → Editing to Default to help correct this issue:

ex. Aligned (All Word wrap Lines Indented)

Aligned Line Wrap Settings - Screenshot

ex. Default (First Word wrap Line Indented)

Default Line Wrap Settings - Screenshot


Original Answer

The problem you are experiencing is likely due to word wrapping and extremely long sentences without line breaks (your "paragraphs").

To fix this behavior, select View → Word wrap and toggle it off (you can toggle the icon on the toolbar as well). You should be able to indent lines normally.

Assuming your paragraphs contain few or no line breaks, you may want to add these manually:

  • You can use Edit → Line Operations → Split Lines (CTRL+I) to split the lines (add line breaks) approximately where the word wraps would be (i.e. near the edge of the main window).

  • Per this SuperUser answer, you can use the following regex to insert newlines after approximately X number of characters (e.g. 80):

      Find:      (?<=.{80})\s
      Replace:   $0\n 
    
Anaksunaman
  • 16,718
  • 4
  • 38
  • 45
  • Thanks: I marked your answer correct though I didn't get the kind of "single space at the start of a paragraph" that I might get in "Microsoft Word." What I got from your answer was that Notepad++ is not really suited for "word processor" kind of formatting... Notepad++ is a text editor for coding purposes, and is optimized to help a coder read code... – thanks_in_advance Oct 10 '17 at 23:52
  • Honestly it really is. Sorry this didn't help as you expected. Thank you, regardless. – Anaksunaman Oct 11 '17 at 00:27
  • No -- that was really useful for me to realize. Thanks for your help. – thanks_in_advance Oct 11 '17 at 14:56
  • Felipe G. Nievinski nailed this one (infra), with his simple fix. Most people use Notepad++ as a quick and dirty word processor, not for reading code. It's also handy for stripping out formatting to create plain text. (I use "PureText" with a shortcut key for that, but this is too nerdy a solution for most people.) – AngelSix Jan 08 '21 at 15:37
  • *"Most people use Notepad++ as a quick and dirty word processor, not for reading code."* - Arguably, the intended purpose of Notepad++ is for *writing* code in a simple environment (i.e. not using a full-blown IDE). – Anaksunaman Jan 09 '21 at 00:18