Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't set the buffer name #121

Open
stellarhoof opened this issue Dec 8, 2017 · 3 comments
Open

Don't set the buffer name #121

stellarhoof opened this issue Dec 8, 2017 · 3 comments
Labels
needs-design This issue needs some amount of design consideration before it's ready to work on

Comments

@stellarhoof
Copy link

stellarhoof commented Dec 8, 2017

It makes it hard to detect the terminal. E.g. au BufEnter term:// ....
It forces us to the workaround au BufEnter * if exists("b:term_title") ....
Besides, it's useful to know which command was used to invoke the REPL. I had to look at the source for this.

@rdnetto
Copy link
Collaborator

rdnetto commented Dec 12, 2017

The main reason we set the buffer name is for readability/aesthetics - if you're using a plugin which shows the name of each buffer, Intero is much more user friendly than term://.... Also, we definitely don't want any user configuration to depend on the exact command used, since we're likely to change that.

Would having the buffer ID be help achieve your goal? We already expose that in a global variable, so that might be a good starting point.

@owickstrom
Copy link
Collaborator

Regarding knowing the command that starts the REPL, I think the plugin deliberately hides that from the REPL buffer output. Could be printed instead?

@stellarhoof
Copy link
Author

stellarhoof commented Dec 13, 2017

@rdnetto User-friendliness is subjective. For example I prefer explicitness. Seeing what kind of buffer its opening and what command was used is better than just seeing Intero. I can't think of any use cases where I would programmatically parse the command used out of the terminal title, but what I do need is to be able to match the buffer type for autocommands. I don't have any use for the buffer ID so far.

@owickstrom Better yet, provide an option to the user to hide it? I personally don't mind doing
au User InteroStarted setlocal statusline=Intero, if InteroStarted was provided.

An autocommand would be ideal, but also notice you don't have to change the buffer name to change the statusline.

@parsonsmatt parsonsmatt added the needs-design This issue needs some amount of design consideration before it's ready to work on label Apr 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-design This issue needs some amount of design consideration before it's ready to work on
Projects
None yet
Development

No branches or pull requests

4 participants