1

I'm trying to replicate vims :tabnew functionality, which just creates a new empty tab (perspective). All the commands I've looked at prompts for confirmations and names etc. They clone the current tab and do not automatically switch.

Is there a command that will create a new (empty) tab, give it a default name (I'll name it later if I want) and switch to it?

3
  • Here is a custom function to create a new blank buffer in a particular major-mode that a user has pre-defined: emacs.stackexchange.com/a/16493/2287 It automatically numbers successively created new buffers. I have it set up to display without selecting, but it can easily be modified to switch-to-buffer-other-widndow instead of display-buffer. New buffers can be any major-mode you want. It must have a buffer-name, but it is not automatically saved as a file. We call this a non-file-visiting-buffer.
    – lawlist
    Feb 20, 2016 at 20:39
  • If you need help with a minor-mode called tabbar-mode, please update your question to further clarify the issue.
    – lawlist
    Feb 20, 2016 at 20:45
  • No, I'm using persp-mode, as the title says.
    – flukus
    Feb 23, 2016 at 3:48

1 Answer 1

1

Have you ever tried scratch?

It will create a new empty buffer according the current buffer mode without prompts and switch to it immediately.

2
  • But it won't create a new tab at all will it?
    – flukus
    Feb 22, 2016 at 21:12
  • @flukus No, maybe I misunderstood your needs at the first place, scratch won't create a new tab but a new buffer. As @lawlist said, you can use tabbar-mode, but tab is not very useful in Emacs (at least I never use it), modify the snippet in the answer of emacs.stackexchange.com/a/16493/2287 and bind it to a key, you'll get what you want.
    – CodyChan
    Feb 23, 2016 at 3:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.