On Thu, Sep 03, 2009 at 01:52:23PM -0700, Gary Johnson wrote:
> 
> 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.)

You could also get the value of the $USER env variable:
let my_name = $USER

This will either be a string or empty, depending upon whether $USER is
defined.  I find this simpler because you don't have to strip
a newline, and it's (unnoticeably) faster since you don't need to
spawn a few child processes.

-- 
Erik Falor
Registered Linux User #445632 http://counter.li.org

Attachment: signature.asc
Description: Digital signature

Reply via email to