diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index 320b154..3912ac1 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -2662,14 +2662,15 @@ A jump table for the options with a short description can be found at |Q_op|.
 'endofline' 'eol'	boolean	(default on)
 			local to buffer
 			{not in Vi}
-	When writing a file and this option is off and the 'binary' option
-	is on, no <EOL> will be written for the last line in the file.  This
-	option is automatically set when starting to edit a new file, unless
-	the file does not have an <EOL> for the last line in the file, in
-	which case it is reset.  Normally you don't have to set or reset this
-	option.  When 'binary' is off the value is not used when writing the
-	file.  When 'binary' is on it is used to remember the presence of a
-	<EOL> for the last line in the file, so that when you write the file
+	When writing a file and this option is off and the 'binary' or
+	'respecteol' option is on, no <EOL> will be written for the last line
+	in the file.  This option is automatically set when starting to edit
+	a new file, unless the file does not have an <EOL> for the last line
+	in the file, in which case it is reset.  Normally you don't have to
+	set or reset this option.  When both 'binary' and 'respecteol' are off
+	the value is not used when writing the file.  When 'binary' or
+	'respecteol' is on it is used to remember the presence of a <EOL> for
+	the last line in the file, so that when you write the file
 	the situation from the original file can be kept.  But you can change
 	it if you want to.
 
@@ -5762,6 +5763,17 @@ A jump table for the options with a short description can be found at |Q_op|.
 	For the ":substitute" command the number of substitutions is used
 	instead of the number of lines.
 
+			*'respecteol'* *'reol'* *'norespecteol'* *'noreol'*
+'respecteol' 'reol'	boolean	(default off)
+			local to buffer
+			{not in Vi}
+	When writing a file and this option is on, the <EOL> for the last line
+	is only written if there was one in the original file (normally Vim
+	appends an <EOL> to the last line if there is none).
+	See the 'endofline' option.
+
+	Note: Same can be achived by setting the 'binary' option.
+
 			 *'restorescreen'* *'rs'* *'norestorescreen'* *'nors'*
 'restorescreen' 'rs'	boolean	(default on)
 			global
