1

My list of actions:

e xx.txt
e xx2.txt
"in a different window change xx.txt
:b#

At this point I would like vim to tell me that the buffer has changed, but to not load new contents into the buffer. Note: I do not have autoread set.

Below is a list of my options.

:set
--- Options ---
  expandtab           ignorecase          scroll=13           tabstop=4
  filetype=text       laststatus=3        shiftwidth=4        title
  helplang=en       nomodeline            smartcase           ttyfast
  history=50          ruler               syntax=text         ttymouse=xterm2
  backspace=indent,eol,start
  fileencoding=utf-8
  fileencodings=ucs-bom,utf-8,default,latin1
  printoptions=paper:letter
  runtimepath=~/.vim,/var/lib/vim/addons,/usr/share/vim/vimfiles,/usr/share/vim/
vim73,/usr/share/vim/vimfiles/after,/var/lib/vim/addons/after,~/.vim/after
  suffixes=.bak,~,.swp,.o,.info,.aux,.log,.dvi,.bbl,.blg,.brf,.cb,.ind,.idx,.ilg
,.inx,.out,.toc
  tags=../tags,./tags,tags;
2

you can set global parameter in your .vimrc

set hidden

or specify hidden attribute for selected buffer using bufhidden.
When the buffer is hidden (not abandoned like default) when you modify it outside vim you will be noticed that some changes occured and you can load new content or discard this changes.

  • That did it. Thank you. Not exactly straight forward or obvious, but sometimes that is VIM. – gene Jul 17 '16 at 3:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.