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

change from nerdtree from vimfiler,configration for the same behavior! #344

Closed
wsdjeg opened this issue Dec 5, 2015 · 14 comments
Closed

Comments

@wsdjeg
Copy link

wsdjeg commented Dec 5, 2015

hi @Shougo I am trying to change my file explorer from nerdtree to vimfiler,but i found there are many difference between them,it is hard for me to let vimfiler words same as nerdtree.
if i finished my config,i will share it here.

@Shougo
Copy link
Owner

Shougo commented Dec 6, 2015

Thanks. But please use the Wiki for it.

https://github.com/Shougo/vimfiler.vim/wiki

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

wsdjeg commented Dec 10, 2015

i have read all the issue which is wrote by english,and i find #179 .
by default ,no need to set now ,it will get the same func as

autocmd FileType vimfiler nmap <silent><buffer><expr> <CR> vimfiler#smart_cursor_map(
\ "\<Plug>(vimfiler_expand_tree)",
\ "\<Plug>(vimfiler_edit_file)")

but it is not exactly same as nerdtree,in nerd tree
Enter on directory will expand the directory,but the cursor still on the directory,then you can type Enter to close the directory without move cursor up.but in Vimfiler the cursor will move to child file after expand tree .also in nerdtree Enter on file,will open the file in the current buffer,if the file in current buffer has not been saved,then will auto open in a split buffer .but in Vimfiler will get the error
2015-12-10 20-34-58

@wsdjeg
Copy link
Author

wsdjeg commented Dec 10, 2015

sorry,by default enter is cd or edit,it is my fault

@wsdjeg
Copy link
Author

wsdjeg commented Dec 10, 2015

sorry no need to change the Enter now,i am try to be used to vimfiler ,and i think it is better

@wsdjeg
Copy link
Author

wsdjeg commented Dec 10, 2015

but it is better to auto open file in split windows ,when current file has not be saved.

@Shougo
Copy link
Owner

Shougo commented Dec 11, 2015

but it is better to auto open file in split windows ,when current file has not be saved.

It is the same feature with unite.vim

@wsdjeg
Copy link
Author

wsdjeg commented Dec 11, 2015

do you mean we must save current buffer before open file in unite or vimfiler?

@Shougo
Copy link
Owner

Shougo commented Dec 11, 2015

If you want to save the file.

@wsdjeg
Copy link
Author

wsdjeg commented Dec 11, 2015

yes ,if i do not save,the file change will be clear,but if it is not hard to impletments,will add this feature?

@Shougo
Copy link
Owner

Shougo commented Dec 11, 2015

@wsdjeg No. The change is not clear if you have set hidden option.

@wsdjeg
Copy link
Author

wsdjeg commented Dec 11, 2015

ok thanks , if so ,every thing will be ok,i am just trying to be accustomed to you plugin.
as you said,My brain is infected by Vim also

@wsdjeg
Copy link
Author

wsdjeg commented Dec 11, 2015

sorry @Shougo still get the error,and i can not find how to use VimFiler command with hidden,all of my VimFiler config is here,

    NeoBundle 'Shougo/vimfiler'
    let s:hooks = neobundle#get_hooks("vimfiler")
    function! s:hooks.on_source(bundle) abort
        let g:vimfiler_as_default_explorer = 1
        let g:vimfiler_restore_alternate_file = 1
        let g:vimfiler_tree_indentation = 1
        let g:vimfiler_tree_leaf_icon = '¦'
        let g:vimfiler_tree_opened_icon = ''
        let g:vimfiler_tree_closed_icon = ''
        let g:vimfiler_file_icon = '-'
        let g:vimfiler_readonly_file_icon = '*'
        let g:vimfiler_marked_file_icon = ''
        "let g:vimfiler_preview_action = 'auto_preview'
        let g:vimfiler_ignore_pattern =
                    \ '^\%(\.git\|\.idea\|\.DS_Store\|\.vagrant\|.stversions'
                    \ .'\|node_modules\|.*\.pyc\)$'

        if has('mac')
            let g:vimfiler_quick_look_command =
                        \ '/Applications//Sublime\ Text.app/Contents/MacOS/Sublime\ Text'
        else
            let g:vimfiler_quick_look_command = 'gloobus-preview'
        endif

        call vimfiler#custom#profile('default', 'context', {
                    \ 'explorer' : 1,
                    \ 'winwidth' : 30,
                    \ 'winminwidth' : 30,
                    \ 'toggle' : 1,
                    \ 'columns' : 'type',
                    \ 'auto_expand': 1,
                    \ 'direction' : 'rightbelow',
                    \ 'parent': 0,
                    \ 'explorer_columns' : 'type',
                    \ 'status' : 1,
                    \ 'safe' : 0,
                    \ 'split' : 1,
                    \ 'no_quit' : 1,
                    \ 'force_hide' : 0,
                    \ })
        autocmd FileType vimfiler call s:vimfilerinit()
        autocmd BufEnter * if (winnr('$') == 1 && &filetype ==# 'vimfiler') |
                    \ q | endif
        function! s:vimfilerinit()
            set nonumber
            set norelativenumber
        endf

@Shougo
Copy link
Owner

Shougo commented Dec 11, 2015

Why don't you add :set hidden in your .vimrc?

@wsdjeg
Copy link
Author

wsdjeg commented Dec 11, 2015

oh my gad,just read unite src,i find it will use &hidden,so thanks.

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