Hi Bram and all,

'gdefault' invertes the 'g' flag of `:substitute`.
In addition to 'edcompatible', it also inverts the 'c' flag.

When using `:substitute` with plugin, save and restore of the above options are 
necessary, it is a little weird.

I propose to stop supporting these options.
Please check the attached patch.

P.S.
I'm sorry if my choice of words was wrong and you made unpleasant.
--
Best regards,
Hirohito Higashi (h_east)

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.
diff --git a/runtime/doc/change.txt b/runtime/doc/change.txt
index 8cca763..8fd56cc 100644
--- a/runtime/doc/change.txt
+++ b/runtime/doc/change.txt
@@ -706,9 +706,6 @@ The flags that you can use for the substitute commands:
 			compiled without the |+insert_expand| feature}
 	    CTRL-Y  to scroll the screen down {not in Vi, not available when
 			compiled without the |+insert_expand| feature}
-	If the 'edcompatible' option is on, Vim remembers the [c] flag and
-	toggles it each time you use it, but resets it when you give a new
-	search pattern.
 	{not in Vi: highlighting of the match, other responses than 'y' or 'n'}
 
 [e]     When the search pattern fails, do not issue an error message and, in
@@ -723,11 +720,7 @@ The flags that you can use for the substitute commands:
 	{not in Vi}
 
 [g]	Replace all occurrences in the line.  Without this argument,
-	replacement occurs only for the first occurrence in each line.  If
-	the 'edcompatible' option is on, Vim remembers this flag and toggles
-	it each time you use it, but resets it when you give a new search
-	pattern.  If the 'gdefault' option is on, this flag is on by default
-	and the [g] argument switches it off.
+	replacement occurs only for the first occurrence in each line.
 
 [i]	Ignore case for the pattern.  The 'ignorecase' and 'smartcase' options
 	are not used.
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index 927931c..3277c13 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -1783,7 +1783,6 @@ A jump table for the options with a short description can be found at |Q_op|.
 			  "dos,unix"	except for DOS, Windows and OS/2
 	'formatexpr'	+ ""		use 'formatprg' for auto-formatting
 	'formatoptions'	& "vt"		Vi compatible formatting
-	'gdefault'	+ off		no default 'g' flag for ":s"
 	'history'	& 0		no commandline history
 	'hkmap'		+ off		no Hebrew keyboard mapping
 	'hkmapp'	+ off		no phonetic Hebrew keyboard mapping
@@ -2697,10 +2696,7 @@ A jump table for the options with a short description can be found at |Q_op|.
 			   *'ed'* *'edcompatible'* *'noed'* *'noedcompatible'*
 'edcompatible' 'ed'	boolean	(default off)
 			global
-	Makes the 'g' and 'c' flags of the ":substitute" command to be
-	toggled each time the flag is given.  See |complex-change|.  See
-	also 'gdefault' option.
-	Switching this option on is discouraged!
+	This is no longer supported.
 
 					*'emoji'* *'emo'* *'noemoji'* *'noemo'*
 'emoji' 'emo'	boolean (default: on)
@@ -3498,17 +3494,7 @@ A jump table for the options with a short description can be found at |Q_op|.
 'gdefault' 'gd'		boolean	(default off)
 			global
 			{not in Vi}
-	When on, the ":substitute" flag 'g' is default on.  This means that
-	all matches in a line are substituted instead of one.  When a 'g' flag
-	is given to a ":substitute" command, this will toggle the substitution
-	of all or one match.  See |complex-change|.
-
-		command		'gdefault' on	'gdefault' off	~
-		:s///		  subst. all	  subst. one
-		:s///g		  subst. one	  subst. all
-		:s///gg		  subst. all	  subst. one
-
-	NOTE: This option is reset when 'compatible' is set.
+	This is no longer supported.
 
 						*'grepformat'* *'gfm'*
 'grepformat' 'gfm'	string	(default "%f:%l:%m,%f:%l%m,%f  %l%m")
diff --git a/runtime/doc/quickref.txt b/runtime/doc/quickref.txt
index e64a5f6..756d7c6 100644
--- a/runtime/doc/quickref.txt
+++ b/runtime/doc/quickref.txt
@@ -622,7 +622,6 @@ Short explanation of each option:		*option-list*
 'balloonexpr'	  'bexpr'   expression to show in balloon
 'belloff'	  'bo'	    do not ring the bell for these reasons
 'binary'	  'bin'     read/write/edit file in binary mode
-'bioskey'	  'biosk'   MS-DOS: use bios calls for input characters
 'bomb'			    prepend a Byte Order Mark to the file
 'breakat'	  'brk'     characters that may cause a line break
 'breakindent'	  'bri'     wrapped line repeats indent 
@@ -653,7 +652,6 @@ Short explanation of each option:		*option-list*
 'concealcursor'	  'cocu'    whether concealable text is hidden in cursor line
 'conceallevel'	  'cole'    whether concealable text is shown or hidden
 'confirm'	  'cf'	    ask what to do about unsaved/read-only files
-'conskey'	  'consk'   get keys directly from console (MS-DOS only)
 'copyindent'	  'ci'	    make 'autoindent' use existing indent structure
 'cpoptions'	  'cpo'     flags for Vi-compatible behavior
 'cryptmethod'	  'cm'	    type of encryption to use for file writing
@@ -678,7 +676,6 @@ Short explanation of each option:		*option-list*
 'directory'	  'dir'     list of directory names for the swap file
 'display'	  'dy'	    list of flags for how to display text
 'eadirection'	  'ead'     in which direction 'equalalways' works