diff --git a/runtime/doc/tags b/runtime/doc/tags
index 37cd8a2..4e3c49b 100644
--- a/runtime/doc/tags
+++ b/runtime/doc/tags
@@ -603,6 +603,8 @@ $VIMRUNTIME	starting.txt	/*$VIMRUNTIME*
 'noreadonly'	options.txt	/*'noreadonly'*
 'norelativenumber'	options.txt	/*'norelativenumber'*
 'noremap'	options.txt	/*'noremap'*
+'noreol'	options.txt	/*'noreol'*
+'norespecteol'	options.txt	/*'norespecteol'*
 'norestorescreen'	options.txt	/*'norestorescreen'*
 'norevins'	options.txt	/*'norevins'*
 'nori'	options.txt	/*'nori'*
@@ -759,7 +761,9 @@ $VIMRUNTIME	starting.txt	/*$VIMRUNTIME*
 'relativenumber'	options.txt	/*'relativenumber'*
 'remap'	options.txt	/*'remap'*
 'renderoptions'	options.txt	/*'renderoptions'*
+'reol'	options.txt	/*'reol'*
 'report'	options.txt	/*'report'*
+'respecteol'	options.txt	/*'respecteol'*
 'restorescreen'	options.txt	/*'restorescreen'*
 'revins'	options.txt	/*'revins'*
 'ri'	options.txt	/*'ri'*
diff --git a/runtime/optwin.vim b/runtime/optwin.vim
index 55353ce..e9351f9 100644
--- a/runtime/optwin.vim
+++ b/runtime/optwin.vim
@@ -954,6 +954,9 @@ call <SID>BinOptionL("bin")
 call append("$", "endofline\tlast line in the file has an end-of-line")
 call append("$", "\t(local to buffer)")
 call <SID>BinOptionL("eol")
+call append("$", "respecteol\trespect presence/absence of an end-of-line at end of text file")
+call append("$", "\t(local to buffer)")
+call <SID>BinOptionL("reol")
 if has("multi_byte")
   call append("$", "bomb\tprepend a Byte Order Mark to the file")
   call append("$", "\t(local to buffer)")
diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim
index 1f4ba8c..1ac13be 100644
--- a/runtime/syntax/vim.vim
+++ b/runtime/syntax/vim.vim
@@ -35,12 +35,12 @@ syn keyword vimOption contained	al ar autoindent backspace ballooneval bg bkc br
 syn keyword vimOption contained	aleph arab autoread backup balloonexpr bh bl brk buflisted cdpath cin cinwords co commentstring confirm cpoptions cscoperelative csre cursorcolumn delcombine diffopt ea efm ep et fdc fdo ffs filetype fo foldlevelstart formatexpr ft gfw gtt guipty hh hkmap ic imaf iminsert includeexpr inf isident key langmap linebreak lm lw mat maxmempattern mis mmt mouse mouseshape mzquantum odev osfiletype patchmode ph preserveindent printheader pvh redrawtime revins ro rulerformat scr sect sft shellredir shiftwidth showmatch siso smc spc spl ss statusline suffixesadd sws tabline tags tbs textmode timeoutlen to tsl ttyfast uc undoreload vdir viewoptions warn wfw wildcharm winaltkeys winwidth wop writedelay
 syn keyword vimOption contained	allowrevins arabic autowrite backupcopy bdir bin bomb browsedir buftype cedit cindent clipboard cocu compatible consk cpt cscopetag cst cursorline dex digraph ead ei equalalways eventignore fde fdt fic fillchars foldclose foldmarker formatlistpat gcr ghr guicursor guitablabel hi hkmapp icon imak ims incsearch infercase isk keymap langmenu lines lmap lz matchpairs maxmemtot mkspellmem mod mousef mouset nf oft pa path pheader previewheight printmbcharset pvw regexpengine ri rop runtimepath scroll sections sh shellslash shm showmode sj smd spell splitbelow ssl stl sw sxe tabpagemax tagstack tenc textwidth title toolbar tsr ttym udf updatecount ve viminfo wb wh wildignore window wiv wrap ws
 syn keyword vimOption contained	altkeymap arabicshape autowriteall backupdir bdlay binary breakat bs casemap cf cink cm cole complete conskey crb cscopetagorder csto cwh dg dip eadirection ek equalprg ex fdi fen fileencoding fk foldcolumn foldmethod formatoptions gd go guifont guitabtooltip hid hkp iconstring imc imsearch inde insertmode iskeyword keymodel langnoremap linespace lnr ma matchtime mco ml modeline mousefocus mousetime nrformats ofu para pdev pi previewwindow printmbfont qe relativenumber rightleft rs sb scrollbind secure shcf shelltemp shortmess showtabline slm sn spellcapcheck splitright ssop stmp swapfile sxq tabstop tal term tf titlelen toolbariconsize ttimeout ttymouse udir updatetime verbose virtualedit wc whichwrap wildignorecase winfixheight wiw wrapmargin ww
-syn keyword vimOption contained	ambiwidth 
+syn keyword vimOption contained	ambiwidth reol respecteol
 
 " vimOptions: These are the turn-off setting variants {{{2
 syn keyword vimOption contained	noacd noallowrevins noantialias noarabic noarshape noautoread noaw noballooneval nobinary nobk nobuflisted nocin noconfirm nocopyindent nocscoperelative nocsre nocuc nocursorcolumn nodelcombine nodigraph noed noendofline noerrorbells noex nofen nofk nogd nohid nohkmap nohkp nohlsearch noicon noim noimcmdline noimdisable noinf noinsertmode nojoinspaces nolazyredraw nolinebreak nolist nolpl noma nomagic noml nomodeline nomodified nomousef nomousehide nonumber noopendevice nopi nopreviewwindow nopvw norelativenumber norestorescreen nori norl noro noru nosb noscb noscs nosft noshelltemp noshortname noshowfulltag noshowmode nosm nosmartindent nosmd nosol nosplitbelow nospr nossl nostartofline noswapfile nota notagrelative notbi notbs noterse notextmode notgst notimeout noto notr nottybuiltin notx noundofile novisualbell nowarn noweirdinvert nowfw nowildignorecase nowinfixheight nowiv nowrap nowrite nowritebackup
 syn keyword vimOption contained	noai noaltkeymap noar noarabicshape noautochdir noautowrite noawa nobeval nobiosk nobl nocf nocindent noconsk nocp nocscopetag nocst nocul nocursorline nodg noea noedcompatible noeol noesckeys noexpandtab nofic nofkmap nogdefault nohidden nohkmapp nohls noic noignorecase noimc noimd noincsearch noinfercase nois nojs nolbr nolisp noloadplugins nolz nomacatsui nomh nomod nomodifiable nomore nomousefocus nonu noodev nopaste nopreserveindent noprompt noreadonly noremap norevins norightleft nornu nors noruler nosc noscrollbind nosecure noshellslash noshiftround noshowcmd noshowmatch nosi nosmartcase nosmarttab nosn nospell nosplitright nosr nosta nostmp noswf notagbsearch notagstack notbidi notermbidi notextauto notf notildeop notitle notop nottimeout nottyfast noudf novb nowa nowb nowfh nowic nowildmenu nowinfixwidth nowmnu nowrapscan nowriteany nows
-syn keyword vimOption contained	noakm noanti noarab noari noautoindent noautowriteall nobackup nobin nobioskey nobomb noci nocompatible noconskey nocrb nocscopeverbose nocsverb nocursorbind nodeco nodiff noeb noek noequalalways noet noexrc nofileignorecase nofoldenable noguipty nohk 
+syn keyword vimOption contained	noakm noanti noarab noari noautoindent noautowriteall nobackup nobin nobioskey nobomb noci nocompatible noconskey nocrb nocscopeverbose nocsverb nocursorbind nodeco nodiff noeb noek noequalalways noet noexrc nofileignorecase nofoldenable noguipty nohk noreol norespecteol
 
 " vimOptions: These are the invertible variants {{{2
 syn keyword vimOption contained	invacd invallowrevins invantialias invarabic invarshape invautoread invaw invballooneval invbinary invbk invbuflisted invcin invconfirm invcopyindent invcscoperelative invcsre invcuc invcursorcolumn invdelcombine invdigraph inved invendofline inverrorbells invex invfen invfk invgd invhid invhkmap invhkp invhlsearch invicon invim invimcmdline invimdisable invinf invinsertmode invjoinspaces invlazyredraw invlinebreak invlist invlpl invma invmagic invml invmodeline invmodified invmousef invmousehide invnumber invopendevice invpi invpreviewwindow invpvw invrelativenumber invrestorescreen invri invrl invro invru invsb invscb invscs invsft invshelltemp invshortname invshowfulltag invshowmode invsm invsmartindent invsmd invsol invsplitbelow invspr invssl invstartofline invswapfile invta invtagrelative invtbi invtbs invterse invtextmode invtgst invtimeout invto invtr invttybuiltin invtx invundofile invvisualbell invwarn invweirdinvert invwfw invwildignorecase invwinfixheight invwiv invwrap invwrite invwritebackup
