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 and highlight issues #126

Closed
samarulmeu opened this issue Sep 15, 2020 · 7 comments
Closed

Conceal and highlight issues #126

samarulmeu opened this issue Sep 15, 2020 · 7 comments
Assignees
Labels
bug:report Something does not work as intended / expected.

Comments

@samarulmeu
Copy link

Hello again!

After the last update I encountered two issues:

  1. The link concealing is not working anymore (I have conceallevel=2)

  2. I've seen that criticmarkup is supported now and although I have 'highlight': {'enable':1} I get no highlighting when using the appropriate tags.

Thanks again for you time and work!

@SidOfc SidOfc self-assigned this Sep 15, 2020
@SidOfc SidOfc added the bug:report Something does not work as intended / expected. label Sep 15, 2020
@SidOfc
Copy link
Owner

SidOfc commented Sep 15, 2020

Hi @samarulmeu!

Is this happening in regular vim or neovim, or some other GUI version of vim?

As always, cheers for reporting and will look into it!

@samarulmeu
Copy link
Author

Hi @SidOfc !

Sorry for omiting this. In my vim 8.1. No vimrc change in a while.

Thanks!

@SidOfc
Copy link
Owner

SidOfc commented Sep 17, 2020

No problem @samarulmeu, I checked it out in both vim 8.1 and neovim 0.5 using some trivial examples:

[hello](https://world.com)

{++ hello ++}

Both editors with conceallevel=2 set it conceal the text as expected. I tested it first by using :set conceallevel=2 after opening a markdown file, and by setting it at the top of my vimrc, restarting vim and then opening a markdown file. Can you provide an example markdown snippet that isn't supposed to work?

Could you also try running mkdx without any other plugins active? Or share your vimrc with me via a gist so I can try it with your config?

@samarulmeu
Copy link
Author

Hi @SidOfc.

So this was my test file:

[Text](https://url.com) 

{++something++} 

*kjlkgjkl* **gkfjgldf** ***kjlk*** 

Italic and bold are working as expected.

And this is my vimrc. I cleaned it (only mkdx plugin and my usual settingx), but it is the same behavior.

""""""""""
" Defaults
"syntax enable
syntax on
set nocompatible                  
set modifiable                    
set encoding=utf-8                
set fileencoding=utf-8
set fileencodings=utf-8
scriptencoding utf-8
set autoread                      
set updatetime=500                
set undofile
set undodir=~/.vim/undo
set undolevels=1000               
set showcmd                       
set confirm                       
set hidden                        
set autoindent                    
set noexpandtab                   
set tabstop=4                     
set shiftwidth=4                  
set smartcase                     
set ignorecase
set hlsearch                      
set incsearch                     
set backspace=indent,eol,start    
set wrap
set linebreak
set nolist 
set wildmenu                      
set wildmode=list:longest,full    
set modelines=1                   
set noshowmode 					  


set synmaxcol=256

filetype plugin indent on

set number                        " show line numbers

" redraw as necessary, leads to faster methods
set lazyredraw
set bomb
set binary
set ttyfast
set ttyscroll=3

" Trying to brute-force speed up vim
set noshowmatch
set nocursorline
let g:loaded_matchparen = 1

" Show current file
set title
set titleold="Terminal"
set titlestring=%F

"Force vimdiff to wrap text
"autocmd FilterWritePre * if &diff | setlocal wrap< | endif
au VimEnter * if &diff | execute 'windo set wrap' | endif

" Conceal Level
set conceallevel=2
"vim-plug configuration
call plug#begin('~/.vim/plugged')
Plug 'SidOfc/mkdx', {'for': 'markdown'}
call plug#end()

" Infinite history
" Sets how many lines of history vim has to remember
set history=10000

" provide some context when editing
"to have the cursor always in the middle, except at the start/end of file
set scrolloff=999

set ruler


"""""""
" Theme
set t_Co=256
set gfn=Menlo\ Regular:h13
set background=dark

"mkdx plugin
let g:mkdx#settings = {'toc': {'text': "Cuprins", 'update_on_write': 1}, 'highlight': {'enable':1}, 'tab': {'enable':0} } ", 'fold': { 'enable': 1} }

"""""""""
" Folding
set foldenable
"""""""""

@SidOfc
Copy link
Owner

SidOfc commented Sep 18, 2020

Hmmn I tried it with the vimrc you provided but I'm still getting expected results on Vim 8.1 and Neovim 0.5:
image

The only difference I can imagine is the set gfn line since I don't have the Menlo font on my machine but I doubt that would cause the issue. Not sure how to continue here actually 😅

@samarulmeu
Copy link
Author

So, something strange happened.

No change to my vimrc, I just did an update to the last version (you pushed some changes last night and today) and now the conceal is working again. Even the criticmarkup stuff.

I still have a suggestion: in substitution highlight can you eliminate the opening and closing tags? {~~ and ~~} and leavinge only something like soh~>so.

You can see in the picture below how it looks now.

criticmarkup

@SidOfc
Copy link
Owner

SidOfc commented Sep 18, 2020

I see, very strange indeed but glad it sorted itself out, perhaps this was related to auto update in some way because I remember changing the location of the syntax file, but forgetting to update the auto update path to the syntax file, I fixed that this morning as well. Maybe that caused the weirdness.

As for this request, yeah I think I can make that work and I like the idea, I created #128 to keep track of it separately from this issue. Cheers for the report & suggestion so far, will close this now and update #128 when I've worked on it 👍

@SidOfc SidOfc closed this as completed Sep 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug:report Something does not work as intended / expected.
Projects
None yet
Development

No branches or pull requests

2 participants