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

Option to always open a new tab when going to new locations #337

Closed
wants to merge 4 commits into from

Conversation

robz
Copy link

@robz robz commented Mar 10, 2019

I prefer to open new tabs when navigating. Not sure if anyone else would like this, but I thought I'd throw up a pull request just in case.

@prabirshrestha
Copy link
Owner

For workaround I would use this instead.

The problem with having one flag is what about splits?

#169 (comment)

nmap \gd :LspDefinition<cr>
nmap \gt :tab split<cr>:LspDefinition<cr>
nmap \gs :sp<cr>:LspDefinition<cr>
nmap \gv :vsp<cr>:LspDefinition<cr>

I would be happy to accept PRs that does this instead. :LspDefinition --opener vsplit or :LspDefinition --opener tab with let g:lsp_definition_config = { 'opener': 'tab' }. There are also ask if there is only one definition people want to jump directly and if there are more use either loclist or quickfix. I need to lockdown the api before we actually implement it.

@argoncloud
Copy link

This feature would be great. In the meantime, there is another viable approach using the QFEnter plugin, which allows one to open the quickfix entry selected in the current split, in a new horizontal split, in a new vertical split, or in a new tab.

@mattn
Copy link
Collaborator

mattn commented Apr 25, 2019

@prabirshrestha it's useful. but when the definition is not found, the buffer will be remaining.

@robz
Copy link
Author

robz commented Jun 9, 2019

Since making this pull request, I've become a lot more comfortable using buffers directly instead of tabs. Closing this out.

@robz robz closed this Jun 9, 2019
@prabirshrestha
Copy link
Owner

This is now possible with <mod> which is the vim way. #776

:tab LspDefinition Opens a window to the new tabpage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants