Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conceal for tex and saving folds #4175

Closed
mksyposz opened this issue Mar 26, 2019 · 4 comments
Closed

Conceal for tex and saving folds #4175

mksyposz opened this issue Mar 26, 2019 · 4 comments

Comments

@mksyposz
Copy link

@mksyposz mksyposz commented Mar 26, 2019

When I'm saving my folds by commands suggested on the internet:

autocmd!
 autocmd BufWinLeave * mkview
 autocmd BufWinEnter * silent! loadview
augroup END

vim's function for concealing doesn't work anymore. At least for .tex files.

@chrisbra

This comment has been minimized.

Copy link
Member

@chrisbra chrisbra commented Mar 26, 2019

please provide a minimal example that reproduces the problem. I cannot reproduce this. Also please note, that you are missing a augroup at the start of your code snippet.

@mksyposz

This comment has been minimized.

Copy link
Author

@mksyposz mksyposz commented Mar 26, 2019

augroup remember_folds
    autocmd!
    autocmd BufWinLeave * mkview
    autocmd BufWinEnter * silent! loadview
augroup END

set conceallevel=2
let g:tex_conceal='abdmg'

set encoding=utf-8

I'm using this at my vimrc file, basically as miniaml as possible.

\documentclass[12pt]{article} 

\begin{document}
$$    \in
    \cup $$

\end{document} 

Sample tex file.
With given vimrc neither \in nor \cup will be changed into their utf-8 equivalents. Aftering commeting the

augroup remember_folds
    autocmd!
    autocmd BufWinLeave * mkview
    autocmd BufWinEnter * silent! loadview
augroup END 

They will be correctly changed.

@cecamp

This comment has been minimized.

Copy link
Collaborator

@cecamp cecamp commented Mar 26, 2019

@cecamp cecamp closed this Mar 26, 2019
@Konfekt

This comment has been minimized.

Copy link

@Konfekt Konfekt commented Mar 31, 2019

You might also give https://github.com/zhimsel/vim-stay a shot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.