Can't figure out how to setup gVim on Pandora


Karig

Still Fresh
Joined
Dec 19, 2013
Messages
5
Location
Northern Virginia, USA
I'm not sure if this is the place for app questions, but here goes:

Has anyone here used gVim on the Pandora?

I ask this because I just got my Pandora and now I'm trying to use the gVim PND on it. I've got the PND file on my SD card, in the "pandora/menu" folder, so it shows up in the Start Menu, and I can load and run gVim. But it does not load the .vimrc (configuration file) I copied into my home directory, nor can it even find its own help files -- typing ":help" produces the error messages "E433: No tags file" and "E149: Sorry, no help for 'help.txt'".

Has anybody gotten past this point?

EDIT -- TWO HOURS LATER:

Poking around on the Pandora, looking for clues. It seems that the Pandora expands the gVim PND to a bunch of files at /mnt/utmp/gvim, including a script at /mnt/utmp/gvim/scripts/vim.sh that insists on setting the HOME folder to "/mnt/utmp/gvim" instead of at "~", you know, the actual home directory. So I'm supposed to put my .vimrc in there?

(Copies .vimrc in there, relaunches gVim)

Now gVim obviously finds my .vimrc, because the font is different, but gVim complains about not finding Pathogen (a plugin for gVim, which I haven't copied over yet).

Now this bothers me a little. I thought that you were supposed to be able to keep your config information on the SD card. Is that not true in the case of gVim? Am I supposed to copy all my Vim files and plugins and colorschemes and whatnot into /mnt/utmp/gvim? (Is that even a permanent directory that I can count on being there, or would /mnt/utmp/gvim be "unmounted" and go away if I shut down the Pandora, thus requiring me to recopy my plugins into the folder all over again regularly?)

Or is the problem just the vim.sh that sets up the environment variable for HOME and then launches gVim? If so, does the PND need to be rebuilt, with an updated vim.sh???

What would be the right thing to do here?
 
Last edited by a moderator:
/mnt/utmp/Pndname is where /media/SD/pandora/appdata/Pndname gets mounted to, so drop your .vimrc in there and your configuration can all live on the SD card.
 
And also an explanation might be in order: Due to the space on the NAND (where the main filesystem including the "real" $HOME lives) being limited both in terms of space and writecycles (although the latter matter less than the former), it is generally considered a bad idea to use the real $HOME as a place to store stuff. A .vimrc isn't very big, but consider i.e. what happens if you have firefox placing its cache directories there - The free space might fill up in a few sessions. 

That's why every pnd has its own "shadow home" placed in /media/{SDLabel}/pandora/appdata/{appname} - That way, all the files end up on the same SD-card as the PND (and thus follows the application), and when it dumps a lot of data, it doesn't suddenly cause the internal OS to be unworkable.
 
Ah, now I get it. The /mnt/utmp/{appname} folder is just a link to /media/{SD_card}/pandora/appdata/{appname}. Now it makes sense.

And now I've copied my stuff into the "appdata/gvim" folder, and gVim is working.

Thanks, guys.
 
One final note: I was still missing the help files.

It seems that the standard PND for gVim is missing some stuff. I ended up downloading the gVim 7.2 tarball, unpacking it, going into the "runtime" folder, and copying the "doc", "syntax", and "tutor" folders into "/usr/share/vim/vim72".

Lo and behold, I got my ":help" back in gVim.  :)

(Although I suppose the "/usr/share" folder is in the NAND and I should probably figure out a way to put links into the "vim72" folder rather than actual files...)
 
Last edited by a moderator:
Back
Top