stefankueng / BowPad

A simple and fast text editor with a ribbon UI
http://tools.stefankueng.com/BowPad.html
GNU General Public License v3.0
641 stars 84 forks source link

Issues: Wordrap not persistent, StyleConf not saving, no AHK, Horiz scroll, etc.. #376

Closed mdnava closed 2 months ago

mdnava commented 4 months ago

Hello there!

I have been using grepWin for while now, but I've just very recently found out / tried BowPad.

I'm astonished by this editor. Particularly by its speed, simplicity, the multiple selection edit, and of course its file list sidebar. However, there are a few issues that I think prevent me from actually using it, I just thought I should mention.

1) Wordwrap setting is not persistent between sessions. If I set Wordwrap to OFF for any file (like a ,txt file), next time I open the file Wordpwrap is ON. Ideally the Wordwrap setting should be persistent for each filetype. Not sure if other settings are not persistent, but they should be, since there aren't actual settings besides what's on the ribbons.

2) I tried to customize some filetypes in the Style Configurator, but when I was with CSharp I noticed changes were not being saved at all. For example, I changed TYPE WORD to red color, the removed BOLD from INSTRUCTION WORD, and set OPERATOR to color BLACK. When I pressed OK all changes were lost.. And when I checked back I believe most changes I had done to other filetypes were also lost, but this would be hard to verify, since I did many quick changes I can't remember. This is definitely a huge issue.

3) I also believe if there was a better way to add or modify lexers, other people (like me) perhaps could contribute.

4) No AutoHotkey lexer :( ... And no way of adding a custom lexer.

5) I believe the horizontal scrollbar should be hidden if there's no horizontal text overflow. This is a minor issue, but still worth mentioning.

6) Some monospaced fonts seem to have an issue with spaces (and it seems line height too). Spaces don't seem to count as a single font space, but less. Example below...

7) TAB size doesn't seem to work properly in some cases. I use a filetype .mnx to create README files for software I use, with things like how to extract and install portable software, how to update, the author URL and information, etc.. But the tab size is always 8 when I open those files, even tho in the ribbon indicates a size of 4.. This is fixed by setting the size to 3 and then back to 4, but this has to be done every time a file is open.

Font: Consolas | Tab size: 4 2024-06-08 08 56 07

Font: Consolas | Tab size: 4 (after setting the size to 3 and then back to 4) 2024-06-08 08 56 26

Font: Consolas NF3 (This is the same "Consolas" font patched with Nerd Fonts Patcher) 2024-06-08 08 56 44

Font: Consolas NF3 (This is how it looks in EditPlus) 2024-06-08 08 57 08

Font: Consolas NF3 (This is how it looks in Visual Studio Code) 2024-06-08 09 02 20

Best regards!

stefankueng commented 3 months ago

I hope you don't mind, but I've created separate issues from the many you mention in this one.

  1. Wordwrap setting is not persistent between sessions. If I set Wordwrap to OFF for any file (like a ,txt file), next time I open the file Wordpwrap is ON. Ideally the Wordwrap setting should be persistent for each filetype. Not sure if other settings are not persistent, but they should be, since there aren't actual settings besides what's on the ribbons.

created issue #381 for this

  1. I tried to customize some filetypes in the Style Configurator, but when I was with CSharp I noticed changes were not being saved at all. For example, I changed TYPE WORD to red color, the removed BOLD from INSTRUCTION WORD, and set OPERATOR to color BLACK. When I pressed OK all changes were lost.. And when I checked back I believe most changes I had done to other filetypes were also lost, but this would be hard to verify, since I did many quick changes I can't remember. This is definitely a huge issue.

not sure how to attack this problem. I tried to reproduce it but failed. the style changes are stored in a file named 'userconfig', either in %appdata%\bowpad or where the exe is (for the portable version). Maybe you can see what's wrong in there?

  1. I also believe if there was a better way to add or modify lexers, other people (like me) perhaps could contribute.

full lexers are not easy to do: https://github.com/ScintillaOrg/lexilla

