diff options
author | Gregory Anders <greg@gpanders.com> | 2021-08-17 12:12:47 -0600 |
---|---|---|
committer | Gregory Anders <greg@gpanders.com> | 2021-08-17 16:39:04 -0600 |
commit | d417e67e595a9eb19797866e91bb80b4fe299a94 (patch) | |
tree | 15b0f537d8ffd15b4603ec6addfedf4948b71023 | |
parent | f6c72b745cfbaaba80555de9a5d4b25f30f17ab2 (diff) | |
download | rneovim-d417e67e595a9eb19797866e91bb80b4fe299a94.tar.gz rneovim-d417e67e595a9eb19797866e91bb80b4fe299a94.tar.bz2 rneovim-d417e67e595a9eb19797866e91bb80b4fe299a94.zip |
feat(defaults): set nojoinspaces
-rw-r--r-- | runtime/doc/options.txt | 2 | ||||
-rw-r--r-- | runtime/doc/vim_diff.txt | 1 | ||||
-rw-r--r-- | src/nvim/options.lua | 2 | ||||
-rw-r--r-- | src/nvim/testdir/setup.vim | 1 | ||||
-rw-r--r-- | src/nvim/testdir/test_join.vim | 2 | ||||
-rw-r--r-- | test/functional/helpers.lua | 2 |
6 files changed, 7 insertions, 3 deletions
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index 555d4fd37b..10b849aa3e 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -3498,7 +3498,7 @@ A jump table for the options with a short description can be found at |Q_op|. |jumplist-stack| *'joinspaces'* *'js'* *'nojoinspaces'* *'nojs'* -'joinspaces' 'js' boolean (default on) +'joinspaces' 'js' boolean (default off) global Insert two spaces after a '.', '?' and '!' with a join command. Otherwise only one space is inserted. diff --git a/runtime/doc/vim_diff.txt b/runtime/doc/vim_diff.txt index 49996fd8b3..8487e1b0df 100644 --- a/runtime/doc/vim_diff.txt +++ b/runtime/doc/vim_diff.txt @@ -45,6 +45,7 @@ the differences. - 'history' defaults to 10000 (the maximum) - 'hlsearch' is enabled - 'incsearch' is enabled +- 'joinspaces' is disabled - 'langnoremap' is enabled - 'langremap' is disabled - 'laststatus' defaults to 2 (statusline is always shown) diff --git a/src/nvim/options.lua b/src/nvim/options.lua index 685c063e62..df2a8edc04 100644 --- a/src/nvim/options.lua +++ b/src/nvim/options.lua @@ -1288,7 +1288,7 @@ return { short_desc=N_("two spaces after a period with a join command"), type='bool', scope={'global'}, varname='p_js', - defaults={if_true=true} + defaults={if_true=false} }, { full_name='jumpoptions', abbreviation='jop', diff --git a/src/nvim/testdir/setup.vim b/src/nvim/testdir/setup.vim index 58ce0f1a4c..b3df8c63e6 100644 --- a/src/nvim/testdir/setup.vim +++ b/src/nvim/testdir/setup.vim @@ -12,6 +12,7 @@ set directory^=. set fillchars=vert:\|,fold:- set laststatus=1 set listchars=eol:$ +set joinspaces set nohidden smarttab noautoindent noautoread complete-=i noruler noshowcmd set nrformats+=octal set shortmess-=F diff --git a/src/nvim/testdir/test_join.vim b/src/nvim/testdir/test_join.vim index ac6ef8f29f..cdb0562756 100644 --- a/src/nvim/testdir/test_join.vim +++ b/src/nvim/testdir/test_join.vim @@ -35,6 +35,7 @@ endfunc " Tests for setting the '[,'] marks when joining lines. func Test_join_marks() + set joinspaces enew call append(0, [ \ "\t\tO sodales, ludite, vos qui", @@ -53,6 +54,7 @@ func Test_join_marks() call assert_equal([0, 4, 11, 0], getpos("'[")) call assert_equal([0, 4, 67, 0], getpos("']")) enew! + set nojoinspaces endfunc " Test for joining lines and marks in them diff --git a/test/functional/helpers.lua b/test/functional/helpers.lua index a1b464af13..5974e8897f 100644 --- a/test/functional/helpers.lua +++ b/test/functional/helpers.lua @@ -38,7 +38,7 @@ module.nvim_prog = ( module.nvim_set = ( 'set shortmess+=IS background=light noswapfile noautoindent startofline' ..' laststatus=1 undodir=. directory=. viewdir=. backupdir=.' - ..' belloff= wildoptions-=pum noshowcmd noruler nomore redrawdebug=invalid') + ..' belloff= wildoptions-=pum joinspaces noshowcmd noruler nomore redrawdebug=invalid') module.nvim_argv = { module.nvim_prog, '-u', 'NONE', '-i', 'NONE', '--cmd', module.nvim_set, |