-'edcompatible'	  'ed'	    toggle flags of ":substitute" command
 'emoji'		  'emo'	    emoji characters are considered full width
 'encoding'	  'enc'     encoding used internally
 'endofline'	  'eol'     write <EOL> for last line in file
@@ -718,7 +715,6 @@ Short explanation of each option:		*option-list*
 'formatoptions'   'fo'	    how automatic formatting is to be done
 'formatprg'	  'fp'	    name of external program used with "gq" command
 'fsync'		  'fs'	    whether to invoke fsync() after file write
-'gdefault'	  'gd'	    the ":substitute" flag 'g' is default on
 'grepformat'	  'gfm'     format of 'grepprg' output
 'grepprg'	  'gp'	    program to use for ":grep"
 'guicursor'	  'gcr'     GUI: settings for cursor shape and blinking
@@ -812,7 +808,6 @@ Short explanation of each option:		*option-list*
 'omnifunc'	  'ofu'     function for filetype-specific completion
 'opendevice'	  'odev'    allow reading/writing devices on MS-Windows
 'operatorfunc'	  'opfunc'  function to be called for |g@| operator
-'osfiletype'	  'oft'     no longer supported
 'packpath'	  'pp'      list of directories used for packages
 'paragraphs'	  'para'    nroff macros that separate paragraphs
 'paste'			    allow pasting text
diff --git a/runtime/optwin.vim b/runtime/optwin.vim
index 2cbbd28..0a0f048 100644
--- a/runtime/optwin.vim
+++ b/runtime/optwin.vim
@@ -1273,10 +1273,6 @@ call append("$", "exrc\tenable reading .vimrc/.exrc/.gvimrc in the current direc
 call <SID>BinOptionG("ex", &ex)
 call append("$", "secure\tsafer working with script files in the current directory")
 call <SID>BinOptionG("secure", &secure)
-call append("$", "gdefault\tuse the 'g' flag for \":substitute\"")
-call <SID>BinOptionG("gd", &gd)
-call append("$", "edcompatible\t'g' and 'c' flags of \":substitute\" toggle")
-call <SID>BinOptionG("ed", &ed)
 if exists("+opendevice")
   call append("$", "opendevice\tallow reading/writing devices")
   call <SID>BinOptionG("odev", &odev)
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index 309474c..7b519d6 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -4961,14 +4961,8 @@ do_sub(exarg_T *eap)
 	++cmd;
     else
     {
-	if (!p_ed)
-	{
-	    if (p_gd)		/* default is global on */
-		subflags.do_all = TRUE;
-	    else
-		subflags.do_all = FALSE;
-	    subflags.do_ask = FALSE;
-	}
+	subflags.do_all = FALSE;
+	subflags.do_ask = FALSE;
 	subflags.do_error = TRUE;
 	subflags.do_print = FALSE;
 	subflags.do_count = FALSE;
@@ -4978,8 +4972,7 @@ do_sub(exarg_T *eap)
     while (*cmd)
     {
 	/*
-	 * Note that 'g' and 'c' are always inverted, also when p_ed is off.
-	 * 'r' is never inverted.
+	 * Note that 'g' and 'c' are always inverted.  'r' is never inverted.
 	 */
 	if (*cmd == 'g')
 	    subflags.do_all = !subflags.do_all;
diff --git a/src/option.c b/src/option.c
index f9d2734..00bb7fd 100644
--- a/src/option.c
+++ b/src/option.c
@@ -1084,7 +1084,7 @@ static struct vimoption options[] =
 #endif
 			    SCRIPTID_INIT},
     {"edcompatible","ed",   P_BOOL|P_VI_DEF,
-			    (char_u *)&p_ed, PV_NONE,
+			    (char_u *)NULL, PV_NONE,
 			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
     {"emoji",  "emo",	    P_BOOL|P_VI_DEF|P_RCLR,
 #if defined(FEAT_MBYTE)
@@ -1366,7 +1366,7 @@ static struct vimoption options[] =
 #endif
 			    SCRIPTID_INIT},
     {"gdefault",    "gd",   P_BOOL|P_VI_DEF|P_VIM,
-			    (char_u *)&p_gd, PV_NONE,
+			    (char_u *)NULL, PV_NONE,
 			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
     {"graphic",	    "gr",   P_BOOL|P_VI_DEF,
 			    (char_u *)NULL, PV_NONE,
diff --git a/src/option.h b/src/option.h
index 2c6aeef..ad49178 100644
--- a/src/option.h
+++ b/src/option.h
@@ -459,7 +459,6 @@ static char *(p_dy_values[]) = {"lastline", "truncate", "uhex", NULL};
 #define DY_LASTLINE		0x001
 #define DY_TRUNCATE		0x002
 #define DY_UHEX			0x004
-EXTERN int	p_ed;		/* 'edcompatible' */
 #ifdef FEAT_WINDOWS
 EXTERN char_u	*p_ead;		/* 'eadirection' */
 #endif
@@ -508,7 +507,6 @@ EXTERN char_u	*p_fp;		/* 'formatprg' */
 #ifdef HAVE_FSYNC
 EXTERN int	p_fs;		/* 'fsync' */
 #endif
-EXTERN int	p_gd;		/* 'gdefault' */
 #ifdef FEAT_PRINTER
 EXTERN char_u	*p_pdev;	/* 'printdevice' */
 # ifdef FEAT_POSTSCRIPT

Raspunde prin e-mail lui