vim:autocmd: Do not mark stdin as modified
Set `nomodified` after reading from standard input. This way the buffer can be closed without error message. This will **not** disable modified warnings completely. If the input is modified after read, vim will reset `modified` (As it should).
This commit is contained in:
@@ -62,3 +62,9 @@ augroup highlight_current_word
|
|||||||
au CursorHold * call HighlightCurrentWord()
|
au CursorHold * call HighlightCurrentWord()
|
||||||
au CursorMoved * match
|
au CursorMoved * match
|
||||||
augroup END
|
augroup END
|
||||||
|
|
||||||
|
" Do not mark input from stdin as modified
|
||||||
|
augroup stdin_not_modified
|
||||||
|
au!
|
||||||
|
au StdinReadPost * set nomodified
|
||||||
|
augroup END
|
||||||
|
|||||||
Reference in New Issue
Block a user