-
-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
set_tab_dist() does not work #290
Comments
Should be fixed in master, had an error flag check inverted :-( PS. OK, now you've me curious, what is the practical application of setting the tab distance in a macro? |
If you must know... I am working on a macro version of editorconfig support, which might be helpful to nedit 5 users too. Actually, this is also what prompted me to submit issue #288 . BTW, I also wonder if any other macro functions might be having some kind of issues too. Not knowing what level of testing you have done so far. |
I checked :-). There was one other macro ( |
BTW, very cool about trying to implement |
Yup, that's the idea. I managed to get the indentation/tab setting working with your fix commit. It's pretty dumped down right now, but a good start nonetheless. I'm a little upset with the fact the functions must be defined in a .nm file, and not within macros, which makes the macro much less sharable. Something for future enhancement maybe. If we upgrade the macro capability enough, there's actually quite a lot of things could be potentially done without hacking the source code. Or we could switch to python :-P |
Honestly, I would LOVE to switch to python, it's on the TODO list 100%. The main hold up is I need to figure out a clever solution for being able to suspend/stop a python script in progress. For NEdit macros, we literally implement a VM and execute a bunch of "instructions" at a time, periodically checking if we should let the main code do something else. With python, I think for starters, we'll want to shove the work into a separate process so it's truly concurrent with NEdit (and also won't crash nedit if it crashes). But we'll still need a mechanism to say "stop the script" |
Back in around 2005, I managed to squeeze perl into nedit 5 as a proof of concept hack. That was history. I feel the python integration is probably something for 7.0 or beyond, and it's definitely going to a great feature. But we should not sideline nedit macro. It has proven itself useful over the years, and maybe just need to upgrade a little to make it more useful. One other idea is perhaps we can add something like the system() or eval() functions to the macro engine, so we can call external perl/python script to process the data and then feed the result back to nedit via pipe or some files. Might not be as simple as it sounds though ;-) |
I agree. I actually wouldn't ever remove nedit macro support. Python would just be the new recommend way. |
Tried to run "set_tab_dist(10)" in a macro. The tab space does not change and there's a warning message on the terminal window:
Using nedit commit 3d7f8ca
The text was updated successfully, but these errors were encountered: