How can I delete the current file in vim?

后端 未结 6 1911
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-30 01:35

How can I delete from the disk the current open file from within vim? Would be nice to also close the buffer.

I see you can use NERDTree for that, but I don\'t use this

6条回答
  •  悲&欢浪女
    2021-01-30 01:59

    This may be an unpopular opinion but your file tree explorer (Netrw/NerdTree) is going to be the simplest and safest way to delete a file. Even if OP is not using NerdTree, the in-built plugin Netrw will work just as well.

提交回复
热议问题