0

I have an old 256mb usb drive that I'm using as a place to store text files. Scratch notes, links, todo lists, and a personal journal logfile.

I installed vim onto the drive in order to always have a decent text editor, even if I'm switching between computers, quickly editing something on someone else's machine, etc.

I'm not worried about hitting the drive's capacity any time soon: the vim install directory itself takes up more space than all the other text, and vim's pretty small.

But if I was to somehow fill the thing with 2 million or so characters of text, what could I safely delete from the vim install directory to clear up some space?

(Of course this isn't an urgent question, just a fun exercise in minimalism.)

Gray
  • 109
  • 1
  • 256MB! how much would GB level USB-stick cost? ... I don't think removing vim files would solve your problem. you can check how big the whole vim is. – Kent Jan 15 '14 at 19:08
  • hah, @Kent, it's not about not having a drive large enough, it's about doing something creative with this old one I've got laying around. – Gray Jan 15 '14 at 19:51

3 Answers3

0

Assuming you are on Windows, you are going to notice that installation from vim.org uses around 30 mb, which leaves space for plenty text.

If you still believe it is necessary to have Vim use less space, you could try the portable version from PortableApps, which is very stable and uses ~15 mb.


Edit:

Actually the latest gVim Portable (7.4) doesn't save much space. The ~15 mb mentioned refers to version 7.3, which was compiled with a reduced set of features (e.g.: -perl/dyn).

Instead of deleting files as filetype plugins and colorschemes, which are usually very small, you should consider compile Vim enabling only the features you actually use. There are a large number of such features, as can be seem with :version command.

mMontu
  • 8,983
  • 4
  • 38
  • 53
  • 1st time to know that there is vim "portable version". I have been using the "unportable" vim? ^_^ – Kent Jan 15 '14 at 19:26
  • @Kent "unportable" or "insupportable"? :D I've used this portable version for years, and it works very well -- not surprising, as it is compiled by Bram. – mMontu Jan 16 '14 at 09:38
0

If you want absolute minimalism, you can delete everything and just keep vim.exe (and any required DLLs). You can also reduce vim.exe's size from 1.6 MB to 0.8 MB by using UPX. If you want to reduce vim.exe's size further, compile it yourself removing any flags that you don't need.

You can additionally include your .vimrc, some syntax files, your favourite plugins, etc. The size of this depends on you.

So theoretically you could get your vim installation below 0.8 MB.

priomsrb
  • 2,602
  • 3
  • 26
  • 34
0

I'd start by removing syntax, filetype, and compiler plugins you never intend to use. All the colorschemes could also go, to be replaced with just the one you use (if any).

Ben
  • 8,725
  • 1
  • 30
  • 48