+ Reply to Thread
Results 1 to 8 of 8

Thread: Tentative change to word wrap configuration

  1. #1

    Tentative change to word wrap configuration

    Currently and in all previous versions of VEDIT, if you are editing just one file and set the margins and/or enable word-wrap or display-wrap, AND save your config settings, these "word processing" settings are saved into the vedit.cfg file. These settings will therefore be the default settings the next time you start VEDIT.
    I now think that these word processing settings (and perhaps a few more) should never be saved into the vedit.cfg file.
    They will be saved into the file-open configuration files and into a project, but not the vedit.cfg file.

    The current behavior has confused/surprised me recently, and if it confuses me, it will likely confuse others users too.

    Any immediate thoughts on this are welcome.
    It appears I need to fix a few bugs and create a version 6.21.3 before sending out the customer newsletter; I would make this change in 6.21.3.

    Ted.

  2. #2
    I think this is valid for all the settings.
    It is quite confusing that when you change for example the colors of current window, it changes the colors of all the windows that are opened after that.

    Maybe there should be separate settings for "current file" and "global settings".
    (You could still have the "config all buffers" option.)
    When you select "Current files settings", maybe only buffer specific settings would be displayed.

    Another confusing thing in Vedit settings dialog is that there are no OK and Cancel buttons.

    --
    Pauli

  3. #3
    Administrator
    Join Date
    Aug 2011
    Location
    Ann Arbor, MI
    Posts
    103
    I made the change in 6.21.3. The whatsnew.txt file describes it like this:

    Save config {CONFIG, Save config} no longer saves several word processing
    and programming parameters into the vedit.cfg file which can
    cause confusion when VEDIT is next run. These are "Display
    lines with word wrap", "Enable word wrap", "Right margin",
    "Left margin", "Auto-indent mode" and "Lower/upper case key
    conversion". These parameters can still be set via File-open
    configuration, which is preferred anyway. In the
    unlikely case these parameters are desired for all files,
    they can be enabled in the ustartup.vdm file (which overrides
    the vedit.cfg file). This also applies to the "Auto-save
    config" function and the Config_Save() command.

    Technically, these are 5 of 30 "buffer specific" config parameters. I chose these because the user is likely to want different values every time VEDIT is used.
    I think that other buffer specific parameters like "Indent increment" and "Expand Tab key with spaces" are much less likely to change every time VEDIT is used.

    Pauli - the window colors are global and not buffer specific. Therefore changing one window changes all windows.
    BTW - The command Config_Display(LOCAL) displays only the buffer specific ones, including strings and tab stops.

    Your suggestion for a [Cancel] button is valid, but I just haven't yet implemented it. I will need to make a copy of all local and global config values and then restore them if [Cancel] is pressed.




    --------------

  4. #4
    Quote Originally Posted by mrvedit View Post
    Pauli - the window colors are global and not buffer specific. Therefore changing one window changes all windows.
    It is possible to change the color of a single window from macro language, with Win_Color(xx).
    Or by pressing Alt-J repeatedly.

    But, as I have said previously, window colors (including syntax colors) should be window specific.
    Using different colors is a good way to organize the windows, for example by showing different file types with different colors.
    Of course there are very limited possibilities for that now since there are so few useful color combinations to choose from.

  5. #5
    Administrator
    Join Date
    Aug 2011
    Location
    Ann Arbor, MI
    Posts
    103
    Oops. 6.21.3 and the early preliminary 6.22 had a related mistake. While several buffer-specific config values were (correctly) no saved into the vedit.cfg file, they were also (incorrectly) no longer saved into the file-open configuration .cft files.
    Hopefully I have all this correct now. A new preliminary 6.22 with this fix is available at:

    www.vedit.com/download/beta/vpw.exe

  6. #6
    This one hit me today - the other way round...

    I didn't remember the above mentionend changes and wondered why parts of my config did NOT get saved...

    So I did some diffs between Config_Display() and Config_Save().

    Just before reporting a "bug" I fortunately found this thread here. :-)


    Anyway.
    Here the result (done with version 6.22.1 - 09/30/2011).
    The lines indicate the config values NOT saved to file:

    Code:
    // diff Config_Display(EXTRA).txt Config_Save().txt
    
    
    < Config( D_DSP_WRAP, "Enable word wrap (display) (*)", 0 )
    < Config( E_INS_MODE, "Insert mode (Visual mode)", 1 )
    < Config( F_CUST_REC_SIZE, "Custom record length (*)", 0 )
    < Config( F_F_TYPE, "File type (*) (0=CR+LF, 1=LF, 2=CR, recsize)", 0 )
    < Config( F_REC_HEAD, "Record header size (*)", 0 )
    < Config( PG_AUTO_IND, "Auto-indent mode (*)", 0 )
    < Config( PG_CASE_CONV, "Lower/Upper case key conversion (*) (0 - 5)", 0 )
    < Config( PG_E_SYNTAX, "Enable syntax highlighting (*)", 0 )
    < Config( PG_E_TEMPLAT, "Enable template editing (*)", 0 )
    < Config( S_MONO, "Enable monochrome (B&W) colors", 0 )
    < Config( U_CFG_ALL, "Config all buffers", 0 )
    < Config( U_INSTANCES, "Instances control (0=Auto, 1=One, 2=Multiple)", 0 )
    < Config( W_LF_MARG, "Left margin (*) (0 - 80)", 0 )
    < Config( W_RT_MARG, "Right margin (*) (0=Window, 1=HSM, 16 - 255)", 70 )
    < Config( W_WORD_WRAP, "Enable word wrap (hard CR/LF) & formatting (*)", 1 )
    < Config_String( BACKUP_DIR, "C:\Users\Christian\AppData\Roaming\vedit\backup" )
    < Config_String( CONVERT_DIR, "c:\Program Files (x86)\vedit\convert" )
    < Config_String( CURRENT_PROJ_DIR, "" )
    < Config_String( DBL_CLICK_MACRO, "" )
    < Config_String( FILE_CFG_DIR, "C:\Users\Christian\AppData\Roaming\vedit\file-cfg" )
    < Config_String( FTP_DIR, "C:\Users\Christian\AppData\Roaming\vedit\ftp" )
    < Config_String( FTP_HOST, "" )
    < Config_String( FTP_PW, "" )
    < Config_String( FTP_USER, "" )
    < Config_String( HOME, "c:\Program Files (x86)\vedit" )
    < Config_String( INDENT_MACRO, "" )
    < Config_String( MACRO_DIR, "c:\Program Files (x86)\vedit\macros" )
    < Config_String( MAIL_REAL_NAME, "" )
    < Config_String( MAIL_REPLY_TO, "" )
    < Config_String( MAIL_RETURN_ADDR, "" )
    < Config_String( MAIL_SERVER, "" )
    < Config_String( PR_W_CURRENT, "" )
    < Config_String( PROJECT_DIR, "C:\Users\Christian\AppData\Roaming\vedit\projects" )
    < Config_String( SYN_NAME, "" )
    < Config_String( SYNTAX_DIR, "C:\Users\Christian\AppData\Roaming\vedit\syntax" )
    < Config_String( USER_CFG, "C:\Users\Christian\AppData\Roaming\vedit\config" )
    < Config_String( USER_HOME, "C:\Users\Christian\AppData\Roaming\vedit" )
    < Config_String( USER_MACRO, "C:\Users\Christian\AppData\Roaming\vedit\user-mac" )
    < Config_String( VEDIT_INI, "C:\Users\Christian\AppData\Roaming\vedit\vedit.ini" )
    < Config_String( VEDIT_TEMP, "C:\Users\CHRIST~1\AppData\Local\Temp\VeditTmp" )
    < Config_String( VTM_NAME, "" )
    This report is for reference only.

    Ted, perhaps you can have a look and confirm that the above values are the intended ones now.


    Christian
    Used VEDIT for more than 20 years, finally 6.24.1 on Windows 7. Now I'm on Linux, without VEDIT...

  7. #7
    After playing around with the new configuration logic I think there is a configuration gap.

    Values NOT (no longer) saved in VEDIT.CFG aren't saved AT ALL
    if File-Open-Configuration isn't enabled (at will or if user doesn't know about it)
    or if the edited buffer hasn't been loaded by File_Open() but by pasting from clipboard e.g.
    or if the file has no extension(? not tested yet).

    The "Auto-save config" option in the configuration dialog implies that configuration is completely auto-saved...

    I think the config-save logic needs some fixes - or/and better documentation in the config dialog.

    Hmmm, trying to write down a load/save logic for all the different parts of the configuration isn't easy.
    So I'll stop here and wait for comments ;-)

    Christian
    Used VEDIT for more than 20 years, finally 6.24.1 on Windows 7. Now I'm on Linux, without VEDIT...

  8. #8
    Administrator
    Join Date
    Aug 2011
    Location
    Ann Arbor, MI
    Posts
    103
    Sorry that I haven't looked into this yet, but will soon.
    Ted.

+ Reply to Thread

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts