mirror of
				https://github.com/neovim/neovim.git
				synced 2025-11-04 01:34:25 +00:00 
			
		
		
		
	@@ -976,7 +976,7 @@ to write anyway add a '!' to the command.
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
							*write-permissions*
 | 
												*write-permissions*
 | 
				
			||||||
When writing a new file the permissions are read-write.  For unix the mask is
 | 
					When writing a new file the permissions are read-write.  For unix the mask is
 | 
				
			||||||
0666 with additionally umask applied.  When writing a file that was read Vim
 | 
					0o666 with additionally umask applied.  When writing a file that was read Vim
 | 
				
			||||||
will preserve the permissions, but clear the s-bit.
 | 
					will preserve the permissions, but clear the s-bit.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
							*write-readonly*
 | 
												*write-readonly*
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1168,7 +1168,7 @@ x	A single character, with no special meaning, matches itself
 | 
				
			|||||||
		\b	<BS>
 | 
							\b	<BS>
 | 
				
			||||||
		\n	line break, see above |/[\n]|
 | 
							\n	line break, see above |/[\n]|
 | 
				
			||||||
		\d123	decimal number of character
 | 
							\d123	decimal number of character
 | 
				
			||||||
		\o40	octal number of character up to 0377
 | 
							\o40	octal number of character up to 0o377
 | 
				
			||||||
		\x20	hexadecimal number of character up to 0xff
 | 
							\x20	hexadecimal number of character up to 0xff
 | 
				
			||||||
		\u20AC	hex. number of multibyte character up to 0xffff
 | 
							\u20AC	hex. number of multibyte character up to 0xffff
 | 
				
			||||||
		\U1234	hex. number of multibyte character up to 0xffffffff
 | 
							\U1234	hex. number of multibyte character up to 0xffffffff
 | 
				
			||||||
@@ -1205,7 +1205,8 @@ x	A single character, with no special meaning, matches itself
 | 
				
			|||||||
\%d123	Matches the character specified with a decimal number.  Must be
 | 
					\%d123	Matches the character specified with a decimal number.  Must be
 | 
				
			||||||
	followed by a non-digit.
 | 
						followed by a non-digit.
 | 
				
			||||||
\%o40	Matches the character specified with an octal number up to 0377.
 | 
					\%o40	Matches the character specified with an octal number up to 0377.
 | 
				
			||||||
	Numbers below 040 must be followed by a non-octal digit or a non-digit.
 | 
						Numbers below 0o40 must be followed by a non-octal digit or a
 | 
				
			||||||
 | 
						non-digit.
 | 
				
			||||||
\%x2a	Matches the character specified with up to two hexadecimal characters.
 | 
					\%x2a	Matches the character specified with up to two hexadecimal characters.
 | 
				
			||||||
\%u20AC	Matches the character specified with up to four hexadecimal
 | 
					\%u20AC	Matches the character specified with up to four hexadecimal
 | 
				
			||||||
	characters.
 | 
						characters.
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -50,7 +50,7 @@ which moves to the previous end of a word:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	This is a line with example text ~
 | 
						This is a line with example text ~
 | 
				
			||||||
	   <----<----x---->------------>
 | 
						   <----<----x---->------------>
 | 
				
			||||||
	   2ge   ge     e       we
 | 
						   2ge   ge     e       2e
 | 
				
			||||||
 | 
					
 | 
				
			||||||
If you are at the last word of a line, the "w" command will take you to the
 | 
					If you are at the last word of a line, the "w" command will take you to the
 | 
				
			||||||
first word in the next line.  Thus you can use this to move through a
 | 
					first word in the next line.  Thus you can use this to move through a
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -122,14 +122,14 @@ starts with a zero.  "017" is decimal 15.  A binary number starts with "0b" or
 | 
				
			|||||||
decimal number, it will be interpreted as an octal number!
 | 
					decimal number, it will be interpreted as an octal number!
 | 
				
			||||||
   The ":echo" command always prints decimal numbers.  Example: >
 | 
					   The ":echo" command always prints decimal numbers.  Example: >
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	:echo 0x7f 036
 | 
						:echo 0x7f 0o36
 | 
				
			||||||
<	127 30 ~
 | 
					<	127 30 ~
 | 
				
			||||||
 | 
					
 | 
				
			||||||
A number is made negative with a minus sign.  This also works for hexadecimal,
 | 
					A number is made negative with a minus sign.  This also works for hexadecimal,
 | 
				
			||||||
octal and binary numbers.  A minus sign is also used for subtraction.  Compare
 | 
					octal and binary numbers.  A minus sign is also used for subtraction.  Compare
 | 
				
			||||||
this with the previous example: >
 | 
					this with the previous example: >
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	:echo 0x7f -036
 | 
						:echo 0x7f -0o36
 | 
				
			||||||
<	97 ~
 | 
					<	97 ~
 | 
				
			||||||
 | 
					
 | 
				
			||||||
White space in an expression is ignored.  However, it's recommended to use it
 | 
					White space in an expression is ignored.  However, it's recommended to use it
 | 
				
			||||||
@@ -137,7 +137,7 @@ for separating items, to make the expression easier to read.  For example, to
 | 
				
			|||||||
avoid the confusion with a negative number above, put a space between the
 | 
					avoid the confusion with a negative number above, put a space between the
 | 
				
			||||||
minus sign and the following number: >
 | 
					minus sign and the following number: >
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	:echo 0x7f - 036
 | 
						:echo 0x7f - 0o36
 | 
				
			||||||
 | 
					
 | 
				
			||||||
==============================================================================
 | 
					==============================================================================
 | 
				
			||||||
*41.2*	Variables
 | 
					*41.2*	Variables
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,87 +1,83 @@
 | 
				
			|||||||
" Vim ftplugin file
 | 
					" Vim ftplugin file
 | 
				
			||||||
" Language:     Erlang
 | 
					" Language:     Erlang (http://www.erlang.org)
 | 
				
			||||||
 | 
					" Maintainer:   Csaba Hoch <csaba.hoch@gmail.com>
 | 
				
			||||||
" Author:       Oscar Hellström <oscar@oscarh.net>
 | 
					" Author:       Oscar Hellström <oscar@oscarh.net>
 | 
				
			||||||
" Contributors: Ricardo Catalinas Jiménez <jimenezrick@gmail.com>
 | 
					" Contributors: Ricardo Catalinas Jiménez <jimenezrick@gmail.com>
 | 
				
			||||||
"               Eduardo Lopez (http://github.com/tapichu)
 | 
					"               Eduardo Lopez (http://github.com/tapichu)
 | 
				
			||||||
 | 
					"               Arvid Bjurklint (http://github.com/slarwise)
 | 
				
			||||||
 | 
					" Last Update:  2021-Jan-08
 | 
				
			||||||
" License:      Vim license
 | 
					" License:      Vim license
 | 
				
			||||||
" Version:      2012/01/25
 | 
					" URL:          https://github.com/vim-erlang/vim-erlang-runtime
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if exists('b:did_ftplugin')
 | 
					if exists('b:did_ftplugin')
 | 
				
			||||||
	finish
 | 
					  finish
 | 
				
			||||||
else
 | 
					 | 
				
			||||||
	let b:did_ftplugin = 1
 | 
					 | 
				
			||||||
endif
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
if exists('s:did_function_definitions')
 | 
					 | 
				
			||||||
	call s:SetErlangOptions()
 | 
					 | 
				
			||||||
	finish
 | 
					 | 
				
			||||||
else
 | 
					 | 
				
			||||||
	let s:did_function_definitions = 1
 | 
					 | 
				
			||||||
endif
 | 
					endif
 | 
				
			||||||
 | 
					let b:did_ftplugin = 1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
let s:cpo_save = &cpo
 | 
					let s:cpo_save = &cpo
 | 
				
			||||||
set cpo&vim
 | 
					set cpo&vim
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if !exists('g:erlang_keywordprg')
 | 
					let &l:keywordprg = get(g:, 'erlang_keywordprg', 'erl -man')
 | 
				
			||||||
	let g:erlang_keywordprg = 'erl -man'
 | 
					
 | 
				
			||||||
 | 
					if get(g:, 'erlang_folding', 0)
 | 
				
			||||||
 | 
					  setlocal foldmethod=expr
 | 
				
			||||||
 | 
					  setlocal foldexpr=GetErlangFold(v:lnum)
 | 
				
			||||||
 | 
					  setlocal foldtext=ErlangFoldText()
 | 
				
			||||||
endif
 | 
					endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if !exists('g:erlang_folding')
 | 
					setlocal comments=:%%%,:%%,:%
 | 
				
			||||||
	let g:erlang_folding = 0
 | 
					setlocal commentstring=%%s
 | 
				
			||||||
endif
 | 
					
 | 
				
			||||||
 | 
					setlocal formatoptions+=ro
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					setlocal suffixesadd=.erl,.hrl
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					let &l:include = '^\s*-\%(include\|include_lib\)\s*("\zs\f*\ze")'
 | 
				
			||||||
 | 
					let &l:define  = '^\s*-\%(define\|record\|type\|opaque\)'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
let s:erlang_fun_begin = '^\a\w*(.*$'
 | 
					let s:erlang_fun_begin = '^\a\w*(.*$'
 | 
				
			||||||
let s:erlang_fun_end   = '^[^%]*\.\s*\(%.*\)\?$'
 | 
					let s:erlang_fun_end   = '^[^%]*\.\s*\(%.*\)\?$'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
function s:SetErlangOptions()
 | 
					if !exists('*GetErlangFold')
 | 
				
			||||||
	if g:erlang_folding
 | 
					  function GetErlangFold(lnum)
 | 
				
			||||||
		setlocal foldmethod=expr
 | 
					    let lnum = a:lnum
 | 
				
			||||||
		setlocal foldexpr=GetErlangFold(v:lnum)
 | 
					    let line = getline(lnum)
 | 
				
			||||||
		setlocal foldtext=ErlangFoldText()
 | 
					 | 
				
			||||||
	endif
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
	setlocal comments=:%%%,:%%,:%
 | 
					    if line =~ s:erlang_fun_end
 | 
				
			||||||
	setlocal commentstring=%%s
 | 
					      return '<1'
 | 
				
			||||||
 | 
					    endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	setlocal formatoptions+=ro
 | 
					    if line =~ s:erlang_fun_begin && foldlevel(lnum - 1) == 1
 | 
				
			||||||
	let &l:keywordprg = g:erlang_keywordprg
 | 
					      return '1'
 | 
				
			||||||
endfunction
 | 
					    endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
function GetErlangFold(lnum)
 | 
					    if line =~ s:erlang_fun_begin
 | 
				
			||||||
	let lnum = a:lnum
 | 
					      return '>1'
 | 
				
			||||||
	let line = getline(lnum)
 | 
					    endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if line =~ s:erlang_fun_end
 | 
					    return '='
 | 
				
			||||||
		return '<1'
 | 
					  endfunction
 | 
				
			||||||
	endif
 | 
					endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if line =~ s:erlang_fun_begin && foldlevel(lnum - 1) == 1
 | 
					if !exists('*ErlangFoldText')
 | 
				
			||||||
		return '1'
 | 
					  function ErlangFoldText()
 | 
				
			||||||
	endif
 | 
					    let line    = getline(v:foldstart)
 | 
				
			||||||
 | 
					    let foldlen = v:foldend - v:foldstart + 1
 | 
				
			||||||
 | 
					    let lines   = ' ' . foldlen . ' lines: ' . substitute(line, "[\ \t]*", '', '')
 | 
				
			||||||
 | 
					    if foldlen < 10
 | 
				
			||||||
 | 
					      let lines = ' ' . lines
 | 
				
			||||||
 | 
					    endif
 | 
				
			||||||
 | 
					    let retval = '+' . v:folddashes . lines
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if line =~ s:erlang_fun_begin
 | 
					    return retval
 | 
				
			||||||
		return '>1'
 | 
					  endfunction
 | 
				
			||||||
	endif
 | 
					endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	return '='
 | 
					let b:undo_ftplugin = "setlocal keywordprg< foldmethod< foldexpr< foldtext<"
 | 
				
			||||||
endfunction
 | 
					      \ . " comments< commentstring< formatoptions< suffixesadd< include<"
 | 
				
			||||||
 | 
					      \ . " define<"
 | 
				
			||||||
function ErlangFoldText()
 | 
					 | 
				
			||||||
	let line    = getline(v:foldstart)
 | 
					 | 
				
			||||||
	let foldlen = v:foldend - v:foldstart + 1
 | 
					 | 
				
			||||||
	let lines   = ' ' . foldlen . ' lines: ' . substitute(line, "[\ \t]*", '', '')
 | 
					 | 
				
			||||||
	if foldlen < 10
 | 
					 | 
				
			||||||
		let lines = ' ' . lines
 | 
					 | 
				
			||||||
	endif
 | 
					 | 
				
			||||||
	let retval = '+' . v:folddashes . lines
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return retval
 | 
					 | 
				
			||||||
endfunction
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
call s:SetErlangOptions()
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
let b:undo_ftplugin = "setlocal foldmethod< foldexpr< foldtext<"
 | 
					 | 
				
			||||||
	\ . " comments< commentstring< formatoptions<"
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
let &cpo = s:cpo_save
 | 
					let &cpo = s:cpo_save
 | 
				
			||||||
unlet s:cpo_save
 | 
					unlet s:cpo_save
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					" vim: sw=2 et
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -2,7 +2,7 @@
 | 
				
			|||||||
" Language: fstab file
 | 
					" Language: fstab file
 | 
				
			||||||
" Maintainer: Radu Dineiu <radu.dineiu@gmail.com>
 | 
					" Maintainer: Radu Dineiu <radu.dineiu@gmail.com>
 | 
				
			||||||
" URL: https://raw.github.com/rid9/vim-fstab/master/ftplugin/fstab.vim
 | 
					" URL: https://raw.github.com/rid9/vim-fstab/master/ftplugin/fstab.vim
 | 
				
			||||||
" Last Change: 2020 Dec 29
 | 
					" Last Change: 2021 Jan 02
 | 
				
			||||||
" Version: 1.0
 | 
					" Version: 1.0
 | 
				
			||||||
"
 | 
					"
 | 
				
			||||||
" Credits:
 | 
					" Credits:
 | 
				
			||||||
@@ -16,4 +16,4 @@ let b:did_ftplugin = 1
 | 
				
			|||||||
setlocal commentstring=#%s
 | 
					setlocal commentstring=#%s
 | 
				
			||||||
let b:undo_ftplugin = "setlocal commentstring<"
 | 
					let b:undo_ftplugin = "setlocal commentstring<"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
" vim: ts=8 ft=vim
 | 
					" vim: ts=8 ft=vim
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -6,7 +6,16 @@
 | 
				
			|||||||
" See https://swift.org/LICENSE.txt for license information
 | 
					" See https://swift.org/LICENSE.txt for license information
 | 
				
			||||||
" See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
 | 
					" See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
 | 
				
			||||||
"
 | 
					"
 | 
				
			||||||
" Vim maintainer: Emir SARI <bitigchi@me.com>
 | 
					" Vim maintainer: 	Emir SARI <bitigchi@me.com>
 | 
				
			||||||
 | 
					" Last Change:		2021 Jan 08
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					" Only do this when not done yet for this buffer
 | 
				
			||||||
 | 
					if exists("b:did_ftplugin")
 | 
				
			||||||
 | 
					    finish
 | 
				
			||||||
 | 
					endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					let b:did_ftplugin = 1
 | 
				
			||||||
 | 
					let b:undo_ftplugin = "setlocal comments< expandtab< tabstop< shiftwidth< smartindent<"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
setlocal comments=s1:/*,mb:*,ex:*/,:///,://
 | 
					setlocal comments=s1:/*,mb:*,ex:*/,:///,://
 | 
				
			||||||
setlocal expandtab
 | 
					setlocal expandtab
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
" Vim filetype plugin
 | 
					" Vim filetype plugin
 | 
				
			||||||
" Language:	Vim
 | 
					" Language:	Vim
 | 
				
			||||||
" Maintainer:	Bram Moolenaar <Bram@vim.org>
 | 
					" Maintainer:	Bram Moolenaar <Bram@vim.org>
 | 
				
			||||||
" Last Change:	2020 Aug 14
 | 
					" Last Change:	2021 Jan 05
 | 
				
			||||||
 | 
					
 | 
				
			||||||
" Only do this when not done yet for this buffer
 | 
					" Only do this when not done yet for this buffer
 | 
				
			||||||
if exists("b:did_ftplugin")
 | 
					if exists("b:did_ftplugin")
 | 
				
			||||||
@@ -48,18 +48,24 @@ setlocal isk+=#
 | 
				
			|||||||
" Use :help to lookup the keyword under the cursor with K.
 | 
					" Use :help to lookup the keyword under the cursor with K.
 | 
				
			||||||
setlocal keywordprg=:help
 | 
					setlocal keywordprg=:help
 | 
				
			||||||
 | 
					
 | 
				
			||||||
" Set 'comments' to format dashed lists in comments
 | 
					" if "\n" .. getline(1, 10)->join("\n") =~# '\n\s*vim9\%[script]\>'
 | 
				
			||||||
" Avoid that #{} starts a comment.
 | 
					if "\n" .. join(getline(1, 10), "\n") =~# '\n\s*vim9\%[script]\>'
 | 
				
			||||||
setlocal com=sO:\"\ -,mO:\"\ \ ,sO:#\ -,mO:#\ \ ,eO:##,:\",b:#
 | 
					  " Set 'comments' to format dashed lists in comments
 | 
				
			||||||
 | 
					  setlocal com=sO:#\ -,mO:#\ \ ,eO:##,:#
 | 
				
			||||||
 | 
					  " Comments start with a double quote in a legacy script;
 | 
				
			||||||
 | 
					  " with # in a Vim9 script
 | 
				
			||||||
 | 
					  setlocal commentstring=\"%s
 | 
				
			||||||
 | 
					else
 | 
				
			||||||
 | 
					  setlocal com=sO:\"\ -,mO:\"\ \ ,:\"
 | 
				
			||||||
 | 
					  setlocal commentstring=#%s
 | 
				
			||||||
 | 
					endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
" Format comments to be up to 78 characters long
 | 
					" Format comments to be up to 78 characters long
 | 
				
			||||||
if &tw == 0
 | 
					if &tw == 0
 | 
				
			||||||
  setlocal tw=78
 | 
					  setlocal tw=78
 | 
				
			||||||
endif
 | 
					endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
" Comments start with a double quote; in Vim9 script # would also work
 | 
					 | 
				
			||||||
setlocal commentstring=\"%s
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
" Prefer Vim help instead of manpages.
 | 
					" Prefer Vim help instead of manpages.
 | 
				
			||||||
setlocal keywordprg=:help
 | 
					setlocal keywordprg=:help
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -227,4 +227,4 @@ endfunction
 | 
				
			|||||||
let &cpo = s:cpo_save
 | 
					let &cpo = s:cpo_save
 | 
				
			||||||
unlet s:cpo_save
 | 
					unlet s:cpo_save
 | 
				
			||||||
 | 
					
 | 
				
			||||||
" vim:sw=2
 | 
					" vim:sw=2
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -21,8 +21,27 @@ let cmd =
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
" END_INDENT
 | 
					" END_INDENT
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					" START_INDENT
 | 
				
			||||||
 | 
					" INDENT_EXE let g:vim_indent_cont = 5
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					let list = [
 | 
				
			||||||
 | 
					\ 'one',
 | 
				
			||||||
 | 
					\ 'two']
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					" END_INDENT
 | 
				
			||||||
 | 
					
 | 
				
			||||||
" START_INDENT
 | 
					" START_INDENT
 | 
				
			||||||
" INDENT_EXE unlet g:vim_indent_cont
 | 
					" INDENT_EXE unlet g:vim_indent_cont
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					let list = [
 | 
				
			||||||
 | 
					'one',
 | 
				
			||||||
 | 
					'two',
 | 
				
			||||||
 | 
					]
 | 
				
			||||||
 | 
					echo
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					" END_INDENT
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					" START_INDENT
 | 
				
			||||||
" INDENT_AT  this-line
 | 
					" INDENT_AT  this-line
 | 
				
			||||||
func Some()
 | 
					func Some()
 | 
				
			||||||
let f = x " this-line
 | 
					let f = x " this-line
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -21,8 +21,27 @@ let cmd =
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
" END_INDENT
 | 
					" END_INDENT
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					" START_INDENT
 | 
				
			||||||
 | 
					" INDENT_EXE let g:vim_indent_cont = 5
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					let list = [
 | 
				
			||||||
 | 
					     \ 'one',
 | 
				
			||||||
 | 
					     \ 'two']
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					" END_INDENT
 | 
				
			||||||
 | 
					
 | 
				
			||||||
" START_INDENT
 | 
					" START_INDENT
 | 
				
			||||||
" INDENT_EXE unlet g:vim_indent_cont
 | 
					" INDENT_EXE unlet g:vim_indent_cont
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					let list = [
 | 
				
			||||||
 | 
					    'one',
 | 
				
			||||||
 | 
					    'two',
 | 
				
			||||||
 | 
					    ]
 | 
				
			||||||
 | 
					echo
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					" END_INDENT
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					" START_INDENT
 | 
				
			||||||
" INDENT_AT  this-line
 | 
					" INDENT_AT  this-line
 | 
				
			||||||
func Some()
 | 
					func Some()
 | 
				
			||||||
    let f = x " this-line
 | 
					    let f = x " this-line
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
" Vim indent file
 | 
					" Vim indent file
 | 
				
			||||||
" Language:	Vim script
 | 
					" Language:	Vim script
 | 
				
			||||||
" Maintainer:	Bram Moolenaar <Bram@vim.org>
 | 
					" Maintainer:	Bram Moolenaar <Bram@vim.org>
 | 
				
			||||||
" Last Change:	2020 Sep 27
 | 
					" Last Change:	2021 Jan 06
 | 
				
			||||||
 | 
					
 | 
				
			||||||
" Only load this indent file when no other was loaded.
 | 
					" Only load this indent file when no other was loaded.
 | 
				
			||||||
if exists("b:did_indent")
 | 
					if exists("b:did_indent")
 | 
				
			||||||
@@ -52,6 +52,7 @@ function GetVimIndentIntern()
 | 
				
			|||||||
    return 0
 | 
					    return 0
 | 
				
			||||||
  endif
 | 
					  endif
 | 
				
			||||||
  let prev_text = getline(lnum)
 | 
					  let prev_text = getline(lnum)
 | 
				
			||||||
 | 
					  let found_cont = 0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  " Add a 'shiftwidth' after :if, :while, :try, :catch, :finally, :function
 | 
					  " Add a 'shiftwidth' after :if, :while, :try, :catch, :finally, :function
 | 
				
			||||||
  " and :else.  Add it three times for a line that starts with '\' or '"\ '
 | 
					  " and :else.  Add it three times for a line that starts with '\' or '"\ '
 | 
				
			||||||
