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

open the file in the current buffer,cover my origin file,maybe it should save my file before. #36

Closed
wsdjeg opened this issue Dec 6, 2015 · 2 comments

Comments

@wsdjeg
Copy link

wsdjeg commented Dec 6, 2015

    autocmd BufEnter *
                \   if empty(&buftype)
                \|      nnoremap <buffer> <C-]> :<C-u>UniteWithCursorWord -immediately tag<CR>
                \|  endif

here is my config for unite-tag,and my os is ubuntu ,gvim 7.4
then i open vim with a new file named Test.java type into

class Test{
  String
}

and do not save it,my cursor in on String then i type c-]
the vim show me the resuly in the unite buffer,if i select one and type Enter,the file will be opened in the current buffer,and cover my new file without save it!
i think it is better to confirm whether the file in current buffer has been saved,if not open the selection in a split buffer.nerdtree also has this feature ,maybe you can have a try.

@Shougo
Copy link
Collaborator

Shougo commented Dec 7, 2015

It is not unite-tag issue. It is unite.vim feature.

Is hidden option set? If so, you can edit the buffer and save it.
I think it is no problem.

@Shougo Shougo closed this as completed Dec 7, 2015
@wsdjeg
Copy link
Author

wsdjeg commented Dec 7, 2015

ok let me read the unite's doc carefully

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

2 participants