rkitover / vimpager

Use Vim as PAGER
http://www.vim.org/scripts/script.php?script_id=1723
Other
774 stars 72 forks source link

plays very poorly with python helptext #254

Closed sinback closed 4 years ago

sinback commented 4 years ago

I gave this pager a shot and it seems neat but I have to stop using it today over realizing that it's the source of something extremely annoying I've been seeing in the helptext for all of my python implementations. (In this case, that means the python2 which comes with Ubuntu 18.04, the default python3 which comes with Ubuntu 18.04, as well as a python3.7 which is in a virtual environment). In honesty I cannot even figure out how to copy-and-paste what I am seeing since selecting it with my mouse in the terminal puts vimpager in VISUAL mode and doesn't allow me to copy to the x clipboard with ctrl+shift+v like normal, and I also can't yank the lines properly (it says "n lines yanked" but I can't paste them anywhere - if I try it says "no lines in buffer") and write them to another buffer, but basically whenever I type help(foo) in the python interpreter (or ipython) all the helptext is littered with ^Hs (which represent the backspace character... omg what is python doing that it expects it to be ok to just hand all those to a pager...). It really doesn't feel like vimpager's fault since probably python? is giving? all the backspaces? I don't know, just thought I'd mention it.

Here's a screenshot of what I'm seeing since I was having trouble copying the lines themselves. image

I tried moving my vimrc so it wasn't available to vimpager, just as a way to double-check there isn't something massively funky on my end, still see the same problem. Who knows what's up!

rkitover commented 4 years ago

This is fixed in master, please update your git clone.

I'd like to get proper syntax highlighting to work for python, I'll look into it later hopefully.

As for selecting text in vim, try holding SHIFT or ALT while you select text to not enter visual mode, also see:

https://stackoverflow.com/questions/3961859/how-to-copy-to-clipboard-in-vim