Skip to content

Mg v4.4

Latest

Choose a tag to compare

@github-actions github-actions released this 15 Oct 17:49
· 1 commit to master since this release
v4.4
922cba6

Changes

  • The IBM Common User Access (CUA) cut, copy and paste keys, known from
    the Borland DOS editors: S-Delete kills the region, C-Insert
    copies it and S-Insert yanks. C-Delete kills the word after dot.
    Most terminal emulators keep S-Insert, and some C-Insert, for the
    system selection and never pass them on
  • New auto-revert-mode: while waiting for a key, a file buffer whose
    file changed on disk is reloaded, as long as it has no unsaved edits,
    with each window on it keeping its line. Checked every five seconds,
    set-auto-revert-interval changes that. Enabled by default,
    auto-revert-mode 0 in ~/.mg disables it
  • New auto-revert-tail-mode, to follow a log file like tail -f:
    what is added to the file is appended to the buffer, and the windows
    at its end follow it. A file that shrinks or is rotated is read
    again. Works without auto-revert-mode, and on read-only buffers.
    auto-execute *.log auto-revert-tail-mode in ~/.mg tails every log
  • revert-buffer keeps the line in every window showing the buffer,
    not only the current one
  • The display-time-mode clock is kept current while waiting for a
    key, instead of only on the next redraw
  • New tabify and untabify turn the spaces in the lines of the
    region into tabs and back, keeping the text in its columns
  • New delete-trailing-whitespace, for the whole buffer, or the region
    when active. delete-trailing-space still cleans only the current
    line
  • New fill-region fills each paragraph in the region
  • New sentence commands: M-a backward-sentence, M-e forward-sentence,
    M-k kill-sentence and C-x DEL backward-kill-sentence.
    sentence-end-double-space decides whether one space after a period
    ends a sentence
  • C-l runs the new recenter-top-bottom: pressed again it puts the
    line at the top of the window, a third time at the bottom
  • M-r runs the new move-to-window-line-top-bottom, which moves the
    cursor to the middle row of the window, then the top and the bottom.
    search-backward is no longer bound to M-r
  • New where-is on C-h w shows the keys a command is on
  • New describe-key on C-h k shows the command a key runs, and
    every key that command is on, in the *help* buffer
  • The *help* buffer from C-h a, C-h b and C-h k gets the cursor,
    and q closes it, as in the quick help
  • New --disable-help configure option for small builds. It leaves
    out the C-h commands, the quick help, the tutorial and the startup
    hint, and is part of --disable-all
  • New --disable-autorevert configure option leaves out
    auto-revert-mode and auto-revert-tail-mode, also part of
    --disable-all

Fixes

  • Fix shift, control and Meta with the arrow keys, Home, End, PgUp,
    PgDn, Insert and Delete in rxvt and urxvt. These terminals send
    their own sequences for the keys, which mg did not bind. Without
    curses, plain Home and End did not work there either
  • Fix a line longer than 127 bytes in ~/.mg, or in a buffer given to
    eval-current-buffer, silently ending the load: that line and every
    one after it were ignored. An auto-execute pattern can now be as
    long as a file name