On 13/08/12 22:23, Bee wrote:
> I use a perl script to align columns:
> http://entable.s3.amazonaws.com/index.html
> from vim
> :!./entable
> which works great.
>
> I have a function that does a cd then executes the range for entable.
> I do not want to add the path to entable, so I simply use ./entable
> That also works great.
>
> I work on Linux, Mac, and PC.
> I copy .vimrc, .gvimrc and .vim folder to each machine.
> I would like entable to be in the .vim folder for portability.
>
> The question:
> Which folder within .vim is the best?
>
> Bill
>
No built-in Vim command should execute that program. For simplicity I
would put it in .vim/ itself, or else you might want to create a custom
directory for executable scripts and binaries, let's say ~/.vim/bin/ or
something.
Under Linux or, I think, Mac you can create a softlink from there to
wherever the program is already to be found (see "man ln" at a shell
prompt). Recent Windows versions have hard links, which are poorly
documented if at all. I don't know if they have soft links that Vim's :!
command can use.
Note that binary executables are not compatible between Windows, Linux
and Mac; as for shell scripts, in the simplest cases it is possible to
write a cmd.exe *.BAT file in such a way that bash would execute it
correctly, but in most cases it isn't.
Also, your user scripts are expected to be in ~/.vim/ on Mac or Linux,
but on Windows it's ~/vimfiles (or, in Windows cmd.exe notation,
"%HOMEDRIVE%%HOMEPATH%\vimfiles"). Except of course for Cygwin Vim
versions built for the Cygwin environment and requiring the Cygwin DLL.
(OTOH, Windows Vim will look for .vimrc and .gvimrc if _vimrc and
_gvimrc are not found).
Best regards,
Tony.
--
America was discovered by Amerigo Vespucci and was named after him,
until people got tired of living in a place called "Vespuccia" and
changed its name to "America".
-- Mike Harding, "The Armchair Anarchist's Almanac"
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
Monday, August 13, 2012
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment