Hi all,

I don't know if this is commonly used, but if not, maybe someone will
have fun with it. I know that it is nothing relly cool ;)
If there is a better way to do it, tell me :)

I work on a set of different machines with different numbers of
cpu cores. On the 8 core machine I often type
        :make -j3
if I was at the 2 core machine earlier, and vice verca.

This may make it easier:

%< -----------------------------------------
function GetNumberOfProcessors()
        let num = system("cat /proc/cpuinfo | grep vendor_id | wc -l")
        return num
endfunction

function MakeMinusJScale(numproc)
        let offset = 1
        let scale = 1
        let j = scale * a:numproc + offset
        return j
endfunction

let g:minusJ = MakeMinusJScale(GetNumberOfProcessors())
exec "set makeprg=make\\ -j" . minusJ
%< -----------------------------------------

Cheers,
        Kai

-- 
All mail clients suck. This one just sucks less.

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to