17813Re: :X command
- Jan 30, 2001
> > > The build-in commands take precedence. This is noted in the docs.The discussion of disabling the :X command reminded me of a hilarious story
> > So, how do I disable :X then? :-)
> 1. Remove the X key from your keyboard
> 2. Get hypnotized to panic and switch off the computer when you only think
> of typing :X
> 3. Edit src/ex_docmd.c and make the ex_X() function empty, recompile.
> 4. Use Emacs
> 5. Disable the crypt feature in src/feature.h and recompile
involving a somewhat younger me, a friend of mine, a lengthy header file
for his introductory CS class final project, my incomplete knowledge of vi,
and repeated attempts to <ESC>/<CTRL-C> my way out of the key prompt (which
unlike vim's apparently didn't take <CTRL-C> for an answer). Later, I
managed to recreate most of the file from memory, then ran failed compiles
against it until I figured out the rest.
The more serious of Bram's suggestions about disabling :X all rely on
recompiling, which isn't really that great for a multi-user environment --
some people may want to be able to use :X, but the majority of users may
never want to see it. Why not have a boolean "encrypt" option? It
defaults to true, and people can "set noencrypt" to turn disable :X.
(Alternately, an administrator could "set noencrypt" system-wide, and let
users re-enable it as they desire.)
This would be easy. I guess there's a question of exactly what the option
would control -- whether it just disables :X (which only sets a key), or
also disables the encryption on write that happens when the key is set.
Also, what happens if an encrypted file is opened while "encrypt" is turned
off? (Presumably you get a prompt as normal and aren't forced to read the
- Next post in topic >>