Text editor with split screen option

editorswindow

Is there an editor which has the option to "split the screen" into two or more parts, accessing more than one file (possibly with a file tree) without opening more editor windows at once, and how would one do this (what are the commands).

I don't know if I made myself clear, but "split screen" is the only way to describe what I want to achieve. I want to use it to program, having more than one file open for editing. Note that I'm pretty new to both vi and emacs, if these are capable of doing this. Also, if this has to be done through a terminal editor, can it be done in the same terminal, regardless of the screen size?

Best Answer

vim can easily do that:

ctrl+ws - Split windows

ctrl+ww - switch between windows

ctrl+wq - Quit a window

ctrl+wv - Split windows vertically

:sp filename

will open filename in new buffer and split a window.

You can also do

vim -o file1 file2

To open the files in a split screen layout. Replace -o with -O for vertical split instead of horizontal.

Related Question