Skip to content

Commit fab8c95

Browse files
committed
Initially default colorset Background Colors or Neon #80
At first-time startup initially just select Background Colors or Neon as default colorset, instead of randomly selecting Background Colors/Foreground Colors (or Pastel/Neon for Darkmode) because this is needlessly confusing. See issue #80
1 parent 832c9ea commit fab8c95

File tree

2 files changed

+31
-31
lines changed

2 files changed

+31
-31
lines changed

CSVLintNppPlugin/Main.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -228,10 +228,9 @@ internal static void TryCreateLexerXml(int presetidx, bool overwrite)
228228
// when initially creating CSVLintxml for first time
229229
if (presetidx == -1)
230230
{
231-
// initially give users random color preset, i.e. distribute random among all users, to see which they like best
231+
// Give users color preset based on Darkmode or not
232232
bool checkdarkmode = CheckConfigDarkMode();
233-
var sec = DateTime.Now.Second % 2; // semi-random 0..1
234-
presetidx = (checkdarkmode ? 2 : 0) + sec; // 0..1 for normal, 2..3 for dark mode
233+
presetidx = (checkdarkmode ? 3 : 0); // 0=Normal background, 3=Dark mode Neon colors
235234
}
236235

237236
// create syntax color xml

docs/readme.md

Lines changed: 29 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,34 @@ toolbar icon.
2424
**If you find the CSV Lint plug-in useful you can buy me a coffee!**
2525
[![paypal](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=US5SMK2DC6TXE)
2626

27+
Syntax highlighting colors
28+
--------------------------
29+
Syntax highlighting will make it easier to see columns in the data files.
30+
Note that the rendering of the syntax highlighting runs on a separate thread
31+
in the background. This means that for larger files (~50MB or more) it can
32+
happen that the beginning of the file displays column colors but at the end of the
33+
file it's still uncolored.
34+
35+
There are four pre-defined color schemes you can select in the `Setttings` dialog.
36+
At first time startup, the plug-in will select normal or darkmode color scheme,
37+
depending on the Dark Mode setting in the Notepad++ `config.xml`.
38+
39+
![CSV Lint color styles for syntax highlighting](/docs/csvlint_color_styles.png?raw=true "CSV Lint plug-in color styles for syntax highlighting")
40+
41+
These predefined color sets have been [carefully selected](https://github.com/BdR76/CSVLint/tree/master/extra#generate_colorspy)
42+
so that each column color is as different as possible from the next.
43+
The color scheme settings are stored in a file `CSVLint.xml` which is
44+
automatically created at first time startup or when the file is missing,
45+
also see an example [CSVLint.xml file here](https://github.com/BdR76/CSVLint/blob/master/extra/).
46+
47+
%USERPROFILE%\AppData\Roaming\Notepad++\plugins\config\CSVLint.xml
48+
49+
You can also change the colors in the "Style Configurator dialog", see menu item
50+
`Settings > Style configurator... > Language: CSV Lint`. If you have a CSV file
51+
open you'll immediately see the changes as you edit them. Note that selecting a
52+
default color scheme in `Setttings` will overwrite any changes made in
53+
the Style Configurator dialog.
54+
2755
CSV Lint window
2856
---------------
2957
Click the toolbar icon or select the menu item `Plugins > CSVLint > CSV Lint window`
@@ -598,34 +626,6 @@ and they are stored in a settings file `%USERPROFILE%\AppData\Roaming\Notepad++\
598626
| TrimValues | Trim values before analyzing or editing (recommended). | true |
599627
| UserPref section | Various input settings for the CSV Lint dialogs for Convert Data, Reformat, Split Column etc. | |
600628

601-
Syntax highlighting colors
602-
--------------------------
603-
Syntax highlighting will make it easier to see columns in the data files.
604-
Note that the rendering of the syntax highlighting runs on a separate thread
605-
in the background. This means that for larger files (~50MB or more) it can
606-
happen that the beginning of the file displays column colors but at the end of the
607-
file it's still uncolored.
608-
609-
There are four pre-defined color schemes you can select in the `Setttings` dialog.
610-
At first time startup, the plug-in will select normal or darkmode color scheme,
611-
depending on the Dark Mode setting in the Notepad++ `config.xml`.
612-
613-
![CSV Lint color styles for syntax highlighting](/docs/csvlint_color_styles.png?raw=true "CSV Lint plug-in color styles for syntax highlighting")
614-
615-
These predefined color sets have been [carefully selected](https://github.com/BdR76/CSVLint/tree/master/extra#generate_colorspy)
616-
so that each column color is as different as possible from the next.
617-
The color scheme settings are stored in a file `CSVLint.xml` which is
618-
automatically created at first time startup or when the file is missing,
619-
also see an example [CSVLint.xml file here](https://github.com/BdR76/CSVLint/blob/master/extra/).
620-
621-
%USERPROFILE%\AppData\Roaming\Notepad++\plugins\config\CSVLint.xml
622-
623-
You can also change the colors in the "Style Configurator dialog", see menu item
624-
`Settings > Style configurator... > Language: CSV Lint`. If you have a CSV file
625-
open you'll immediately see the changes as you edit them. Note that selecting a
626-
default color scheme in `Setttings` will overwrite any changes made in
627-
the Style Configurator dialog.
628-
629629
About
630630
-----
631631
An about window
@@ -657,5 +657,6 @@ History
657657
29-oct-2022 - v0.4.6.2 Fixed width positions parameter, docked window font, syntax highlighting toggle button
658658
16-apr-2023 - v0.4.6.3 Syntax Highlighting fix, new SkipLines feature and quoted string improvements
659659
02-may-2023 - v0.4.6.4 Comment character and dark mode support
660+
04-jun-2023 - v0.4.6.5 Support enum/coded values and various updates
660661

661662
BdR©2023 Free to use - send questions or comments: Bas de Reuver - bdr1976@gmail.com

0 commit comments

Comments
 (0)