PortableApps.com Platform and Suite 1.6 have been released.

gvim swap files

Submitted by besonen on November 4, 2009 - 3:12pm

gvim portable does not create swap files. this is important because these are used by gvim for file recovery.

i attempted to manually force the creation of swap files by adding these lines to my _vimrc file:

set updatecount=50
set updatetime=1000

no go.

any ideas on how to make gvim portable create swap files?

thanks,
david


( categories: )

Disabled for portability

I disabled this for portability reasons (so that the swap files don't get left there). Besides, I've had them disabled myself for a long time because they caused trouble. Looking back on it now, I could have modified the default vimrc file to set dir=$TEMP (which lands on the disk) and not pass -n. I might think about this for the next release.

You can do it manually in the mean time by editing Other\Source\gVimPortable.nsi, line 137, and remove the "-n " argument from there, and then recompile it with NSIS Portable, then it'll work for you.

I am a Christian and a developer and moderator here.

“It is in vain that you rise up early and go late to rest, eating the bread of anxious toil; for he gives to his beloved sleep.” – Solomon, Psalm 127:2

recompiling without "-n"

Chris Morgan I disabled this for portability easons (so that the swap files don't get left there).

"there" being the portable media?

Chris Morgan I've had them disabled myself for a long time because they caused trouble.

what kind of trouble did you experience?

Chris Morgan Looking back on it now, I could have modified the default vimrc file to set dir=$TEMP (which lands on the disk)

i would think you would want to set the swap file location to the gvim portable directory. that way if the system crashed the recoverable swap file would be with the portable media.

Chris Morgan and not pass -n. I might think about this for the next release.

but as long as you were not passing "-n" then the local portable app directory can be specified in the vimrc file.

could you re-release gvim minus "-n" within the next two weeks?

Chris Morgan You can do it manually in the mean time by editing Other\Source\gVimPortable.nsi, line 137, and remove the "-n " argument from there, and then recompile it with NSIS Portable, then it'll work for you.

thanks for that tip. unfortunately i'm not familiar with compiling with NSIS Portable. so i kind of need to wait until someone else recompiles gvim.

if you think it might take me less than half an hour to recompile gvim with NSIS Portable, point me to some explicit instructions and i'll work on it.

thanks,
david

[Reformatted to make it much more readable - mod Chris]

I disabled it so that swap

I disabled it so that swap files won't get left anywhere - the main drive or the USB drive.

I just had trouble with them in earlier versions of Vim which were less stable, and also didn't like having the swp files there (they got in the way with the tab order in Command Prompt and things like that). They (and the backup files which I disable) got in the way with backups too. Now I wouldn't mind so much having swap files again... but I'm happy with them off myself.

$TEMP goes inside gVimPortable\Data\temp, so if I did that it would end up in the gVim Portable directory. (Sorry, I wasn't clear with "disk".)

I don't think I'll re-release it; it's a very minor thing which most people won't care about. I'll wait till Vim 7.3... or 8... or whatever Bram releases next (if it was something important I'd redo it with the latest patch level, 284).

However, you can do it for yourself easily. Steps to do it:

  1. Edit gVimPortable.nsi, removing "-n " from line 137.
  2. Download, install and run NSIS Portable.
  3. Click on "Compile NSI scripts".
  4. Click on "Load script".
  5. Navigate to gVimPortable.nsi and press OK.
  6. Wait until it's finished.
  7. Start using your new gVimPortable.exe Smiling

If you feel like it, you can even bypass steps 2c-5 by dragging gVimPortable.nsi to NSISPortable.exe.

I am a Christian and a developer and moderator here.

“It is in vain that you rise up early and go late to rest, eating the bread of anxious toil; for he gives to his beloved sleep.” – Solomon, Psalm 127:2

recompile and unofficial release hosting

thanks for the step-by-step instructions.

once i recompile it could portableapps.com host it unofficially? i've downloaded many beta portable apps and have often noticed that they are hosted on sites other than portable apps. does portableapps.com have a policy of only hosting official releases?

thanks,
david

No

There's no real need for it to be hosted anywhere. No-one else has complained about it. Just do it for yourself and I'll think about how it's best to tackle it for the next release.

I am a Christian and a developer and moderator here.

“It is in vain that you rise up early and go late to rest, eating the bread of anxious toil; for he gives to his beloved sleep.” – Solomon, Psalm 127:2