summaryrefslogtreecommitdiffstats
path: root/usr.bin/mg/funmap.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Allow all non-ephemeral buffers to be toggled writable or read-onlylum2018-12-131-1/+2
| | | | while mg is running: toggle-read-only-all
* Add set-case-replaced to toggle case-preserving replace on or off.reyk2018-08-291-1/+2
| | | | | | | By default, replacing "foo" with "bar" turns "FOO" into "BAR". With case-replace turned off, "FOO" will turn into "bar". OK florian@ tb@
* Add 'sentence-end-double-space'.lum2016-04-141-1/+2
| | | | | | | | | | | | | | | | | | | | | | | If you prefer "lighter" punctuation and one space between sentences, for example: Mr and Mrs Jones are from the UK. They arrived today. over more liberal use of full stops and double spaces between sentences: Mr. and Mrs. Jones are from the U.K. They arrived today. then toggling 'sentence-end-double-space' will make mg's fill-paragraph function format text using one space instead of two (the default) between sentences. However, be careful, should you have a double spaced document and accidentally "format" it to have single spaces, then you may have a problem. mg won't be able to revert the formatting for you (unless you have a previous version of the text in the "undo" history, or are using mg's backup facility and haven't opened and saved multiple times!). Comments from schwarze@
* Add transpose-words, ok jasper@.lum2015-12-291-1/+2
| | | | Limited to one iteration until 'undo' is looked into.
* Add transpose-paragraphs. ok jasper@lum2015-09-261-1/+2
|
* Add mark-paragraph. ok jasper@lum2015-09-241-1/+2
|
* Clean up the includes in mg.bcallah2015-03-191-2/+8
| | | | | | | | | | This does the following: Moves all POSIX headers from sysdef.h into the individual .c files so that each file now only includes what it needs. All headers are properly sorted. Moves the remainder of sysdef.h to other files (mostly def.h) and deletes sysdef.h now that it's no longer contains anything. Tweak a comment that references sysdef.h so that it no longer does that. ok florian@
* Change the internal name of the newline function to deconflict with abcallah2015-03-161-2/+2
| | | | | | function of the same name in term.h. This is the first step towards cleaning up mg's includes. No user-visible changes. ok florian@
* Make the system bell toggleable via 'audible-bell', and if switchedlum2013-05-311-1/+3
| | | | | | off, make available an alternative 'visible-bell'. ok florian@ jasper@ Feedback Sunil Nimmagadda.
* Shuffle shell-command-on-region around to give shell-command.lum2013-05-221-1/+2
| | | | | ok florian@ jasper@ Testing Sunil Nimmagadda
* diff-buffer-with-fileflorian2012-12-271-1/+2
| | | | | input gsoares@, Sunil Nimmagadda, jasper@ ok jasper@, benno@
* Bring back column numbers and make them configurable, off by defaultflorian2012-12-041-1/+2
| | | | | | | | | to not kill slow serial lines. Committing my independently written, slightly different version, as requested by jasper@. OK jasper@, OK reyk@ for jasper@'s version of the diff "Sure, if you think so then." deraadt@
* - add 'make-directory' (not bound to any shortcut).jasper2012-11-271-1/+2
| | | | | feedback from florian@ lum@ ok florian@
* keep functnames sortedflorian2012-11-201-30/+32
| | | | ok jasper, lum
* - implement "revert-buffer", which reverts the current buffer to what's on diskjasper2012-10-121-2/+3
| | | | | | | - split gotoline() into the argument handling part and the part that actually goes to the specified line number so it can be re-used by revertbuffer() input/ok florian@ haesbaert@
* Allow mg to save backup files to a users home directory.lum2012-06-141-1/+3
| | | | | Suggestions from eric@ and Sunil Nimmagadda. Remarks deraadt@.
* Add some cscope support to mg. From Sunil Nimmagadda. Due to somelum2012-06-071-1/+14
| | | | | | | | structural limitations in mg, mg doesn't behave exactly the same as emacs cscope (see the README) but is still very usable. man page bits reviewed by jmc@, otherwise tested and reviewed by myself.
* Remove the conditional directives NO_MACRO and NO_STARTUP.lum2012-04-121-11/+1
| | | | | They have not compiled for numerous years. ok kjell@ millert@
* Add:lum2012-04-111-1/+3
| | | | | | | | 1. C-x h to mark whole buffer. 2. M-| to pipe current region to external command. From Sunil Nimmagadda. Feedback from deraadt@ and myself. ok for man page amendments from jmc@
* Remove the NO_HELP conditional directives. If defined, mg will not compile andlum2012-03-141-7/+1
| | | | | has not done so for numerous years. Not hard to fix, but just remove anyway. ok kjell@ millert@
* Add some ctags support to mg. From Sunil Nimmagadda.lum2011-11-281-1/+4
| | | | | | Man page review and suggestions from jmc@ Revewied and tested by myself, and ok deraadt@
* Add join-line, bound to M-^kjell2011-01-181-1/+2
| | | | | | | Join the current line to the previous. original diff by Henri Kemppainen. minor mod to add undo boundaries. Thanks!
* Add back-to-indentation. (M-m)kjell2011-01-171-1/+2
| | | | | Move the dot to the first non-whitespace character on the current line. from Henri Kemppainen . ok theo
* Expose the undo commands as proper mg functions.kjell2008-09-151-1/+4
| | | | | This should have no functional change on undo, but it does facilitate testing undo behavior.
* We do not need a whole MODE for blinking one character.kjell2008-06-141-3/+2
| | | | | | | | | | | | | | | | | | both emacsen automatically blink, so mg should too. This can be overridden in your ~/.mg by adding, e.g. global-set-key ")" self-insert-command So, I've eliminated blink mode, and renamed "blink-matching-paren-hack" to "blink-and-insert". It's not just for parens anyway. While I'm here, set up an empty (rescan) target for backtab, so I can bind something convenient to it; e.g. global-set-key "\e[Z" backward-char Finally, remove all references to Scribd. Theo doesn't hate this, though I would hesitate to call it an ok.
* Add delete-leading-space, delete-trailing-space,kjell2008-06-111-2/+5
| | | | | indent-current-line utility functions for stripping leading/trailing whitespace, and setting a fixed indent respectively.
* Add a clear-mark function.kjell2008-06-101-1/+2
| | | | | | | Use it to clear the region it is copied (M-w), or yanked (C-w). This matches xemacs behavior, is not horribly different from gnu emacs, and way less wrong than the current behavior. Noticed by Han Boetes. ok otto@
* Remove copyright notices and put these files back into the public domain.kjell2008-06-101-24/+4
| | | | ok art
* Add a global-wd-mode command, which toggles between the currentkjell2007-05-281-1/+2
| | | | | | | | behavior (every buffer maintains its own cwd) and the old behavior of one global working directory. This makes it slightly easier to hack on things like kernel code, where compilation, etc, are initiated from a different directory than you are working in. While here, fix setting/handling of global wd.
* Eliminate BSMAP #ifdef (we didn't define it). This exposes bsmap-mode,kjell2006-12-211-3/+1
| | | | | | which swaps ^H and DEL. ok jason@
* Get rid of PREFIXREGION ifdef, since we always enable it anyway.kjell2006-12-161-5/+1
| | | | no binary change.
* Display line number in the mg statusbar. Yes, it seems like a fuglykjell2006-06-011-1/+2
| | | | | | | | | | way to do it, but all the clever and pretty ways utterly failed. Basic use seems fine. We'll turdshine the special cases later. If it bothers you, use M-x line-number-mode, or put same in your ~/.mg file to disable. ok cloder, jason
* Clean up the ugly casted frees. In one case, this meant eliminating a nastykjell2005-12-201-3/+3
| | | | | | struct/union/casting nightmare when building the list of names for filename completion. In particular, be consistent about strduping and freeing the list data.
* More name-clash delintingkjell2005-12-131-4/+4
|
* #ifdef NO_DIR can go too. From Han Boetes.kjell2005-11-201-5/+1
|
* Don't bind help to a null functionkjell2005-11-201-2/+1
|
* Kill the NO_BACKUP #ifdefkjell2005-11-201-3/+1
|
* Goodbye NO_METAKEYkjell2005-11-191-3/+1
| | | | (#ifdef is for emacs developers)
* greedy use of typedef struct was making code harder to read; ok kjell cloderderaadt2005-11-181-3/+3
|
* Move most of the dired hooks into dired.c. While here, enable somekjell2005-11-071-13/+1
| | | | | | | dired functions that were written, but not bound to keys. No other functional change. Tested by Han Boetes.
* more replstr into the #ifdefderaadt2005-10-141-2/+2
|
* add find-alternate-file command and binding for ^X^V; ok cloderjason2005-05-301-1/+2
| | | | (you're welcome kjell)
* Add emacs-style replace-string function that does not prompt youcloder2005-05-271-1/+2
| | | | | to confirm replacements. OK jason, deraadt
* Get rid of unused arg to complete_function_list(). Han Boetes.otto2005-04-281-2/+2
|
* This is a no binary change which does:db2005-04-031-21/+17
| | | | | | | | | | - spelling, punctuation fixes - variable declaration lineup - use parentheses for return and sizeof - K&R function declarations -> ANSI - other minor code beautification ok henning@
* fix mg's behaviour with regards to files on which we do not havejfb2005-03-091-2/+2
| | | | | | | write access. diff originally from vincent@ and forgotten for a while. ok rohee@, "toss it in, i'll bitch if it doesn't work" henning@
* add an "auto-execute" feature, that allows binding function calls tovincent2002-05-291-1/+2
| | | | | | certain patterns. for example, `auto-execute "*.c" auto-indent-mode'. ok art@
* add an entry for "find-file-read-only" and one for toggle-read-only,vincent2002-05-291-1/+3
| | | | | | which was missing for an unknown reason. ok art@
* map undo_dump to the "undo-list" command.vincent2002-03-161-1/+2
|
* * Move to ANSI function definitions.vincent2002-03-111-7/+7
| | | | | | * Add a whole lot of consts where I thought it made sense no ok, but no objections either...