Komodo Edit: Running macros via keybinding versus toolbar - text

Question: Is anyone out there familiar enough with Komodo Edit to shed some light on this macro? I need to figure out how to do buffer text selection in a macro when it is invoked via the tool panel.
Problem: I have a very simple macro in Komodo Edit javascript that works as expected, but only when invoked via a custom keybinding. If the user tries to invoke it from the standard "tool panel" the selectWordLeft invocation does nothing. My guess is the failure is caused by the edit buffer not having focus, but one would have thought that telling the macro to expressly give focus to the buffer would work.
komodo.view.setFocus();
komodo.doCommand('cmd_selectWordLeft'); /// this NO_WORKY
Background:
Komodo Edit, version 5.0.2, build 2604, platform win32-x86.
Built on Wed Nov 19 18:33:41 2008.

Answer: Did some more searching and came across this response to another question on a KE forum; which seems to fix the problem.
Instead of deleting the question, here's an answer in case anyone else out there has the same or similar problem.
There are currently some issues with komodo.docommand and some commands.
To work around this, change this line:
komodo.doCommand("cmd_selectWordLeft");
to this instead:
komodo.editor.wordLeftExtend();

Related

Awesome WM help popup messed up (possible soluction with new function)

NOTE: I just started to use awesome not very long ago, and don't really know the lua programming language.
I cloned HikariKnight's awesome theme and started to customize the hotkeys. I have a logitech keyboard that has some launcher keys that will open you default apps (on windows that is). I wanted to make them open the default apps here, so I edited the config. Now the help menu has the name of some of the keys repeated over and over for no apparent reason.
If anyone could help me fix this that would be awesome.
Possible Solution(?)
I might be able to use the new function to use the hide_without_description option. This wouldn't be ideal though as it would just remove the hotkey from the help menu.
I found the documentation for it here, but don't know how to use the new function.
https://www.reddit.com/r/awesomewm/comments/mgqq95/messed_up_help_menu/gszd5u0/?utm_source=reddit&utm_medium=web2x&context=3
To quote PlatformKnuckles:
I think I see the problem. Check the line in the keybindings file:
for i = 1, 9 do
You're starting the keybindings in a loop multiple times.
(I didn't look at your rc.lua at all. I just assume the answer above is correct.)

How to expand an UltiSnips snippet using <c-y> in the YouCompleteMe pop-up menu?

This problem really hit a nerve with me. I have both YouCompleteMe and UltiSnips installed on my vim 8.0 editor. It seems that both of these plugins use the tab key for doing the auto-completion and that has created an incompatibility that has been also addressed by this question. My question is more specific, though. When I write a piece of code like <html, there is a pop-up menu that shows me all related snippets for that code.
I use the tab key to navigate through that menu but when I hit ctrl+y to accept and therefore expand one of these snippets, nothing happens! I think this structure suggests that it's possible to somehow choose one of those snippets from the menu without trying to define a shortcut for UltiSnip. What am I doing wrong? How should I navigate and choose those snippets?
I also would not want to stuff my vim with any new plugins (like supertab, etc.).
The solution was actually a lot simpler than I expected. In the beginning, I felt stupid for not knowing it but when I find a similar question like this one, I thought that probably many were fallen into the same trap.
I don't know whether to name it a bug or not but it's how Ultisnips and YouCompleteMe work together. In order to expand a snippet, you have to write the initializer exactly as it's defined. Of course, this seems obvious, but when you see a pop-up menu of different snippets, you might think they can be chosen but it only works if you already wrote the snippet initializer exactly as it's defined.
So when a snippet is called "html5"---as it's shown in my question---writing an extra opening bracket (<) will cause it to stop working. It cannot be expanded.
Also, don't forget to check out Siegfried Gevatter configuration. It's not possible to use tab key both for navigating into the pop-up menu and expanding the snippets.
P.S. It was nice if navigating through the pop-up menu could change the whole word (including the angle bracket), not just what succeeds it. This feature works this way in most of the other editors I see and that's probably why I wasn't able to spot the problem in the beginning.

VBA editor in any Office 365 app not opening anymore

I am using VBA in most of my office 365 applications for many years now. Last week an error appeared that I can't fix anymore, without having to create a new profile in windows (according to Microsoft helpdesk). Besides that this is quiet a lot of work that I would like to avoid, if this is the only solution, I like to know what happened and why, to prevent future errors.
Problem: in any office 365 application, when opening the vba editor, in the taskbar, a window appears that I cannot open and that looks like a corrupted editor window. Hence I cannot edit my code anymore. The code is runnable though from the developers-macros-run-menu.
Cause: I ran a code from ms-word, that saves the pages from a merged document into separte files, .docx and .pdf. The code was running fine, but after a little editing started to quit before the last page was reached and after some time trying over, I couldn't open the editor anymore. I am not sure if this error is caused by the code, or something else.
Unfortunately I cannot display the code here, because I can't open it anymore.
I updated Office 365 to the last version, without any result.
Creating a new Windows-account solves the problem, but implies that I have to reinstall many apps and services.
Does anyone have had the same experience, what is the problem and/ or what can I do to restore this error other than the new-account solution?
The VBA Editor window moved off screen. This might have been caused by accidentally pressing WINDOWS KEY + SHIFT + ARROW (not likely), or by a problem in windows 10.
For a solution see https://superuser.com/q/53585
I'd the same problem.
That´s just a question of hidden windows. Just press shift and left click on top of the code window in the task bar. Then select maximze and your window will appear.
Hope it helps.
Joao

Dreamweaver Coding Hint won't go away

I've had this issue several times and usually I can just shut down the program and restart it. But this time I have a bunch of windows open and I don't want to restart Dreamweaver.
My problem is that Dreamweaver brought up a code hint, but the code hint box now won't go away. It just sits there floating in the middle of the page. It doesn't matter if I click to Preview or any other tab in Dreamweaver, it still just sits on top of everything.
I'm working on a Mac, Dreamweaver CC (cloud, fully updated). Anyone else have this problem???
This has been a HUGE PAIN for me as well! You can make the code hint disappear though by finishing out an element that is in the code hint box. For instance if the code hint box appears and you can see class in the drop down... create a <div class="xyz"> real quick and the code hit box will dissipate after you close the quotes on the class because you used an element in that box. As to why this continually happens on the Mac version I have no idea, but I hope they fix it soon!
It's a known bug since years as you can read here: https://forums.adobe.com/message/7745689
Someone suggests as a workaround to set the Coding Hint delay to 0 (as said here: https://forums.adobe.com/message/7745689#7745689) but for me, in Dreamweaver CC 2015 Windows fully updated via cloud app, this bug still occurs while I code JS files.
Awaiting for a final fix, I hope this suggestion can be useful for you on Mac. :)

VBA editor auto-deletes spaces at the ends of lines

Is there a way to convince the VBA editor in Excel to stop auto-formatting lines to remove the space at the end when I pause in my typing for a quarter second?
I had this exact problem and the following worked for me.
Click the Microsoft Office Button, and then click Excel Options
Click the Add-Ins category
In the Manage box, click COM Add-ins, and then click Go.
Look for an add in called 'Load Test Report AddIn' then uncheck it
restart excel
This addin is installed with VS2010 Beta2
In Excel 2010, toggling Design Mode button on the Developer Ribbon Tab solves the problem for me.
I've definitely had that issue before, where the vba editor would format as I was typing (not just when I went to another line). For me, it seemed to be related to a Microsoft Web Browser control that I had in an open workbook. When I took out the web browser, the VBA editor started acting normally again. I have no idea why that worked, but it did. Now I avoid using that control in my workbooks.
Something is causing your spreadsheet to recalculate while you are in the VBA Editor and this 'compiles' your code and thus strips the spaces. You need to stop the cells recalculating while you are editing. Turning the calculation to manual in the spreadsheet.
Tools > Options > Calculation should do the trick.
I noticed this when I had cells recalculating thanks to a DDE connection.
There is sort of a way to turn off the auto-"correction" in the VBA Editor.
Tools Menu -> Options -> Editor Tab -> Clear the Auto Syntax Check box
Sadly, this won't solve all your problems, as the VBA Editor tends to have a mind of its own, for better or worse.
Taking it out of design mode fixes it every-time on vba2003 - its was driving me crazy at first ... i did notice it might have something to do with the web control but when i take it out of design mode it works fine ... just toggle that to get it to behave :)
I have had this same problem several times recently, and has driven me crazy.
After reading this post all the different fix-ups mentioned (none worked for me), I recalled I have been playing lately with Internet Explorer Control, opening Internet Explorer from VBA.
This is mentioned in some of the answers in this post.
This got me in the right path and, in order to fix it, I had to first delete all iexplore.exe instances (alt+control+delete), closed Excel and open excel again.
(iexplore.exe had been opened invisible from the VBA code, and I didn't know they were running)
That fixed the bug.
I have been programming quite heavily with VBA for over 4 years, and never had this problem.
Just a couple of weeks ago I started using IE control, and I started getting this problem...so in my case I can only assume the bug is directly related to the IE control.
I am running both excel 2003 and 2007 in same PC at the same time, and the problem only happens with excel 2007.
None of the above for me.
I had a Application.OnTime timer that fired every second and this triggered a recalculation of something: commenting it made my day.
This has started happening to me recently after adding a Timer event to an Access 2007 form. The VB editor "finalizes" the current line (as if you had moved the cursor off of the statement; I have auto syntax checking off) each time the event fires (initially I had it set to 1 second, now it is set to 5 seconds, and the behavior scales accordingly). In order for the event code to execute, the application has to ensure that it has been compiled. Presumably, the editor needs to be in a "sane" state to do this, as it probably has to check for code dependencies among modules. Note that the behavior occurs regardless of whether any dependent code is actually loaded into the editor at the time. Note also that resetting the execution state doesn't affect the timer event firing. As a practical matter, one could close the triggering form, switch it to design view, set a breakpoint in the triggered code, or increase the timer interval while working with the editor.
In contrast to abhishek's comment, changing the settings of Tools/Options.../General/Compile On Demand and/or Background Compile did not affect the issue.
If it helps, none of the previous answers solved mine. Only solution appeared to be to close the xls file and reopen it. Frustrating to have to do every 30 mins but at least it works. Would love to know why it's recompiling and cleaning the text... should really be an option to disable the text cleanup but couldn't find it.
Turn off Tools > Options > General > Background Compile. This solved it for me.
This is a long standing problem that could have various causes. I had this same issue occur in the Access VBE (so naturally the Excel answers weren't relevant). After a LOT of digging I finally got it fixed with the solution below. First a recap though:
If you are here because of this issue in Excel, try the solutions above first. To summarize:
The most common issue in Excel is that the Design button is toggled. Toggle that and see if the behavior changes as submitted by Dmitry Frenkel above
If that doesn't work, check for the "Load Test Report" AddIn as mentioned by Ade.
Those are really the two main causes in Excel, but if neither of those solutions work, then scroll through the rest of the solutions here. All are valid possibilities for the cause. In Access the cause is pretty straight forward. It's a timer issue on a form somewhere. I found this solution from here by User Kevin K. Sullivan.
Copy the following line of code onto the clipboard. (You might need to
paste it into a text editor first and coerce it onto one line, depending on
your newsreader. It must be one line.)
For i = 0 to Forms.Count -1: Debug.Print Forms(i).Name, Forms(i).TimerInterval: Next i
Switch to Access.
Press Ctrl-G to go to the Immediate Window.
Press Ctrl-V to paste in the code.
Press enter to to run the code. All open forms will be listed. Any non-zero timer intervals are your culprits. Simply close that form (It may be invisibly open from another process than the one you thought you were dealing with).
I think the solution for Access here is what the user Dom was trying to say above. I guess the down votes were because it wasn't explained very well and/or because he was speaking of Access when the OG issue was in Excel. Regardless, he is likely on point if you are here because of the VBE in Access.
I hope this helps people. I know I kept finding this page when researching this issue, so that's why I thought I'd update this solution here.
I hit this problem today on a fresh install of Excel 2010 Beta 2. None of the above made any difference, but going into the trust center and disabling all application add-ins fixed the problem for me.
I have Office 2010 Pro and I had the same issue. As I type the space between each word was being deleted. After trying each of the options turning them on and off the only way I found working was to disable the Winzip Courie(excel) add-in. This is done thru the Options dialog box Add-Ins section.
In office 365 I had the same issue - what worked for me is I saved the file with a different name and when I re-opened the new file the problem went away.
I found this issue pops up when I had AutoSave on. Turning that off let me code without it compiling every second.
I don't think I've ever seen the VBE remove a space when I've stopped typing. It will remove trailling spaces from lines if you move to another line, but that's something different and not behaviour that I think can be altered.
The removal of spaces in the VBA editor for Access occurs when a form is open in Form("Execute") mode. This is probably due to background executions based on "On Timer" methods. Close the form in Access solves the problem in VBA.

Resources