tags:

views:

712

answers:

3

When I use

git commit --amend

It will enter into a vi window to let me input comments for commit, the problem is the vi windows will show some dirty characters from former shell background. So I wonder how can I let vi to reload or redraw the screen to make the screen normal.

So far, I try reset terminal and Ctrl+L, it works, but I wonder is there best answer for such situation?

+8  A: 

I've been using control-L for such purposes for 35 years now, what's wrong with it?-)

Alex Martelli
control+L seems does not work for me; I have to reset terminal first. not know why....
arsane
Not know why, after remove my .vimrc file, no it is okay.
arsane
Was your .vimrc setting 'term'? Perhaps it was setting it incorrectly.
Laurence Gonsalves
yes, you are right!!! when I commented out setting term, it is okay now! :)
arsane
@arsane, yay! Good call @Laurence. Happy it's all better now.
Alex Martelli
A: 

^R or ^L

http://www.cs.rit.edu/~cslab/vi.html#A1.4

Tim Sylvester
+1  A: 

To force a screen refresh

:redraw!
HS