goyo.vim icon indicating copy to clipboard operation
goyo.vim copied to clipboard

Remove ^^^^^^^^^^^^ at the end of page

Open angelPL opened this issue 3 years ago • 4 comments

Is it possible to remove these ^^^^^^^^^^^^^^^^^^^^^^^^ characters at the end of current page?

angelPL avatar Jun 25 '22 01:06 angelPL

In the ~/.vim/plugged/goyo.vim/autoload/goyo.vim delete 'StatusLine' in line 110 and add this line of code outside the for loop (between line 121 and 122)

call s:set_color('StatusLine', 'bg', 'NONE')

hnamtang avatar Oct 21 '22 13:10 hnamtang

In the ~/.vim/plugged/goyo.vim/autoload/goyo.vim delete 'StatusLine' in line 110 and add this line of code outside the for loop (between line 121 and 122)

call s:set_color('StatusLine', 'bg', 'NONE')

This solution only works if the line 109:

  let bg = s:get_color('Normal', 'bg#')

returns a color in place of -1 on Vim or '' on GVim.

A proper solution has to guarantee that StatusLine and StatusLineNC are highlighted differently as explained in the docs (:h StatusLineNC):

StatusLineNC	Status lines of not-current windows.
		Note: If this is equal to "StatusLine", Vim will use "^^^" in
		the status line of the current window.

@junegunn Any elegant solution to solve this? I haven't been able to think of any.

mroavi avatar Dec 07 '22 09:12 mroavi

I removed StatusLine and StatusLineNC from line 113 in goyo.vim

Path: ~/.vim/plugged/goyo.vim/autoload/goyo.vim

function! s:tranquilize()
  let bg = s:get_color('Normal', 'bg#')
  for grp in ['NonText', 'FoldColumn', 'ColorColumn', 'VertSplit',
            \ 'StatusLine', 'StatusLineNC', 'SignColumn']                   # line 113
    " -1 on Vim / '' on GVim
    if bg == -1 || empty(bg)
      call s:set_color(grp, 'fg', get(g:, 'goyo_bg', 'black'))
      call s:set_color(grp, 'bg', 'NONE')
    else
      call s:set_color(grp, 'fg', bg)
      call s:set_color(grp, 'bg', bg)
    endif
    call s:set_color(grp, '', 'NONE')
  endfor
endfunction

Before:

 \ 'StatusLine', 'StatusLineNC', 'SignColumn'] # Line 113

After:

 \ 'SignColumn'] # Line 113

and got interesting effect that I like.

This is somehow solving the issue, although it's not elegant.

Screenshots:

Before:

screenshot-goyo-original

After:

screenshot-goyo-modified

I hope it will help someone.

angelPL avatar May 02 '23 12:05 angelPL

Hi, I have a very similar issue. I'm trying to use Vim as a text editor on an eink screen for writing prose. I just don't want the ~'s on the side of the screen. That's why I use Goyo. It works perfectly when I'm in my terminal window, but for some reason I barely understand, on my eink screen both ~ and ^^ appear on the side and bottom of the screen.

So it's something that only happens there. To make the eink screen work I'm using a virtual terminal on Raspbian, but I wouldn't even know how to figure out where the problem comes from. Clearly it's not an issue with Goyo, but maybe someone can help us.

This issue apparently happened on more instances https://github.com/junegunn/goyo.vim/issues/186. Any help would be greatly appreciated.

javierdepascual avatar Nov 11 '23 18:11 javierdepascual