onivim / oni2

Native, lightweight modal code editor
https://v2.onivim.io
MIT License
7.77k stars 274 forks source link

Show "startify" screen if no folder is open #2754

Open mabuchner opened 3 years ago

mabuchner commented 3 years ago

The work in #2084 made me think, that it would be nice to not only hide the sidebar, if no folder is open, but to also show a start screen similar to the one provided by the Startify plugin for vim.

This plugin lists recently opened files, existing sessions and allows to specify bookmarks.

If this will be achievable via Oni2's Vim plugin support, feel free to close this issue. From an outside perspective this seems to be a bit of a special situation, because Oni2 doesn't use Vim's default startup screen.

bryphe commented 3 years ago

I like this idea a lot - it would go a long way in helping users get started with Onivim. Welcome screen isn't too useful as well, currently. I would like to have a good out-of-box experience that covers recently opened files / folders / sessions.

The bookmarks is interesting too - I need to look more at how it is used in startify. An option would be to use global marks, but it sounds like startify has custom configuration for this.

If this will be achievable via Oni2's Vim plugin support, feel free to close this issue. From an outside perspective this seems to be a bit of a special situation, because Oni2 doesn't use Vim's default startup screen.

Right, the default startup screen is a bit special at the moment.

mabuchner commented 3 years ago

The bookmarks is interesting too - I need to look more at how it is used in startify. An option would be to use global marks, but it sounds like startify has custom configuration for this.

The bookmarks for Startify are supposed to be defined in the .vimrc file:

E.g.

let g:startify_bookmarks = [
  \ {'c': '~/.vimrc'},
  \ {'l': '~/devel/mylib'},
  \ {'u': '~/UnityProjects/MyUnityProject'}
  \ ]

Bookmarks can refer to files and directories.