Huh, what do you mean? You should be prompted to save modified files on exit. And if you don’t want to have your currently opened files re-opened at next launch then go to Settings->Backup and uncheck “Remember current session for next launch”
In my opinion, Stephen, you didn’t understand, exactly, the use of the . matches new line option. By default, with the regex engine of N++, the special character dot. matches ANY character DIFFERENT from the 3 characters, below :
The New Line character, displayed as LF, = \n ( \x0a )
The Carriage Return character, displayed as CR, = \r ( \x0d )
The Form Feed character, displayed as FF, = \f ( \x0c )
So, when you CHECK the option . matches new line, then the dot matches, absolutely, ALL the characters of a file. This option allows the user to build multi-lines searches.
For instance, the regex 123.*789 with the .matches new line set, tries to match the longest string, from a first occurrence of 123 to the last occurrence of 789, in the current file, even though the string 789 is located some lines after the string 123 :-)
So, as you can see, this option has no relation, at all, with the search of spaces, anyway !
To achieve your S/R ( Multiple spaces -> ONE space ), that’s quite easy :
SEARCH = +, with TWO spaces before the + sign and REPLACE = ONE space
The search regex matches a single space, followed by a non null sequence of spaces. An other syntax would be :
SEARCH = \x20\x20+ and REPLACE = \x20 ( decimal number 32 = hexadecimal number 20 )
You could also use a look-behind to detect the first space :
SEARCH = (?<= ) +, with a space after the = sign and before the + sign and REPLACE = Nothing.
However, due to a bug of the regex engine, you must click on the Replace All button, ONLY. Don’t use the Replace button, for the S/R, just above.
You’ll find good documentation, about the new Boost C++ Regex library, v1.55.0 ( similar to the PERL Regular Common Expressions, v1.48.0 ), used by Notepad++, since its 6.0 version, at the TWO addresses below :
It’s possible that the file is exactly the same whether or not it’s encoded as ANSI or encoded as UTF-8 without BOM. I.e a file containing the single letter “a” encoded as ANSI will consist of the single byte 97. If you encode it as UTF-8 without BOM the file will still just consist of the single byte 97. In these cases it’s not possible to tell the encodings apart when re-opening the file.
Which version are you using? For some versions now the default font has been Source Code Pro, maybe it doesn’t support these Lithuanian characters. Try the absolute latest version (6.8.2) which removes Source Code Pro.
Have you tried changing the character set manually? See Encoding -> Character sets -> Baltic.
A while back N++ started trying to autodetect the character encoding, it might work better if you switch this off (Settings -> Preferences -> Misc -> Autodetect character encoding).
Yes, there is such a function in the most recent versions. To get a dictionary sort (a-z), use the menu option Edit -> Line operations -> Sort lines lexicographically. There are two versions - ascending and descending.
There are some other types of sorts as well, where it tries to convert the selected lines to numbers first before sorting.
You need to add BEGIN/END REPEAT/UNTIL and WHILE/END to the open and close boxes of the “Folding in code 1 style:” box on the “Folder & Default” page. That is, add “BEGIN REPEAT WHILE” to the Open: box and “END UNTIL END” to the Close: box.
You will have to explain your problem in a lot more detail.
I tried to change my previous post but I didn’t make it in 180 secs, so here is a replacement!
What was the exact sequence of actions that you did?
What exactly do you mean by “can’t read it” - does it display as junk?
Find the file in explorer - does it have a suffix? These suffixes tell you what sort of application can open the file - it may not be a txt file at all, and so won’t make sense if you open it with NOTEPAD++