junegunn / limelight.vim

:flashlight: All the world's indeed a stage and we are merely players
MIT License
2.36k stars 54 forks source link

Problems on MacVim #6

Closed Brixy closed 10 years ago

Brixy commented 10 years ago

The combination Goyo/Limelight/Seoul is just great. Thanks for this.

There seems to be an issue with MacVim:

Vim(let):E121: Undefined variable: s:default_coeff

On MacVim Limelight only works when limelight_conceal_ctermfg etc. are set.

junegunn commented 10 years ago

Strange. What is the version of MacVim you are running? Could you update Goyo, Limelight, and MacVim and try again?

Brixy commented 10 years ago

Thanks for your quick reply!

I updated all your plugins and the seoul color scheme.

MacVim is Snapshot 73.

Yet, the problem still occurs.

When I run Vim within iTerm2, everything works just fine.

junegunn commented 10 years ago

Hmm, I can't reproduce the problem with the MacVim version you mentioned. s:default_coeff is once set when the plugin is initially loaded and never unset. So it's very strange that you see the above error.

Brixy commented 10 years ago

Yes, I found s:default_coeff in your script.

Even without a .vimrc the error occurs. Very strange indeed.

junegunn commented 10 years ago

Could you post your .vimrc?

Brixy commented 10 years ago

Here are the relevant parts. The error message occurs even with this excerpt. Goyo, however, works fine.

Thanks a lot!

set nocompatible
set encoding=utf-8

au BufRead,BufNewFile *.md,*.markdown,*.mdown,*.mkd,*.mkdn set filetype=markdown
syntax enable

colorscheme seoul256

" ------------------------------------------
" Limelight does not work without
" the following setting.
" Commented out for testing purposes
" ------------------------------------------
" let g:limelight_conceal_ctermfg = 'gray'
" let g:limelight_conceal_ctermfg = 240
" let g:limelight_conceal_guifg = 'DarkGray'
" let g:limelight_conceal_guifg = '#777777'
junegunn commented 10 years ago

Hmm, nothing looks suspicious. Let me ask you a couple more questions.

Brixy commented 10 years ago

Hi, I deleted all plugins without success.

My MacVim installation is from

https://github.com/b4winckler/macvim/releases

Strangely, when MacVim.app is started directly, all stays the same. When started by executing the shell script mvim from the download folder, Limelight works! (I did’t remember the mvim file.) I don’t know why.

junegunn commented 10 years ago

Then it looks like an issue of MacVim. In any way, I haven't been able to reproduce the problem. Sorry but I'm not sure if I can help you with this.

Brixy commented 10 years ago

Thank you very much for investigating.

Now I simply open vim using a short terminal alias—and Limelight works perfectly.

junegunn commented 10 years ago

Okay, I'm closing the issue. Let me know if you happen to find out the cause.

Brixy commented 9 years ago

Hi @junegunn. Just found out—by accident—what the problem is. Opening MacVim via Spotlight or Finder causes the problem, opening it via terminal makes the coeff variable value work.

Without a dot, the variable always works (that is 0 and 1 only).