Last active
August 29, 2015 14:13
-
-
Save hymkor/d2d6298d24960c41f4e2 to your computer and use it in GitHub Desktop.
Not advanced .nyagos example which exists on zetamatta's %USERPROFILE% directory.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- vim:set ft=lua: | |
local home = nyagos.getenv("HOME") or nyagos.getenv("USERPROFILE") | |
if nyagos.access(home .. "\\GoSrc\\nyagos\\Src\\.nyagos",0) then | |
loadfile(home .. "\\GoSrc\\nyagos\\Src\\.nyagos")() | |
end | |
addpath(home.."\\bin") | |
addpath(home.."\\Local\\go\\bin") | |
addpath "C:\\Program Files\\Mercurial" | |
addpath "C:\\Program Files\\Subversion\\bin" | |
addpath "C:\\Mingw\\bin" | |
addpath "C:\\MinGW\\msys\\1.0\\bin" | |
addpath "C:\\Program Files (x86)\\Ruby-2.1\\bin" | |
set{ | |
GOROOT=(home.."\\Local\\go"), | |
GOPATH=(home.."\\GoSrc"), | |
} | |
if nyagos.getenv("PROCESSOR_ARCHITEW6432") == "AMD64" then | |
addpath(home.."\\bin64") | |
addpath "C:\\Program Files (x86)\\IronPython 2.7" | |
addpath "C:\\Program Files (x86)\\Git\\bin" | |
addpath(home.."\\App\\vim74-kaoriya-win64") | |
else | |
addpath "c:\\Program Files\\IronPython 2.7" | |
addpath "C:\\Program Files\\Git\\bin" | |
addpath(home.."\\App\\vim74-kaoriya-win32") | |
end | |
set{ | |
HGMERGE="gvim.exe -d", | |
HGPAGER="more.com", | |
EDITOR="gvim.exe", | |
PAGER="nkf32.exe -w8 | cure", | |
GIT_PAGER="nkf32.exe -w8 | cure", | |
TERM="msys" | |
} | |
alias{ | |
make = function(args) | |
local joined = table.concat(args,' ') | |
if nyagos.access(".\\make.cmd",0) then | |
x('.\\make.cmd '..joined) | |
else | |
x('nmake '..joined) | |
end | |
end, | |
unitar="minitar --convert-charset=utf8", | |
bind=function(args) assert(nyagos.bindkey(args[1],args[2])) end | |
} | |
addpath "%USERPROFILE%\\Share\\bin" | |
nyagos.bindkey("C_X", | |
function(this) | |
print("\nthis.text: [" .. this.text .. "]") | |
print("this.pos: " .. this.pos) | |
return false | |
end | |
) | |
nyagos.bindkey("M_A", | |
function(this) | |
local curdir=nyagos.getwd() | |
nyagos.setenv("DOCHDIR",curdir) | |
nyagos.shellexecute('open', nyagos.exe,'',curdir) | |
end | |
) | |
local DOCHDIR=nyagos.getenv("DOCHDIR") | |
if DOCHDIR and string.len(DOCHDIR) > 0 then | |
nyagos.exec(string.format('cd ""%s""',DOCHDIR)) | |
nyagos.setenv("DOCHDIR",nil) | |
end | |
nyagos.alias('up','source up.cmd') | |
x[[ | |
source "C:\Program Files\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x86 | |
source "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x86 | |
]] | |
alias { | |
hoge=function() | |
local path=nyagos.eval('pwd') | |
print('"'..path..'"') | |
end | |
} | |
nyagos.setrunewidth('Φ',2) | |
nyagos.alias('foo',function(args) | |
for i=1,#args do | |
print(i .. " " .. args[i]) | |
end | |
end) | |
--nyagos.bindkey("ALT-A",function(this) return "ALT-A" end) | |
print ".nyagos done" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment