Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to clear the screen after exit vim

Tags:

vim

Sometimes vim will leave something, i.e. press any key to continue, on the terminal and is there any way to return to a clear terminal after exiting vim? I am new to vim and please tell me exactly what I should do.

Sorry I did not express my idea clear enough the first time. What I actually want to ask is that is there a way to return to a clear terminal after typing :q in vim without further input of commands. I am using VIM 7.4 in Ubuntu, terminal type is xterm.

like image 486
jcxl Avatar asked Jul 23 '15 18:07

jcxl


1 Answers

Add to your ~/.vimrc:

au VimLeave * :!clear
like image 125
EntangledLoops Avatar answered Sep 28 '22 01:09

EntangledLoops