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

Support opening files in buffers #40

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Support opening files in buffers #40

wants to merge 1 commit into from

Conversation

exAspArk
Copy link

Hey 👋

Not sure if anyone else needs it, but I wanted to be able to open files in a new buffer instead of windows or tabs. For example, by setting let MRU_Open_File_Use_Buffers = 1 or pressing b exAspArk/dotfiles@c9859b9.

Feel free to reject if you don't want to have this feature merged ✌️

@yegappan
Copy link
Owner

In Vim, you can have only one buffer associated with a given file. When you open a file from the MRU list, it is always opened in a new buffer (independent of whether it is opened in a new window or a tab page or an existing window). Are you referring to opening the file in the same window from which the MRU command was invoked (even if the file is open in some other window)?

@Konfekt
Copy link
Contributor

Konfekt commented Nov 6, 2024

Maybe @exAspArk meant that no window is reused, if a buffer with the file is already there?

if bufexists(esc_fname)
	    exe 'buffer ' . esc_fname
	  else
	    exe 'edit ' . esc_fname
	  endif

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.

3 participants