Skip to content
This repository has been archived by the owner on Jul 29, 2023. It is now read-only.

indentLine not work well with mksession when plugin sheerun/vim-polyglot enabled. #344

Open
roachsinai opened this issue Jan 20, 2021 · 1 comment

Comments

@roachsinai
Copy link

roachsinai commented Jan 20, 2021

describe

If use both indentLine and vim-polyglot, and do :mksession in a markdown buffer, then use vim -S Session.vim to load session, the setting to exclude markdown for indentline not works for the first loaded file this time.

minimal_vimrc:

call plug#begin('~/.vim/plugged')
Plug 'sheerun/vim-polyglot'
Plug 'Yggdroot/indentLine'
let g:indentLine_char = '▏'
let g:indentLine_fileTypeExclude = ['defx', 'startify', 'tex', 'markdown']
let g:indentLine_concealcursor = ''
let g:indentLine_conceallevel = 1
call plug#end()

how to reproduce

Suppose have two markdown files in current directory:

hmanx ~ » cat tt.md                  


When taking the inverse transform, you multiply the signal by $\frac{1}{\sqrt2}$ for each iteration.

What does this "normalization" really represent?
```

```

hmanx ~ » cat ttt.md    
```py
```
  1. vim tt.md
  2. vim ttt.md
  3. :mksession
  4. :q
  5. vim -S Session.vim

The difference is between result of step 2 and step 5.

At step 2, vim show all things of ttt.md, that means all characters not conceal:

hmanx ~ » cat ttt.md    
```py
```

But at step 5, if your cursor at first line, vim shows only characters at that line:

hmanx ~ » cat ttt.md    
```py

But the conceal of tt.md is not changed.

Peek 2021-01-21 02-04

@roachsinai
Copy link
Author

roachsinai commented Jan 21, 2021

|SessionLoadPost| 自动命令事件在会话文件载入/执行后被激活。
						*SessionLoad-variable*
会话文件载入期间,SessionLoad 全局变量被设为 1。用此变量,插件可以推迟部分工
作,直到激活 SessionLoadPost 事件时才执行。

感觉是上面的设置的原因。导致vim -S Session.vim之后显示的当前buffer的一些配置没有被设置?

如果先打开vim,然后:source Session.vim这就没有问题了。

又或者在在after/ftplugin里面设置setlocal conceallevel=0

目前可以,还有待验证。

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant