mhinz / vim-startify

:link: The fancy start screen for Vim.
MIT License
5.31k stars 187 forks source link

Any file opened after neovim starts with vim-startify starts does not get a swap file #383

Closed kindrowboat closed 5 years ago

kindrowboat commented 5 years ago

Hello! When starting up neovim using vim-startify and opening any file (either using a shortcut on the vim-startify screen or using :e any_file.txt, the file does not get a swapfile (i.e. running :swapname yields "No swap file"). This issue was originally reported to SpaceVim/SpaceVim#2966.

Environment

Ubuntu 19.04 neovim 0.3.4 (installed from the Ubuntu repositories) vimrc:

if &compatible
  set nocompatible
endif
set runtimepath+=~/.cache/dein/repos/github.com/Shougo/dein.vim
if dein#load_state('~/.cache/dein')
  call dein#begin('~/.cache/dein')
  call dein#add('~/.cache/dein/repos/github.com/Shougo/dein.vim')
  call dein#add('mhinz/vim-startify')
  call dein#end()
  call dein#save_state()
endif
filetype plugin indent on
syntax enable

Steps to reproduce

  1. open neovim with nvim (note: it's important to not give a filename)
  2. edit a file with :e any_file.txt
  3. check for swapfile with :swapname

Observed (incorrect) behavior

Status line says "No swap file"

Expected behavor

Status line says "/home/motevets/.local/share/nvim/swap//%tmp%directory%any_file.txt.swp" (or something similar)

mhinz commented 5 years ago

I remember there were some swap-related issues around that Nvim version that were introduced and later fixed by backporting a few patches from Vim. Please try upgrading your Nvim (v0.3.8 is the current release).

For double-checking you could test if you can reproduce this with Vim. If not, then you know it's not a problem with the plugin but with that particular Nvim version.

kindrowboat commented 5 years ago

You're right, upgrading to vim 0.3.8 fixed the issue when using vim-startify by itself. Interestingly however, it did not fix the issue when running vim-startify with SpaceVim (and disabling vim-startify in SpaceVim "fixes" the issue.) Feel free to close this issue, but if you have time, it would be wonderful if you could check out SpaceVim/SpaceVim#2966 to see if you can be of assistance.