How do I get a start screen with recent files and sessions?
Answer
vim-startify plugin
Explanation
vim-startify provides a configurable start screen when you open Vim without a file. It shows recent files, bookmarks, and sessions.
How it works
- Open Vim without arguments to see the start screen
- Recent files are listed with numbers for quick access
- Press the number to open that file
- Sessions can be saved and restored
Example
[0] ~/.vimrc
[1] ~/project/main.go
[2] ~/project/test.go
Sessions:
[a] project-session
Tips
- Install:
Plug 'mhinz/vim-startify' :SClosesaves and closes a session:SLoad nameloads a named sessionlet g:startify_bookmarks = ['~/.vimrc']adds bookmarkslet g:startify_session_autoload = 1auto-loads sessions- Neovim alternative: alpha-nvim or dashboard-nvim