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?

flukus
  • 193
  • 5
  • Here is a custom function to create a new blank buffer in a particular major-mode that a user has pre-defined: http://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 '16 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 '16 at 20:45
  • No, I'm using persp-mode, as the title says. – flukus Feb 23 '16 at 03:48

1 Answers1

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.

CodyChan
  • 2,599
  • 1
  • 19
  • 33
  • But it won't create a new tab at all will it? – flukus Feb 22 '16 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 http://emacs.stackexchange.com/a/16493/2287 and bind it to a key, you'll get what you want. – CodyChan Feb 23 '16 at 03:44