How to reload file after it has been changed outside of ne?

Skip to first unread message


May 20, 2020, 1:04:33 PM5/20/20
to niceeditor
I can't see any command which reloads the current file after it being edited outside of ne.  Is there any way of doing this without having to close and open it again?


May 20, 2020, 1:30:17 PM5/20/20
to niceeditor
The way I do it is to issue the "Open" command (Menu: File->open; Command line: ^k O <enter>; kb shortcut: ^o).

The file requester is presented. Hit escape, and the current document's name is presented on the command line. Just hit <enter>. It'll ask you if you're sure. Hit 'y' and enter. So altogether it's
  ^o <Esc> <enter> y

Probably not as elegant as you would like, but it's also not something you should have to do that often.


May 20, 2020, 1:43:20 PM5/20/20
to niceeditor
Okay, thanks Todd.

Jamie Lentin

May 22, 2020, 5:02:11 AM5/22/20
A related issue that annoys me from time to time is I'd like to see a
diff of ne's buffer versus what's on the file system.

For example, after a git rebase will report "File has been modified
since buffer was loaded or saved; are you sure?", since the timestamps
have changed. It would be nice to spawn diff to see if pressing 'y' will
make a mess of my rebase or change nothing but the timestamp.

This feels like it should be possible with a macro, something like
"through diff -u (original file) - | less" but I've not come up with a
formulation that doesn't involve patches to ne. I could have a go at
implementing something but it's hard to know what:

1) Building it into ne, adding a "d" option to the "are you sure?"
option above. Nicest for me, but then you have to configure the diff
tool, is very single-purpose, and you may well want to just check
2) An option to system that pumps the whole buffer to stdin when running
the command, "system-pipe-stdin diff -u (original file) -"
3) A command to dump the buffer to a given temporary file, "dump_buffer
/tmp/unsaved ; system diff -u (original file) /tmp/unsaved ; rm

...I'm not sure if there's an existing way of doing "(original file)"
either. If there isn't, possibly system could set an environment
variable in the shell it sends the command to, to save having to
implement variable substitution?

Or it could be I'm missing something obvious. It wouldn't be the first
time :)

> --
> You received this message because you are subscribed to the Google
> Groups "niceeditor" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to
> To view this discussion on the web visit
> [1].
> Links:
> ------
> [1]
Reply all
Reply to author
0 new messages