On 2009-09-03, Robert Hicks wrote:
> Is there a way to set a temp and backup location for users using a
> global vimrc like:
>
> my name is "rlhicks"
let my_name = system('whoami')
(You may need to remove a trailing newline from that.)
> when loading vim it checks to see if the following are there:
>
> /tmp/rlhicks/backup
> /tmp/rlhicks/temp
>
> If they are it uses them...if they aren't it creates them an uses
> them.
let backup = '/tmp/'.my_name.'/backup'
if glob(backup) == ''
mkdir(backup)
endif
> If doing something in home would work:
>
> /home/rhicks/.vim/backup
> /home/rhicks/.vim/tmp
>
> I am sure I can use a shell script to check and create the directories
> but wondering if I can do it all from the vimrc.
You should be able to. See
:help functions
for a list of built-in functions.
HTH,
Gary
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---