#
fb3e194e |
| 21-Apr-2023 |
op <op@openbsd.org> |
mg: allow to change the tab width
This makes the tab width customizable per-buffer. The new function `set-tab-width' changes it for the current buffer or the default value for new buffers if called
mg: allow to change the tab width
This makes the tab width customizable per-buffer. The new function `set-tab-width' changes it for the current buffer or the default value for new buffers if called with a prefix argument (or from the startup file.)
The default tab width is still 8 column.
Together with the newly resurrected no-tab-mode, allows to use mg for a variety of programming languages and coding styles.
Note that it's not possible to call set-tab-width with auto-execute in the startup file due to limitations in how auto-execute and the parser work.
ok tb@
show more ...
|
#
38733382 |
| 17-Apr-2023 |
op <op@openbsd.org> |
resurrect mg' no-tab-mode
It's a mode that makes mg insert spaces up to the next tab stop upon pressing TAB, along with the various tweaks needed in other places so for e.g. auto-indent-mode also us
resurrect mg' no-tab-mode
It's a mode that makes mg insert spaces up to the next tab stop upon pressing TAB, along with the various tweaks needed in other places so for e.g. auto-indent-mode also uses spaces.
This is not just an unifdef NOTAB: even under no-tab-mode mg should consider literal TAB characters wide up to the next tab stop, while the hidden code considered hard tabs to be just control character (i.e. ^I) with width of two columns. I'm also introducing the helper function doindent() in utils.c to de-obfuscate the insertion of tabs/spaces until the given column.
ok tb@
show more ...
|
#
5b133f3f |
| 08-Mar-2023 |
guenther <guenther@openbsd.org> |
Delete obsolete /* ARGSUSED */ lint comments.
ok miod@ millert@
|
#
8d6aab5f |
| 17-Nov-2018 |
lum <lum@openbsd.org> |
fix undo in transpose-paragraph.
|
#
9f6ffbf0 |
| 06-Sep-2016 |
lum <lum@openbsd.org> |
If you have a paragraph:
123 456
With the cursor on either the 4, 5 or 6 and no newline after the '6', and then execute forward-paragraph (M-}), the cursor sits still and does not move to the end o
If you have a paragraph:
123 456
With the cursor on either the 4, 5 or 6 and no newline after the '6', and then execute forward-paragraph (M-}), the cursor sits still and does not move to the end of the second line (after the 6), which is in effect the end of parapraph. This diff fixes that behaviour.
show more ...
|
#
d8f6be30 |
| 14-Apr-2016 |
lum <lum@openbsd.org> |
Add 'sentence-end-double-space'.
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 fu
Add 'sentence-end-double-space'.
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@
show more ...
|
#
787cfe48 |
| 12-Apr-2016 |
lum <lum@openbsd.org> |
Stop mg putting a space at the end of a paragraph when using fill-paragraph. Reported by Harald Dunkel.
|
#
5dbcbdb5 |
| 14-Dec-2015 |
mmcc <mmcc@openbsd.org> |
s/begining/beginning/g
|
#
f792803d |
| 10-Oct-2015 |
lum <lum@openbsd.org> |
Make functions that accept multiple iterations via C-u N, honour 0. Except C-k which has a defined behaviour. In mg, C-t doesn't complete n iterations if requested, but probably should, hence it has
Make functions that accept multiple iterations via C-u N, honour 0. Except C-k which has a defined behaviour. In mg, C-t doesn't complete n iterations if requested, but probably should, hence it has been included in this diff.
show more ...
|
#
5215786e |
| 26-Sep-2015 |
lum <lum@openbsd.org> |
Add transpose-paragraphs. ok jasper@
|
#
89e14c55 |
| 24-Sep-2015 |
lum <lum@openbsd.org> |
Make comments more accurate.
|
#
cd2979d5 |
| 24-Sep-2015 |
lum <lum@openbsd.org> |
Add mark-paragraph. ok jasper@
|
#
38bc2af9 |
| 24-Sep-2015 |
lum <lum@openbsd.org> |
Fix multiple iterations of kill-paragraph. ok jasper@
|
#
cc6738c5 |
| 19-Mar-2015 |
bcallah <bcallah@openbsd.org> |
Clean up the includes in mg. 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 so
Clean up the includes in mg. 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@
show more ...
|
#
67444bbb |
| 16-Nov-2014 |
guenther <guenther@openbsd.org> |
Stop using <sys/param.h>; replace MAXPATHLEN with PATH_MAX, stop using MAX(), and pull in <limits.h> for *_MAX constants.
inspired on a diff from Kamil Rytarowski (n54 (at) gmx.com) ok bcallah@
|
#
8665fb2b |
| 17-Oct-2014 |
lum <lum@openbsd.org> |
If gotoeop() is called requiring more than one iteration, it behaves oddly if it reaches the end of buffer before completing all iterations. This diff makes the kill-paragraph and forward-paragraph c
If gotoeop() is called requiring more than one iteration, it behaves oddly if it reaches the end of buffer before completing all iterations. This diff makes the kill-paragraph and forward-paragraph commands stop once they can go no further. ok florian@
show more ...
|
#
0d05d316 |
| 13-Oct-2014 |
lum <lum@openbsd.org> |
gotoeop() does not behave as expected when there is no '\n' at the end of the buffer. ok florian@
|
#
b9d02dd9 |
| 12-Oct-2014 |
lum <lum@openbsd.org> |
Fix a bug in backward-paragraph. If the cursor is on the first line of a paragraph, it jumps to the start of the previous paragraph if you press M-{. Input and fix to my diff from florian@
|
#
e3b355b6 |
| 27-Mar-2014 |
florian <florian@openbsd.org> |
Don't use nospace uninitialized in gotobop and gotoeop. Problem noticed and diff from bcallah@. Slightly different fix by me. OK lum@, bcallah@
|
#
dbf27552 |
| 20-Mar-2014 |
lum <lum@openbsd.org> |
Add some missing dobeeps. ok florian@
|
#
e40e4d27 |
| 15-Jun-2013 |
lum <lum@openbsd.org> |
Move upwards passed multiple lines with no characters instead of stopping when first line with no characters is found.
|
#
47dbce39 |
| 01-Jun-2013 |
lum <lum@openbsd.org> |
Make 'kill-paragraph' behave like emacs. ok florian@
|
#
dccf97f1 |
| 01-Jun-2013 |
lum <lum@openbsd.org> |
Update the forw/backpara comments to reflect recent changes.
|
#
2baac12a |
| 01-Jun-2013 |
lum <lum@openbsd.org> |
tidy-up int declarations as suggested by florian@
|
#
81413128 |
| 01-Jun-2013 |
lum <lum@openbsd.org> |
Adjust M-} (forward-paragraph) to behave like emacs. Bug fix and ok florian@
|