How to disable netrw to generate history file?

307 views
Skip to first unread message

Yue Wu

unread,
Mar 22, 2011, 1:26:41 AM3/22/11
to vim...@googlegroups.com
Hi, list,

As the title, I notice netrw will create a .netrwhist at my vimfile when
on windows(don't know if it do on unix too), how to prevent it from the
file creation for security issue sometime.

--
Regards,
Yue Wu

Key Laboratory of Modern Chinese Medicines
Department of Traditional Chinese Medicine
China Pharmaceutical University
No.24, Tongjia Xiang Street, Nanjing 210009, China

Charles Campbell

unread,
Mar 22, 2011, 9:37:17 AM3/22/11
to vim...@googlegroups.com
Yue Wu wrote:
>
> As the title, I notice netrw will create a .netrwhist at my vimfile
> when on windows(don't know if it do on unix too), how to prevent it
> from the file creation for security issue sometime.
>
There's no built-in way to prevent .netrwhist generation at the current
time.

However, you could delete the file immediately after it was generated, I
suppose: (untested)

au VimLeave * if filereadable("[path here]/.netrwhist")|call
delete("[path here]/.netrwhist")|endif

Regards,
Chip Campbell

Yue Wu

unread,
Mar 22, 2011, 10:09:41 AM3/22/11
to vim...@googlegroups.com

Thanks, it works.

Reply all
Reply to author
Forward
0 new messages