'inccommand': buftype=nofile, restore cursor/view

- Use a standard scratch buffer instead of a new 'buftype', functions
  like curbufIsChanged() already have special handling for scratch bufs.
- Cleanup some stuff from the previous merge.
- Add support for :smagic, :snomagic. Closes #5578
This commit is contained in:
Justin M. Keyes
2016-11-09 12:08:49 +01:00
parent 0213e99aaf
commit 2e1217da46
9 changed files with 73 additions and 42 deletions

View File

@@ -1155,21 +1155,14 @@ A jump table for the options with a short description can be found at |Q_op|.
*'buftype'* *'bt'* *E382*
'buftype' 'bt' string (default: "")
local to buffer
{not available when compiled without the |+quickfix|
feature}
The value of this option specifies the type of a buffer:
<empty> normal buffer
nofile buffer which is not related to a file and will not be
written
nowrite buffer which will not be written
acwrite buffer which will always be written with BufWriteCmd
autocommands.
quickfix quickfix buffer, contains list of errors |:cwindow|
or list of locations |:lwindow|
help help buffer (you are not supposed to set this
manually)
terminal terminal buffer, this is set automatically when a
terminal is created. |terminal-emulator|
acwrite buffer will always be written with |BufWriteCmd|s
help help buffer (do not set this manually)
nofile buffer is not related to a file, will not be written
nowrite buffer will not be written
quickfix list of errors |:cwindow| or locations |:lwindow|
terminal |terminal-emulator| buffer
This option is used together with 'bufhidden' and 'swapfile' to
specify special kinds of buffers. See |special-buffers|.
@@ -3420,10 +3413,10 @@ A jump table for the options with a short description can be found at |Q_op|.
'inccommand' 'icm' string (default "")
global
"nosplit" : Shows the effects of a command incrementally, as you type.
"split" : Also shows partial off-screen results in a preview window.
"nosplit": Shows the effects of a command incrementally, as you type.
"split" : Also shows partial off-screen results in a preview window.
Currently only works for |:substitute|. |hl-Substitute|
Works for |:substitute|, |:smagic|, |:snomagic|. |hl-Substitute|
*'include'* *'inc'*
'include' 'inc' string (default "^\s*#\s*include")

View File

@@ -56,7 +56,7 @@ syn keyword vimGroup contained Comment Constant String Character Number Boolean
syn keyword vimHLGroup contained ColorColumn Cursor CursorColumn CursorIM CursorLine CursorLineNr DiffAdd DiffChange DiffDelete DiffText Directory ErrorMsg FoldColumn Folded IncSearch LineNr MatchParen Menu ModeMsg MoreMsg NonText Normal Pmenu PmenuSbar PmenuSel PmenuThumb Question Scrollbar Search SignColumn SpecialKey SpellBad SpellCap SpellLocal SpellRare StatusLine StatusLineNC TabLine TabLineFill TabLineSel Title Tooltip VertSplit Visual WarningMsg WildMenu
syn match vimHLGroup contained "Conceal"
syn keyword vimOnlyHLGroup contained VisualNOS
syn keyword nvimHLGroup contained EndOfBuffer IncSubstitute TermCursor TermCursorNC QuickFixLine
syn keyword nvimHLGroup contained EndOfBuffer Substitute TermCursor TermCursorNC QuickFixLine
"}}}2
syn case match
" Special Vim Highlighting (not automatic) {{{1