Forums

Vim users: what are your feature requests for vim usability in PAW?

Hey, three of us in the office are vim users, and we're not quite happy with the way vim works in pythonanywhere consoles. Here's a few of our niggles, we'd love to hear yours:

  • Ctrl+w kills the tab, rather than switching vim "windows"
  • not enough pretty colours!
  • default font size is too big

None of us are emacs users I'm afraid, but we'd love to hear your suggestions too, maybe in a separate topic?

Ctrl-W is definitely annoying, I want Elflord as default colour scheme.

Font size is about right, maybe half a pt smaller?

There's something wrong with vim installed in PAW. It won't load pathogen plugins when used from .vimrc with normal:

call pathogen#infect()

I had to resort to a workaround and use:

call pathogen#infect("~/.vim/bundle")

It looks like Pathogen uses the vim runtime path to determine where to infect. If you run :set runtimepath? in vim, what does it show?

The issue appears to be related to glob(3) pattern expansion. pathogen uses "*[^~]" expecting it to match any file name not ending in '~', and that does work on system where glob conforms to XCU section 2.13.1, which expects '!' to be used as a circumflex character.

Using an changes the logic inside pathogen.vim and makes it use a different glob pattern without the non-matching list

The last paragraph above should read: "Using an [explicit path above] changes the ..."

Thanks for that analysis. It's really weird that our (mostly stock) LInux installation doesn't conform to that standard. I'll have a look and see what I can work out.

checked vim source - it doesn't use glob(3) and implements its own with readdir and regexp filter. can't image how paw vim manages to handle '!' in the pattern.

compare outputs of the following vim commands on paw and other systems:

: echo glob("[^~]") : echo glob("[!~]")

The first works in many places I tested. The second works in paw.

... oops, markdown ate asterisks in front of left square bracket in glob patterns. let me try again:

: echo glob('[^~]') : echo glob('[!~]')

Ah. Very interesting. It looks like theirs a library or something that is omitted in the environments for our users. I see the difference when running vim in a user environment, but not when running vim on the underlying machine. I'll see if I can work out what it is.

Thanks for the investigation. It's very helpful.

I tried to use powerline with vundle. It installs but without special characters. set guifont doesn't seem to be supported. fontconfig and fc-cache do not work either. Is there a way to provide the patched fonts they provide? Powerline would be nice.

The font is set in css, so there's no way to change it from inside vim. You could try using a custom stylesheet, and see if it works? That would be a cool hack -- let us know if it works.

Re: the pathogen thing, I had a discussion about it on their github a while back, but glenn is right to say that it's an issue with our sandboxing. We need to investigate... In the end I decided to give up on using pathogen for most modules...

hp

Re: custom stylesheet. Well I am currently not familiar with jquery. Could you give me a quick shortcut on where to put my custom.css stylesheet and my font and where to activate it? I will then gladly do the testing. But currently I am stuck. I already created a jquery theme via theme-roller but where to put it and how to activate it?

Here's a guide I just found -- I haven't tried it myself though...

http://brugbart.com/Articles/custom-style-sheets

I am successfully using bigger font in the console. Here is my trick on chrome: 1) Install Stylebot plugin 2) Create a new style in Stylebot for url : pythonanywhere.com 3) Place the css patch: #vt100 { font-family: DejaVu Sans Mono, Consolas, monospace; font-size: 14pt;}

I have been using a similar trick in the past on Firefox with the Stylish plugin.

Hope that helps

@derivationBud Yes it helped. Thanks a lot. But since Stylebot does not yet support font-face I just changed the font settings in google for monospace. Now powerline is usable. @hansel: It would be great if one could supply a custom.css that would be taken if there instead of the static one.

I'll add that to the list.

I am lifting this old thread since it is now solved using airline-vim. But I face a new problem: Using different colors as background and text. I analyzed the site and came up with two line of javascript to change the colors:

document.getElementById('id_console').contentDocument.getElementById('terminal').firstChild.contentDocument.getElementsByTagName('x-screen')[0].style.backgroundColor='#ccc'; document.getElementById('id_console').contentDocument.getElementById('terminal').firstChild.contentDocument.getElementsByTagName('x-screen')[0].style.color='#111';

I would love to see being able to set the colors natively. Any ideas how to apply this. The iframe within iframe makes tampermonkey and greasemonkey difficult to use.

Just use a different color scheme in VIM.

Hi Glenn, for VIM this is ok, but for the bash, python and ipython consoles what do I do there? (Escape sequences are such a pain)

Hmm, perhaps we're confused about what you're trying to do. Could you give a little more detail?

Well, in my current working environment a black background is not good for it draws a lot of attentions. So I change the background of the console with the above 2 lines. From within Firebug or Chrome Developer Tools this works fine. But I always have to paste it in. An option to change the appearance (theme) would be great. Almost any PAS offers this. And there are more reasons than just taste. In my case as I said: Not to draw attention to what I am doing :-)

Cool. I've raised a ticket for console color themes and upvoted it for you.

Thanks Glenn.