usually it's enough to use an existing lexer (for example the c++ lexer is used for many other languages as well) and just provide custom keywords and colors: https://tools.stefankueng.com/BowPad_lexerconfig.html

  1. No AutoHotkey lexer :( ... And no way of adding a custom lexer.

created issue #382 for this

  1. I believe the horizontal scrollbar should be hidden if there's no horizontal text overflow. This is a minor issue, but still worth mentioning.

created issue #383 for this

  1. Some monospaced fonts seem to have an issue with spaces (and it seems line height too). Spaces don't seem to count as a single font space, but less. Example below...
  2. TAB size doesn't seem to work properly in some cases. I use a filetype .mnx to create README files for software I use, with things like how to extract and install portable software, how to update, the author URL and information, etc.. But the tab size is always 8 when I open those files, even tho in the ribbon indicates a size of 4.. This is fixed by setting the size to 3 and then back to 4, but this has to be done every time a file is open.

created issue #384 for this

mdnava commented 3 months ago

@stefankueng thank you for answering..

I took note of the different opened issues.

Right now I'm out of town, but once I'm back home I will check/try again the Style Configurator and comment the results.

Best regards!

mdnava commented 2 months ago

Hi @stefankueng .. congrats for the new release v2.9.1 .. I'm happy to report the Wordwrap setting and the TAB setting is now working between sessions, and thank you for the AHK lexer.

First, here's the latest capture of a perfectly rendered .mnx file header using a NF patched font.. :)

2024-08-03 11 15 55

  1. I tried again today the Style Configurator issue, and took a video. I just can't get it to work. Changes are randomly lost. I usually set all languages with reserved keywords in blue, variables in dark red, properties in dark blue, comments in green, and function names (suffixed by parentheses) in red, among other colors. It helps me focus with consistency while working on any language. I tried both PowerShell and C# to no avail, but I was able to make changes to AutoHotkey.

https://github.com/user-attachments/assets/354c8fbe-65b9-47e0-a36e-f2dbca772cfc

  1. If I may also make a suggestion for the Style Configurator, I think that a reset button for the current lexer would be useful to most users.

  2. I customized keyboard shortcuts in BowPad and they seem to work great, except for this:

cmdSettings=VK_F2

Seems to do nothing !?.. I understand most settings (perhaps all) are set on the ribbon, but since the shortcut exists shouldn't it do something, like open "settings" file, or the EditorSettings plugin file?

  1. If I may ask, any reason why BowPad config files use (or it says it does) Latin Codepage 1252 instead of UTF-8?

2024-08-03 12 02 41

According to VS Code the codepage is UTF-8:

2024-08-03 12 02 25

I've analyzed the files and they seem to be plain text ASCII:

2024-08-03 12 33 13

However, the fact that BowPad is using or detecting 1252 codepage can possibly be an issue. I'm by no means an expert in encoding, but I've had many many problems in the past with it, particularly for the web.

So I did a test, this is a capture of the original settings file opened in BowPad:

2024-08-03 12 22 40

Now this is the same file opened AND SAVED in VSCode with some special characters:

2024-08-03 12 26 15

This is the same previously saved in VSCode but now opened in BowPad:

2024-08-03 12 27 08

Then I add again characters to to the same file there in BowPad:

2024-08-03 12 28 45

And this is what I get in VSCode:

2024-08-03 12 29 58

This is not relevant if BowPad will forever use Latin coded config files, but it will be an issue if the program misrepresents the codepage for any file that should be saved as UTF-8 or other codepage (UTF-8+BOM, UTF-16, etc). The issue as I understand it could be caused if plain ASCII text files are detected as Latin 1252 and saved as such, but then when Unicode characters are saved to the file, bad/weird characters will show up instead.

  1. If I may also ask, where can I check within BowPad its current version? sorry if I missed it..

Again, beautiful editor you've created..

Best regards!

stefankueng commented 2 months ago

next time, please open a new issue instead of adding to a closed one. Closed issues don't show up in the default filter so I might miss it.

about the style configurator not working: I tried just now and it works for me. I've created an issue for this: #387 Can you attach your config file to that issue please?

About the code page: code page 1252 is most likely your local codepage. This is the default when detecting. However, you can configure this using the File->New->Set Defaults button. In that dialog you can configure that BP should use utf8 if plain ASCII is detected.

stefankueng commented 2 months ago

and you can see the version of BP with the (?) button at the very top right, just below the X (close) button of the window.