From e15e739f2d67ba22897aae0ada5ebb09eb2a8140 Mon Sep 17 00:00:00 2001 From: brian Date: Mon, 25 Jun 2001 21:05:55 +0000 Subject: What to do when :w tells you you haven't got permission. --- games/fortune/datfiles/freebsd-tips | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'games/fortune') diff --git a/games/fortune/datfiles/freebsd-tips b/games/fortune/datfiles/freebsd-tips index 79f94ab..e2dfe08 100644 --- a/games/fortune/datfiles/freebsd-tips +++ b/games/fortune/datfiles/freebsd-tips @@ -487,3 +487,10 @@ use ^w to switch between the two. % sh (the default bourne shell in FreeBSD) supports command-line editing. Just ``set -o emacs'' or ``set -o vi'' to enable it. +% +When you've made modifications to a file in vi(1) and then find that +you can't write it, type ``!rm -f %'' then ``:w!'' to force the +write + +This won't work if you don't have write permissions to the directory +and probably won't be suitable if you're editing through a symbolic link. -- cgit v1.1