powerline
powerline copied to clipboard
vi editor doesn't clears the terminal after exit
By default when you open any file using vi editor, or any editor of your choice after you exit the editor, (irrespective of the file is changed or not.) the terminal doesn't clear up the content of the file. It will just exit the edit mode and start the next prompt after the file's content still visible on the terminal window.
The default behavior of the terminal is, when you exit the editing of file from vi editor, it clears up the file content on the terminal window, while allows continuing to prompt where the terminal was left off to the command previous to vi editor.
Is this happening on the console? This might be an issue with the terminal, rather than powerline.
Does the same happen if you disable powerline completely (both in vi and command prompt)? If yes, it is a terminal issue.
No, it happens only when powerline is running. When I disable the powerline, it works as expected.
Could you be setting a different value for $TERM
when powerline is running?
Open vim and check: :help xterm-screens
. Here's the first part...
Another question is that after exiting vim, the screen is left as it was, i.e. the contents of the file I was viewing (editing) was left on the screen. The output from my previous like "ls" were lost, ie. no longer in the scrolling buffer. I know that there is a way to restore the screen after exiting vim or other vi like editors, I just don't know how. Helps are appreciated. Thanks. I imagine someone else can answer this. I assume though that vim and vi do the same thing as each other for a given xterm setup.
They not necessarily do the same thing, as this may be a termcap vs. terminfo problem. You should be aware that there are two databases for describing attributes of a particular type of terminal: termcap and terminfo. This can cause differences when the entries differ AND when of the programs in question one uses terminfo and the other uses termcap (also see |+terminfo|).
If it's not $TERM
it might be $TERMINFO
or of the other ncurses connected environment variables.
@subodh-dharma Are you still facing this issue? If yes, could you please share info about your OS, terminal and the virc/vimrc files?