@@ -83,6 +84,7 @@ function GetVimIndentIntern()
 | 
				
			|||||||
  endif
 | 
					  endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  if cur_text =~ s:lineContPat && v:lnum > 1 && prev_text !~ s:lineContPat
 | 
					  if cur_text =~ s:lineContPat && v:lnum > 1 && prev_text !~ s:lineContPat
 | 
				
			||||||
 | 
					    let found_cont = 1
 | 
				
			||||||
    if exists("g:vim_indent_cont")
 | 
					    if exists("g:vim_indent_cont")
 | 
				
			||||||
      let ind = ind + g:vim_indent_cont
 | 
					      let ind = ind + g:vim_indent_cont
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
@@ -114,10 +116,50 @@ function GetVimIndentIntern()
 | 
				
			|||||||
    endif
 | 
					    endif
 | 
				
			||||||
  endif
 | 
					  endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  " For a line starting with "}" find the matching "{".  If it is at the start
 | 
				
			||||||
 | 
					  " of the line align with it, probably end of a block.
 | 
				
			||||||
 | 
					  " Use the mapped "%" from matchit to find the match, otherwise we may match
 | 
				
			||||||
 | 
					  " a { inside a comment or string.
 | 
				
			||||||
 | 
					  if cur_text =~ '^\s*}'
 | 
				
			||||||
 | 
					    if maparg('%') != ''
 | 
				
			||||||
 | 
					      exe v:lnum
 | 
				
			||||||
 | 
					      silent! normal %
 | 
				
			||||||
 | 
					      if line('.') < v:lnum && getline('.') =~ '^\s*{'
 | 
				
			||||||
 | 
						let ind = indent('.')
 | 
				
			||||||
 | 
					      endif
 | 
				
			||||||
 | 
					    else
 | 
				
			||||||
 | 
					      " todo: use searchpair() to find a match
 | 
				
			||||||
 | 
					    endif
 | 
				
			||||||
 | 
					  endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  " Below a line starting with "}" find the matching "{".  If it is at the
 | 
				
			||||||
 | 
					  " end of the line we must be below the end of a dictionary.
 | 
				
			||||||
 | 
					  if prev_text =~ '^\s*}'
 | 
				
			||||||
 | 
					    if maparg('%') != ''
 | 
				
			||||||
 | 
					      exe lnum
 | 
				
			||||||
 | 
					      silent! normal %
 | 
				
			||||||
 | 
					      if line('.') == lnum || getline('.') !~ '^\s*{'
 | 
				
			||||||
 | 
						let ind = ind - shiftwidth()
 | 
				
			||||||
 | 
					      endif
 | 
				
			||||||
 | 
					    else
 | 
				
			||||||
 | 
					      " todo: use searchpair() to find a match
 | 
				
			||||||
 | 
					    endif
 | 
				
			||||||
 | 
					  endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  " Below a line starting with "]" we must be below the end of a list.
 | 
				
			||||||
 | 
					  if prev_text =~ '^\s*]'
 | 
				
			||||||
 | 
					    let ind = ind - shiftwidth()
 | 
				
			||||||
 | 
					  endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  " A line ending in "{"/"[} is most likely the start of a dict/list literal,
 | 
				
			||||||
 | 
					  " indent the next line more.  Not for a continuation line.
 | 
				
			||||||
 | 
					  if prev_text =~ '[{[]\s*$' && !found_cont
 | 
				
			||||||
 | 
					    let ind = ind + shiftwidth()
 | 
				
			||||||
 | 
					  endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  " Subtract a 'shiftwidth' on a :endif, :endwhile, :catch, :finally, :endtry,
 | 
					  " Subtract a 'shiftwidth' on a :endif, :endwhile, :catch, :finally, :endtry,
 | 
				
			||||||
  " :endfun, :else and :augroup END.
 | 
					  " :endfun, :else and :augroup END.
 | 
				
			||||||
  if cur_text =~ '^\s*\(ene\@!\|}\|cat\|finall\|el\|aug\%[roup]\s\+[eE][nN][dD]\)'
 | 
					  if cur_text =~ '^\s*\(ene\@!\|cat\|finall\|el\|aug\%[roup]\s\+[eE][nN][dD]\)'
 | 
				
			||||||
    let ind = ind - shiftwidth()
 | 
					    let ind = ind - shiftwidth()
 | 
				
			||||||
  endif
 | 
					  endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -2,7 +2,7 @@
 | 
				
			|||||||
"
 | 
					"
 | 
				
			||||||
" Author: Bram Moolenaar
 | 
					" Author: Bram Moolenaar
 | 
				
			||||||
" Copyright: Vim license applies, see ":help license"
 | 
					" Copyright: Vim license applies, see ":help license"
 | 
				
			||||||
" Last Change: 2020 Dec 07
 | 
					" Last Change: 2021 Jan 03
 | 
				
			||||||
"
 | 
					"
 | 
				
			||||||
" WORK IN PROGRESS - Only the basics work
 | 
					" WORK IN PROGRESS - Only the basics work
 | 
				
			||||||
" Note: On MS-Windows you need a recent version of gdb.  The one included with
 | 
					" Note: On MS-Windows you need a recent version of gdb.  The one included with
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
" Vim ABAP syntax file
 | 
					" Vim ABAP syntax file
 | 
				
			||||||
"    Language: SAP - ABAP/R4
 | 
					"    Language: SAP - ABAP/R4
 | 
				
			||||||
"  Maintainer: Marius Piedallu van Wyk <lailoken@gmail.com>
 | 
					"  Maintainer: Marius Piedallu van Wyk <lailoken@gmail.com>
 | 
				
			||||||
" Last Change: 2018 Dec 12
 | 
					" Last Change: 2021 Jan 02
 | 
				
			||||||
"     Comment: Thanks to EPI-USE Labs for all your assistance. :)
 | 
					"     Comment: Thanks to EPI-USE Labs for all your assistance. :)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
" Quit when a syntax file was already loaded
 | 
					" Quit when a syntax file was already loaded
 | 
				
			||||||
@@ -193,4 +193,4 @@ hi def link abapHex            Number
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
let b:current_syntax = "abap"
 | 
					let b:current_syntax = "abap"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
" vim: ts=8 sw=2
 | 
					" vim: ts=8 sw=2
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
" Vim syntax file
 | 
					" Vim syntax file
 | 
				
			||||||
" Language:    PROLOG
 | 
					" Language:    PROLOG
 | 
				
			||||||
" Maintainer:  Anton Kochkov <anton.kochkov@gmail.com>
 | 
					" Maintainer:  Anton Kochkov <anton.kochkov@gmail.com>
 | 
				
			||||||
" Last Change: 2019 Aug 29
 | 
					" Last Change: 2021 Jan 05
 | 
				
			||||||
 | 
					
 | 
				
			||||||
" There are two sets of highlighting in here:
 | 
					" There are two sets of highlighting in here:
 | 
				
			||||||
" If the "prolog_highlighting_clean" variable exists, it is rather sparse.
 | 
					" If the "prolog_highlighting_clean" variable exists, it is rather sparse.
 | 
				
			||||||
@@ -21,16 +21,16 @@ syn case match
 | 
				
			|||||||
" Very simple highlighting for comments, clause heads and
 | 
					" Very simple highlighting for comments, clause heads and
 | 
				
			||||||
" character codes.  It respects prolog strings and atoms.
 | 
					" character codes.  It respects prolog strings and atoms.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
syn region   prologCComment start=+/\*+ end=+\*/+
 | 
					syn region   prologCComment start=+/\*+ end=+\*/+ contains=@Spell
 | 
				
			||||||
syn match    prologComment  +%.*+
 | 
					syn match    prologComment  +%.*+ contains=@Spell
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if !exists("prolog_highlighting_no_keyword")
 | 
					if !exists("prolog_highlighting_no_keyword")
 | 
				
			||||||
  syn keyword  prologKeyword  module meta_predicate multifile dynamic
 | 
					  syn keyword  prologKeyword  module meta_predicate multifile dynamic
 | 
				
			||||||
endif
 | 
					endif
 | 
				
			||||||
syn match    prologCharCode +0'\\\=.+
 | 
					syn match    prologCharCode +0'\\\=.+
 | 
				
			||||||
syn region   prologString   start=+"+ skip=+\\\\\|\\"+ end=+"+
 | 
					syn region   prologString   start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@Spell
 | 
				
			||||||
syn region   prologAtom     start=+'+ skip=+\\\\\|\\'+ end=+'+
 | 
					syn region   prologAtom     start=+'+ skip=+\\\\\|\\'+ end=+'+
 | 
				
			||||||
syn region   prologClause   matchgroup=prologClauseHead start=+^\s*[a-z]\w*+ matchgroup=Normal end=+\.\s\|\.$+ contains=ALLBUT,prologClause
 | 
					syn region   prologClause   matchgroup=prologClauseHead start=+^\s*[a-z]\w*+ matchgroup=Normal end=+\.\s\|\.$+ contains=ALLBUT,prologClause contains=@NoSpell
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if !exists("prolog_highlighting_clean")
 | 
					if !exists("prolog_highlighting_clean")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user