Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#191 Searching for macros in current working directory!

open
nobody
None
5
2007-12-12
2007-12-12
encorejane
No

Having the macro-searcing process extend to the current working directory would be really useful, as project-specific macros could be loaded and used. I came up with this while thinking how nice it would be to have my own custom compile/run routines for a python file, or a java file, or a perl or whatever. Moreover, commandline parameters and other paths and files could be easily specified with flexibility without having to type them repeatedly. This was my solution to the problem, by adding these lines to Macros.java's loadMacros() method:

String cwd = null;
if(jEdit.getActiveView() != null){
cwd = jEdit.getActiveView().getBuffer().getDirectory();
cwd = cwd.substring(0,cwd.length()-1);
cwdMacroPath = MiscUtilities.constructPath(cwd,".");
loadMacros(macroHierarchy,"",new File(cwdMacroPath));
}

And of course add "private static String cwdMacroPath;"

Discussion