mirror of
				https://github.com/neovim/neovim.git
				synced 2025-10-26 12:27:24 +00:00 
			
		
		
		
	defaults: 'showcmd', 'belloff', 'ruler'
- Vim "unix default" of 'noshowcmd' is serving few users. And it's inconsistent. - 'ruler' and 'belloff=all' improve the out-of-the-box experience. - Continue to use 'noshowcmd' and 'noruler' by default in the functional tests to keep them fast. TODO: Add a "disable slow stuff" command or mapping to address the use-case of a very slow terminal connection.
This commit is contained in:
		| @@ -979,7 +979,7 @@ A jump table for the options with a short description can be found at |Q_op|. | ||||
| 'balloonexpr' 'bexpr'	Removed. {Nvim} | ||||
|  | ||||
| 						*'belloff'* *'bo'* | ||||
| 'belloff' 'bo'		string	(default "") | ||||
| 'belloff' 'bo'		string	(default "all") | ||||
| 			global | ||||
| 	Specifies for which events the bell will not be rung. It is a comma | ||||
| 	separated list of items. For each item that is present, the bell | ||||
| @@ -2186,9 +2186,8 @@ A jump table for the options with a short description can be found at |Q_op|. | ||||
| 	Ring the bell (beep or screen flash) for error messages.  This only | ||||
| 	makes a difference for error messages, the bell will be used always | ||||
| 	for a lot of errors without a message (e.g., hitting <Esc> in Normal | ||||
| 	mode).  See 'visualbell' on how to make the bell behave like a beep, | ||||
| 	screen flash or do nothing. See 'belloff' to finetune when to ring the | ||||
| 	bell. | ||||
| 	mode).  See 'visualbell' to make the bell behave like a screen flash | ||||
| 	or do nothing. See 'belloff' to finetune when to ring the bell. | ||||
|  | ||||
| 						*'errorfile'* *'ef'* | ||||
| 'errorfile' 'ef'	string	(default: "errors.err") | ||||
| @@ -4822,10 +4821,8 @@ A jump table for the options with a short description can be found at |Q_op|. | ||||
| 	The 'rightleft' option must be set for 'rightleftcmd' to take effect. | ||||
|  | ||||
| 					 *'ruler'* *'ru'* *'noruler'* *'noru'* | ||||
| 'ruler' 'ru'		boolean	(default off) | ||||
| 'ruler' 'ru'		boolean	(default on) | ||||
| 			global | ||||
| 			{not available when compiled without the | ||||
| 			|+cmdline_info| feature} | ||||
| 	Show the line and column number of the cursor position, separated by a | ||||
| 	comma.  When there is room, the relative position of the displayed | ||||
| 	text in the file is shown on the far right: | ||||
| @@ -5530,11 +5527,8 @@ A jump table for the options with a short description can be found at |Q_op|. | ||||
| 	"n" flag to 'cpoptions'. | ||||
|  | ||||
| 				     *'showcmd'* *'sc'* *'noshowcmd'* *'nosc'* | ||||
| 'showcmd' 'sc'		boolean	(Vim default: on (off for Unix), | ||||
| 				 Vi default: off) | ||||
| 'showcmd' 'sc'		boolean	(Vim default: on, Vi default: off) | ||||
| 			global | ||||
| 			{not available when compiled without the | ||||
| 			|+cmdline_info| feature} | ||||
| 	Show (partial) command in the last line of the screen.  Set this | ||||
| 	option off if your terminal is slow. | ||||
| 	In Visual mode the size of the selected area is shown: | ||||
| @@ -6709,14 +6703,7 @@ A jump table for the options with a short description can be found at |Q_op|. | ||||
| 			*'visualbell'* *'vb'* *'novisualbell'* *'novb'* *beep* | ||||
| 'visualbell' 'vb'	boolean	(default off) | ||||
| 			global | ||||
| 	Use visual bell instead of beeping.  The terminal code to display the | ||||
| 	visual bell is given with 't_vb'.  When no beep or flash is wanted, | ||||
| 	use ":set vb t_vb=". | ||||
| 	Note: When the GUI starts, 't_vb' is reset to its default value.  You | ||||
| 	might want to set it again in your |gvimrc|. | ||||
| 	In the GUI, 't_vb' defaults to "<Esc>|f", which inverts the display | ||||
| 	for 20 msec.  If you want to use a different time, use "<Esc>|40f", | ||||
| 	where 40 is the time in msec.  Also see 'errorbells'. | ||||
| 	Use visual bell instead of beeping.  Also see 'errorbells'. | ||||
|  | ||||
| 						*'warn'* *'nowarn'* | ||||
| 'warn'			boolean	(default on) | ||||
|   | ||||
| @@ -37,6 +37,7 @@ these differences. | ||||
| - 'autoread' is set by default | ||||
| - 'backspace' defaults to "indent,eol,start" | ||||
| - 'backupdir' defaults to .,~/.local/share/nvim/backup (|xdg|) | ||||
| - 'belloff' defaults to "all" | ||||
| - 'complete' doesn't include "i" | ||||
| - 'directory' defaults to ~/.local/share/nvim/swap// (|xdg|), auto-created | ||||
| - 'display' defaults to "lastline" | ||||
| @@ -49,7 +50,9 @@ these differences. | ||||
| - 'listchars' defaults to "tab:> ,trail:-,nbsp:+" | ||||
| - 'nocompatible' is always set | ||||
| - 'nrformats' defaults to "bin,hex" | ||||
| - 'ruler' is set by default | ||||
| - 'sessionoptions' doesn't include "options" | ||||
| - 'showcmd' is set by default | ||||
| - 'smarttab' is set by default | ||||
| - 'tabpagemax' defaults to 50 | ||||
| - 'tags' defaults to "./tags;,tags" | ||||
|   | ||||
| @@ -190,7 +190,7 @@ return { | ||||
|       type='string', list='comma', scope={'global'}, | ||||
|       vi_def=true, | ||||
|       varname='p_bo', | ||||
|       defaults={if_true={vi=""}} | ||||
|       defaults={if_true={vi="all"}} | ||||
|     }, | ||||
|     { | ||||
|       full_name='binary', abbreviation='bin', | ||||
| @@ -1883,7 +1883,7 @@ return { | ||||
|       vim=true, | ||||
|       redraw={'statuslines'}, | ||||
|       varname='p_ru', | ||||
|       defaults={if_true={vi=false}} | ||||
|       defaults={if_true={vi=true}} | ||||
|     }, | ||||
|     { | ||||
|       full_name='rulerformat', abbreviation='ruf', | ||||
| @@ -2119,11 +2119,7 @@ return { | ||||
|       type='bool', scope={'global'}, | ||||
|       vim=true, | ||||
|       varname='p_sc', | ||||
|       defaults={ | ||||
|         condition='UNIX', | ||||
|         if_true={vi=false, vim=false}, | ||||
|         if_false={vi=false, vim=true}, | ||||
|       } | ||||
|       defaults={if_true={vi=false, vim=true}} | ||||
|     }, | ||||
|     { | ||||
|       full_name='showfulltag', abbreviation='sft', | ||||
|   | ||||
| @@ -1,5 +1,9 @@ | ||||
| " Common preparations for running tests. | ||||
|  | ||||
| set noruler | ||||
| set noshowcmd | ||||
| set belloff= | ||||
|  | ||||
| " Make sure 'runtimepath' does not include $HOME. | ||||
| set rtp=$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after | ||||
|  | ||||
|   | ||||
| @@ -7,14 +7,10 @@ local ok, set_session, spawn = helpers.ok, helpers.set_session, helpers.spawn | ||||
|  | ||||
| local shada_file = 'test.shada' | ||||
|  | ||||
| -- | ||||
| -- helpers.clear() uses "-i NONE", which is not useful for this test. | ||||
| -- | ||||
| local function _clear() | ||||
|   set_session(spawn({nvim_prog, | ||||
|                      '-u', 'NONE', | ||||
|                      '--cmd', 'set noswapfile undodir=. directory=. viewdir=. backupdir=.', | ||||
|                      '--embed'})) | ||||
|   set_session(spawn({nvim_prog, '--embed', '-u', 'NONE', '--cmd', | ||||
|                      -- Need shada for these tests. | ||||
|                      'set noswapfile undodir=. directory=. viewdir=. backupdir=. belloff= noshowcmd noruler'})) | ||||
| end | ||||
|  | ||||
| describe(':oldfiles', function() | ||||
| @@ -63,7 +59,7 @@ describe(':browse oldfiles', function() | ||||
|     _clear() | ||||
|     execute('rshada! ' .. shada_file) | ||||
|  | ||||
|     -- Ensure nvim is out of "Press ENTER..." screen | ||||
|     -- Ensure nvim is out of "Press ENTER..." prompt. | ||||
|     feed('<cr>') | ||||
|  | ||||
|     -- Ensure v:oldfiles isn't busted.  Since things happen so fast, | ||||
|   | ||||
| @@ -20,9 +20,12 @@ local filter = global_helpers.filter | ||||
| local start_dir = lfs.currentdir() | ||||
| -- XXX: NVIM_PROG takes precedence, QuickBuild sets it. | ||||
| local nvim_prog = os.getenv('NVIM_PROG') or os.getenv('NVIM_PRG') or 'build/bin/nvim' | ||||
| -- Default settings for the test session. | ||||
| local nvim_set  = 'set shortmess+=I background=light noswapfile noautoindent' | ||||
|                   ..' laststatus=1 undodir=. directory=. viewdir=. backupdir=.' | ||||
|                   ..' belloff= noshowcmd noruler' | ||||
| local nvim_argv = {nvim_prog, '-u', 'NONE', '-i', 'NONE', '-N', | ||||
|                    '--cmd', 'set shortmess+=I background=light noswapfile noautoindent laststatus=1 undodir=. directory=. viewdir=. backupdir=.', | ||||
|                    '--embed'} | ||||
|                    '--cmd', nvim_set, '--embed'} | ||||
|  | ||||
| local mpack = require('mpack') | ||||
|  | ||||
| @@ -597,6 +600,7 @@ local M = { | ||||
|   nvim = nvim, | ||||
|   nvim_async = nvim_async, | ||||
|   nvim_prog = nvim_prog, | ||||
|   nvim_set = nvim_set, | ||||
|   nvim_dir = nvim_dir, | ||||
|   buffer = buffer, | ||||
|   window = window, | ||||
|   | ||||
| @@ -11,9 +11,7 @@ local neq = helpers.neq | ||||
|  | ||||
| local function init_session(...) | ||||
|   local args = { helpers.nvim_prog, '-i', 'NONE', '--embed', | ||||
|     '--cmd', 'set shortmess+=I background=light noswapfile noautoindent', | ||||
|     '--cmd', 'set laststatus=1 undodir=. directory=. viewdir=. backupdir=.' | ||||
|     } | ||||
|                  '--cmd', helpers.nvim_set } | ||||
|   for _, v in ipairs({...}) do | ||||
|     table.insert(args, v) | ||||
|   end | ||||
|   | ||||
| @@ -10,7 +10,7 @@ local function nvim_argv(shada_file) | ||||
|   local rtp_value = ('\'%s/runtime\''):format( | ||||
|       paths.test_source_path:gsub('\'', '\'\'')) | ||||
|   local nvim_args = {nvim_prog, '-u', 'NORC', '-i', shada_file or 'NONE', '-N', | ||||
|                      '--cmd', 'set shortmess+=I background=light noswapfile', | ||||
|                      '--cmd', 'set shortmess+=I background=light noswapfile belloff= noshowcmd noruler', | ||||
|                      '--cmd', 'let &runtimepath=' .. rtp_value, | ||||
|                      '--cmd', additional_cmd, | ||||
|                      '--embed'} | ||||
| @@ -23,7 +23,7 @@ end | ||||
|  | ||||
| local session = nil | ||||
|  | ||||
| local reset = function(...) | ||||
| local function reset(...) | ||||
|   if session then | ||||
|     session:close() | ||||
|   end | ||||
| @@ -31,7 +31,7 @@ local reset = function(...) | ||||
|   set_session(session) | ||||
| end | ||||
|  | ||||
| local set_additional_cmd = function(s) | ||||
| local function set_additional_cmd(s) | ||||
|   additional_cmd = s | ||||
| end | ||||
|  | ||||
|   | ||||
| @@ -12,7 +12,7 @@ describe('api', function() | ||||
|     helpers.clear() | ||||
|     os.remove(socket_name) | ||||
|     screen = child_session.screen_setup(0, '["'..helpers.nvim_prog | ||||
|       ..'", "-u", "NONE", "-i", "NONE", "--cmd", "set noswapfile"]') | ||||
|       ..'", "-u", "NONE", "-i", "NONE", "--cmd", "'..helpers.nvim_set..'"]') | ||||
|   end) | ||||
|   after_each(function() | ||||
|     os.remove(socket_name) | ||||
| @@ -28,7 +28,7 @@ describe('api', function() | ||||
|       {4:~                                                 }| | ||||
|       {4:~                                                 }| | ||||
|       {4:~                                                 }| | ||||
|       {5:[No Name]                                         }| | ||||
|       {4:~                                                 }| | ||||
|       ]]..socket_name..[[                         | | ||||
|       {3:-- TERMINAL --}                                    | | ||||
|     ]]) | ||||
| @@ -43,7 +43,7 @@ describe('api', function() | ||||
|       {4:~                                                 }| | ||||
|       {4:~                                                 }| | ||||
|       {4:~                                                 }| | ||||
|       {5:[No Name] [+]                                     }| | ||||
|       {4:~                                                 }| | ||||
|       {3:-- INSERT --}                                      | | ||||
|       {3:-- TERMINAL --}                                    | | ||||
|     ]]) | ||||
| @@ -59,7 +59,7 @@ describe('api', function() | ||||
|       [socket 1] this is more t{4:                         }| | ||||
|       han 25 columns           {4:                         }| | ||||
|       [socket 2] input{1: }        {4:                         }| | ||||
|       {5:[No Name] [+]                                     }| | ||||
|       {4:~                                                 }| | ||||
|       {3:-- INSERT --}                                      | | ||||
|       {3:-- TERMINAL --}                                    | | ||||
|     ]]) | ||||
|   | ||||
| @@ -13,7 +13,8 @@ describe('tui', function() | ||||
|  | ||||
|   before_each(function() | ||||
|     helpers.clear() | ||||
|     screen = thelpers.screen_setup(0, '["'..helpers.nvim_prog..'", "-u", "NONE", "-i", "NONE", "--cmd", "set noswapfile"]') | ||||
|     screen = thelpers.screen_setup(0, '["'..helpers.nvim_prog | ||||
|       ..'", "-u", "NONE", "-i", "NONE", "--cmd", "set noswapfile noshowcmd noruler"]') | ||||
|     -- right now pasting can be really slow in the TUI, especially in ASAN. | ||||
|     -- this will be fixed later but for now we require a high timeout. | ||||
|     screen.timeout = 60000 | ||||
| @@ -177,7 +178,8 @@ describe('tui with non-tty file descriptors', function() | ||||
|   end) | ||||
|  | ||||
|   it('can handle pipes as stdout and stderr', function() | ||||
|     local screen = thelpers.screen_setup(0, '"'..helpers.nvim_prog..' -u NONE -i NONE --cmd \'set noswapfile\' --cmd \'normal iabc\' > /dev/null 2>&1 && cat testF && rm testF"') | ||||
|     local screen = thelpers.screen_setup(0, '"'..helpers.nvim_prog | ||||
|       ..' -u NONE -i NONE --cmd \'set noswapfile noshowcmd noruler\' --cmd \'normal iabc\' > /dev/null 2>&1 && cat testF && rm testF"') | ||||
|     feed(':w testF\n:q\n') | ||||
|     screen:expect([[ | ||||
|       :w testF                                          | | ||||
| @@ -196,7 +198,8 @@ describe('tui focus event handling', function() | ||||
|  | ||||
|   before_each(function() | ||||
|     helpers.clear() | ||||
|     screen = thelpers.screen_setup(0, '["'..helpers.nvim_prog..'", "-u", "NONE", "-i", "NONE", "--cmd", "set noswapfile"]') | ||||
|     screen = thelpers.screen_setup(0, '["'..helpers.nvim_prog | ||||
|       ..'", "-u", "NONE", "-i", "NONE", "--cmd", "set noswapfile noshowcmd noruler"]') | ||||
|     execute('autocmd FocusGained * echo "gained"') | ||||
|     execute('autocmd FocusLost * echo "lost"') | ||||
|   end) | ||||
| @@ -313,7 +316,7 @@ describe("tui 't_Co' (terminal colors)", function() | ||||
|     -- This is ugly because :term/termopen() forces TERM=xterm-256color. | ||||
|     -- TODO: Revisit this after jobstart/termopen accept `env` dict. | ||||
|     screen = thelpers.screen_setup(0, string.format( | ||||
|       [=[['sh', '-c', 'LANG=C TERM=%s %s %s -u NONE -i NONE --cmd "silent set noswapfile"']]=], | ||||
|       [=[['sh', '-c', 'LANG=C TERM=%s %s %s -u NONE -i NONE --cmd "silent set noswapfile noshowcmd noruler"']]=], | ||||
|       term, | ||||
|       (colorterm ~= nil and "COLORTERM="..colorterm or ""), | ||||
|       helpers.nvim_prog)) | ||||
|   | ||||
| @@ -8,13 +8,13 @@ describe("shell command :!", function() | ||||
|   before_each(function() | ||||
|     session.clear() | ||||
|     screen = child_session.screen_setup(0, '["'..session.nvim_prog.. | ||||
|       '", "-u", "NONE", "-i", "NONE", "--cmd", "set noswapfile"]') | ||||
|       '", "-u", "NONE", "-i", "NONE", "--cmd", "'..session.nvim_set..'"]') | ||||
|     screen:expect([[ | ||||
|       {1: }                                                 | | ||||
|       {4:~                                                 }| | ||||
|       {4:~                                                 }| | ||||
|       {4:~                                                 }| | ||||
|       {5:[No Name]                                         }| | ||||
|       {4:~                                                 }| | ||||
|                                                         | | ||||
|       {3:-- TERMINAL --}                                    | | ||||
|     ]]) | ||||
| @@ -32,7 +32,7 @@ describe("shell command :!", function() | ||||
|     screen:expect([[ | ||||
|       {4:~                                                 }| | ||||
|       {4:~                                                 }| | ||||
|       {5:[No Name]                                         }| | ||||
|       {4:~                                                 }| | ||||
|       :!printf foo; sleep 200                           | | ||||
|                                                         | | ||||
|       foo                                               | | ||||
|   | ||||
| @@ -9,7 +9,7 @@ local eval = helpers.eval | ||||
| describe('Initial screen', function() | ||||
|   local screen | ||||
|   local nvim_argv = {helpers.nvim_prog, '-u', 'NONE', '-i', 'NONE', '-N', | ||||
|                      '--cmd', 'set shortmess+=I background=light noswapfile', | ||||
|                      '--cmd', 'set shortmess+=I background=light noswapfile belloff= noshowcmd noruler', | ||||
|                      '--embed'} | ||||
|  | ||||
|   before_each(function() | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Justin M. Keyes
					Justin M. Keyes