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

Doesn't restores alternate buffer properly #64

Open
ajitid opened this issue May 11, 2021 · 0 comments
Open

Doesn't restores alternate buffer properly #64

ajitid opened this issue May 11, 2021 · 0 comments

Comments

@ajitid
Copy link

ajitid commented May 11, 2021

By skimming though the code I've found that Vaffle is able to restore alternate buffer. So if I open file A then B, and then open Vaffle to file C, I could use <c-^> to jump to alternate file, in this case, I will be able to jump from file C to file B.

But the above behaviour doesn't work in the following cases:

  • Using command Vaffle % on file B and pressing enter in Vaffle buffer. This opens file B again which is expected, but removes file A (alternate file buffer).
  • Using q in Vaffle quits it but using <c-^> restores Vaffle window rather file A (which is the actual alternate file).

Details:

  • OS: Ubuntu 20.04 via WSL on Windows 10
  • Vim: NVIM v0.5.0-dev+1233-g82ac44d01
  • Minimal .vimrc:
let g:vaffle_show_hidden_files = 1
let g:vaffle_force_delete = 1
nnoremap - <cmd>execute "try \n Vaffle % \n catch \n Vaffle \n endtry"<cr>

function! s:customize_vaffle_mappings() abort
  " go to project root
  nmap <buffer> -        <cmd>Vaffle<cr>
  nmap <buffer> <tab>        <Plug>(vaffle-toggle-current)
  vmap <buffer> <tab>        <Plug>(vaffle-toggle-current)
endfunction

augroup vimrc_vaffle
  autocmd!
  autocmd FileType vaffle call s:customize_vaffle_mappings()
augroup END
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

No branches or pull requests

1 participant