Dmuse: feature requests
Contents
Feature requests
- Mouse scroll wheel moved one click towards the user: make equivalent to Ctrl+↑
- Mouse scroll wheel moved one click away from the user: make equivalent to Ctrl+↓
- Mouse click in scroll-bar region on right side of screen, above current cursor marker: make equivalent to PgUp
- Mouse click in scroll-bar region on right side of screen, below current cursor marker: make equivalent to PgDn
- Control + Mouse click in scroll-bar region on right side of screen: move to that relative line positoin within the file.
- There should be an option in File menu which works like "Save As..." currently there is only an equivalent to "Save" which saves the current window contents to the associated file.
- There should be a search option in the help menu where someone can search for a term, with a list of matches being displayed. However, placing the documentation on the web minimizes the need for this search feature to be built into Dmuse.
- In the resident file manager, it would be useful to allow for filename filtering. Suppose a directory has lots of file in it. Typing the command l will list lots of file and some will scroll off of the screen. If I know some portion of the filename, it would be useful to be able to filter for that portion of the filename. For example, if I type "l p*" only files which start with the letter p would be displayed. If I type "l *.txt", then only files that end in ".txt" will be displayed.
- Read/Write UTF-8 files, with reversible mapping for Dmuse byte codes. Color escape sequences kept the same, or using ANSI escape codes.
Tab characters
- Tab characters are currently displayed as one character-width symbols (a dashed vertical line). However, one of the purposes of tab characters are to assist in the readability of fields of data, placing them into visually aligned columns. Here is an example of the display method for tab characters currently in Dmuse:
It would be much preferred if tabs in files were expanded into multi-character width entities. Here is an example of a possible method of display when the tab-stop size is set to 13 characters:
The basic algorithm for reading tab characters in a data file and loading/displaying the file with tab characters:
- There would be a user-settable variable for the tab width. By default, tabs are 8 characters wide in a fixed-width font. In Humdrum it is useful to be able to switch dynamically to a different width (as in the above example which set the tab width to 13 characters.). In the vi editor, for example, the tab width would be set to 13 by typing the command ":set ts=13"
- When a file is loaded, line by line, if a tab character is found on the line, its column position is noted. For example if the tab-stop (tab width) is set to 8, and a tab character is found in column 5, four "tab" characters would be added to the line to fill it out so that the next character would be placed in column 9.
- When a line containing a tab is edited, it has to be analyzed in some manner to readjust the tab width of particular tabs. One possible method would be to store a marker for the start of a single tab's multi-character set. When the tabs are moved around, the head of the tab character set would be used to adjust the width of the tab sequence which may have shrank or grown with the addition/deletion of a character somewhere on the line.
- When saving a file, the multi-tab sequence would be reconverted into a single tab character in a fully reversible process (providing the the previous step is handled correctly). For exmaple, suppose that there is a tab sequence starting at character 5 in the line (with the tabstop set to 8 characters). Then there should be three tab markers (in columns 5, 6, 7, 8) which represent a single "real" tab. If there continues to be a tab character in column 9, then that is part of another "real" tab character (which should encompass columns 9-16).
- The dotted line for the Tab character is a bit distracting in the above example showing a multi-character width tab. It would be useful to minimize the visual effect with two possibilities:
- Display the tab character automatically in a lower contrast with the background color as in the following example:
- Set the display of tab characters as a toggle between the style of a space (invisible) and visible (as a set of dotted vertical lines). Some key combination could be used to switch between these modes.
In vi, tabs can be make viewable separately from spaces by searching for tab characters (or spaces). When colorization is enabled in the editor, the matched characters will be highlighted as shown in the following illustration:
Alternatively, spaces could be highlighted:
Vi also has a feature called syntax highlighting. For example, here is a webpage showing syntax highlighting for Humdrum data files. In the example image on the page, invalid tab characters (such as two tab characters in a row or a tab ab the beginning or ending of a line is colored in red). Invalid spaces characters are highlighted in blue. Other functional components of the Humdrum file are given different colors, such as barlines with a white background, interpretations in pink, and reference records in green.
- If a regular ASCII text file contains any tab characters, Dmuse displays a warning window saying that it is possible that the files is a non-ASCII file. It then asks if you want to continue, and if you want to display the contents of the file as a hex dump. It would be preferred if Dmuse did not give this warning due to the presence of a tab character in the file.
- The Tab ⇆ key is used to move to the next line in a file (similar functionality to Shft+↓. The tab character is inserted into the text with the keystrokes +Shft+Alt+0. It would be better have the Tab ⇆ key insert the Tab character, and the current functionality of Tab ⇆ moved to another key sequence.