I am pretty new to Emacs. Could someone please help me to write a custom command which I can add to my init file? It would do the following:
- Split the screen vertically to get two windows.
- Check if a buffer named '* ansi-term *' (without spaces) exists. If so, it would open this buffer in the one of vertically split windows.
- If a buffer with such a name doesn't exist it would run command
ansi-term(ignoring all prompting) to start a new terminal instance in one of the vertically windows.