liuchengxu / space-vim

:four_leaf_clover: Lean & mean spacemacs-ish Vim distribution
https://liuchengxu.github.io/space-vim/
MIT License
2.85k stars 254 forks source link

Vim closes automatically when try to open a directory #269

Open dgdavid opened 6 years ago

dgdavid commented 6 years ago

Environment


:version
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Jul 26 2017 19:10:24)
Included patches: 1-503, 505-642
Compiled by root@apple.com
Normal version without GUI.  Features included (+) or not (-):
+acl             +cmdline_compl   +digraphs        +folding         -langmap         -mouseshape      -mzscheme        -python3         +syntax          -toolbar         +writebackup
-arabic          +cmdline_hist    -dnd             -footer          +libcall         -mouse_dec       +netbeans_intg   +quickfix        +tag_binary      +user_commands   -X11
+autocmd         +cmdline_info    -ebcdic          +fork()          +linebreak       -mouse_gpm       +num64           +reltime         +tag_old_static  +vertsplit       -xfontset
-balloon_eval    +comments        -emacs_tags      -gettext         +lispindent      -mouse_jsbterm   +packages        -rightleft       -tag_any_white   +virtualedit     -xim
-browse          -conceal         +eval            -hangul_input    +listcmds        -mouse_netterm   +path_extra      +ruby/dyn        -tcl             +visual          -xpm
+builtin_terms   +cryptv          +ex_extra        +iconv           +localmap        -mouse_sgr       -perl            +scrollbind      -termguicolors   +visualextra     -xsmp
+byte_offset     +cscope          +extra_search    +insert_expand   -lua             -mouse_sysmouse  +persistent_undo +signs           +terminfo        +viminfo         -xterm_clipboard
+channel         +cursorbind      -farsi           +job             +menu            -mouse_urxvt     +postscript      +smartindent     +termresponse    +vreplace        -xterm_save
+cindent         +cursorshape     +file_in_path    +jumplist        +mksession       +mouse_xterm     +printer         +startuptime     +textobjects     +wildignore
-clientserver    +dialog_con      +find_in_path    -keymap          +modify_fname    +multi_byte      -profile         +statusline      +timers          +wildmenu
-clipboard       +diff            +float           +lambda          +mouse           +multi_lang      +python/dyn      -sun_workshop    +title           +windows
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
       defaults file: "$VIMRUNTIME/defaults.vim"
  fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H   -DMACOS_X_UNIX  -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: gcc   -L/usr/local/lib -o vim        -lm -lncurses  -liconv -framework Cocoa

Problem Description

After commit c66930eedc302c1716b22e6fd9f9b861a5c9b2f7, vim closes automatically when try to open a directory

If line https://github.com/liuchengxu/space-vim/blob/c66930eedc302c1716b22e6fd9f9b861a5c9b2f7/layers/%2Bdistributions/spacevim/config.vim#L30 is commented, the problem disappear.

liuchengxu commented 6 years ago

Thanks for your report. I can reproduce and have reverted to the previous approach to quit vim automatically when there is only one quickfix/location list/nerdtree buffer. Please pull the latest commit to fix this issue.

However, there is an obvious disadvantage: it can't handle the situation where nerdtree and quickfix buffer exist at the same time. I'll dive into this when I get some time. Any help is also appreciated.

dgdavid commented 6 years ago

and have reverted to the previous approach

Thank you for fixing it :)

However, there is an obvious disadvantage: it can't handle the situation where nerdtree and quickfix buffer exist at the same time. I'll dive into this when I get some time. Any help is also appreciated.

Sorry, I do not have enough knowledge about it :( I hope someone out there could give you a hand.