mhinz / mhinz/vim-startify

Problem with loadview with folds

Open
#529 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Vim Script
Stars
5.4k
Forks
181
PR merge metrics
No merged PRs in 30d

Description

Hi
I get the following error when I try to open a file after stratify launch
Error detected while processing function startify#open_buffers[6]..18_open_buffer[12]..BufWinLeave Autocommands for "*":
This only happens when the option "autocmd BufWinLeave * mkview
is set to load the folds. it doesnt actually have a problem with loading them with autocmd BufWinEnter * silent! loadview. So if I mkview manually it would be fine but its nice to keep it automated. Any help is much appreciated.
I'm using the latest vim version on linux from the terminal btw.
My startify settings:

 let g:startify_custom_header =
       \ startify#pad(split(system('figlet -w 100 Vim is Power'), '\n'))
"Incase you are insane and want to open a new tab with Goyo enabled
 autocmd BufEnter *
       \ if !exists('t:startify_new_tab') && empty(expand('%')) && !exists('t:goyo_master') |
       \   let t:startify_new_tab = 1 |
       \   Startify |
       \ endif
"Bookmarks. Syntax is clear.add yours
let g:startify_bookmarks = [ {'I': '~/i3/i3/config'},{'L': '~/.blerc'},{'Z': '~/.zshrc'},{'B': '~/.bashrc'},{'V': '~/.vimrc'}]
    let g:startify_lists = [
          \ { 'type': 'bookmarks', 'header': ['   Bookmarks']      },
          \ { 'type': 'files',     'header': ['   Recent']            },
          \ { 'type': 'sessions',  'header': ['   Sessions']       },
          \ { 'type': 'commands',  'header': ['   Commands']       },
          \ ]
"cant tell wtf it does so its commented
" \ { 'type': 'dir',       'header': ['   MRU '. getcwd()] },

hi StartifyBracket ctermfg=240
hi StartifyFile    ctermfg=147
hi StartifyFooter  ctermfg=240
hi StartifyHeader  ctermfg=114
hi StartifyNumber  ctermfg=215
hi StartifyPath    ctermfg=245
hi StartifySlash   ctermfg=240
hi StartifySpecial ctermfg=240

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the error in Vim with the shown BufWinLeave mkview and BufWinEnter loadview autoc commands, using the listed Startify settings. Start at the startify#open_buffers function named in the error and trace the BufWinLeave event while opening a file. Done means files open from Startify without the error while automated view saving and fold loading remain enabled.

Written by the indexing model from the issue text.

Assessment

Tech stack
vim
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.