The most common shortcut in Textmate doesn't work? - c#

The shortcut for jumping to the beginning or end of a line of code with ⌘ + → or ⌘ + ← does not work. I just get a MaC OS X system beep.
I believe this shortcut is universal to the Max OS X platform, and not specifically TextMate, and it and it does work everywhere else (TextEdit, StackOverflow, etc.).
Why would TextMate conflict with it, and not work?
It does work on my other Mac in TextMate. Is there a configuration I can change somewhere? I tried reinstalling TextMate.
Update
I was on Textmate 1.8, and upgraded to 1.9 .
I noticed this in the Release notes :
[FIXED] Add local key bindings for command + arrows (as there are no defaults in Snow Leopard) - ticket 0FDE7076.
Now when I do ⌘ + ← It closes the application, and goes to whatever app is also being used by finder.
When I do ⌘ + → it works as expected.

Maybe you have a bundle item that's interfering? ⌘-Arrow does work as expected in TextMate.

I haven't heard of that shortcut, and no idea why it's not working.
I use the emacs combos that work in most Mac apps: Ctrl-A to jump to the beginning of a line and Ctrl-E to jump to the end.
Ctrl-D (forward delete), Ctrl-L (center current line) and Ctrl-T (transpose two chars) are also handy.

I finally found this! Turns out textmate doesn't work with Snow Leopard key bindings.
http://ticket.macromates.com/show?ticket_id=0FDE7076
Strange right? The files included in this link should address the problem.

Unlike many programs, short-cut keys are not defined in the preferences but it in the bundles that are loaded when the application starts.
TextMate has a bunch of places it looks for bundles and add-ons so you might have to hunt around to find the differences between the two apps. In general terms you should look in ~/Library/Application Support/TextMate and /Library/Application Support/TextMate to see what is set.
You should be able to copy the contents of the working bundle set over to the non-working computer to resolve the problem. Be sure to make a back-up of that directory first just in case you make it even worse by mistake.

TextMate doesn't use Cocoa for its main window text box, but it does implement most Cocoa shortcuts, including ⌘ + → for jumping to the end of the line.
As discussed, you most likely have a bundle that's binding that command. However, because it's TextMate, and TextMate is awesome, there is a simple and direct method to find out what bundle item that is.
Bundles->Select Bundle Item..., then click the magnifying glass and switch to Key Equivalent. Type ⌘ + → and it will show you what bundle item you're getting. This is context dependent, so make sure your cursor is in the scope where you're having problems.
If you don't see a bundle item show up, then it means some other program on your computer is eating ⌘ + →.

Related

Visual Studio 2013 stopped showing variable values when debugging

In a particular project I recently started the debugger started acting funny. When I'm debugging and it is paused at a breakpoint, Data Tips don't show up, some of the variable values don't show up in the Locals and Autos windows, and there are some strangely named variables in the Locals window (the ones starting with "CS". The other ones are my variables):
I can't for the life of me figure out what is different about this project than my other ones. I'm running Visual Studio 2013 in Windows 8.1. The project is a Windows Phone 8 project, with the only added references being Fody, PropertyChanged.Fody, HttpClient et alius, and JSON.net.
Any help would be appreciated.
I had the same problem here (also using windows 8.1 and VS 2013)
To fix it you need to open in VS Tools | Options | Debugger | General and enable the flag [Use Managed Compatibility Mode], which essentially gives you the VS 2012 function evaluation behavior.
Reference:
http://weblog.west-wind.com/posts/2013/Nov/21/Visual-Studio-2013-Could-not-evaluate-Expression-Debugger-Abnormality
[Build] => [Clean solution] has fixed this issue for me when nothing else has worked including emptying the symbol cache.
Try TOOLS->OPTIONS->DEBUGGING->SYMBOLS and hit button Empty Symbol Cache.
This did the trick for me (VS 15 on WIN 10):
Debug --> Options --> On General tab check Use legacy C# and VB expression evaluators.
I tried above all suggestions but none of them worked for me. Following resolved my issue -You can try by resetting VS settings. Tools-> Import and Export Settings -> Reset All Settings and then press Next.
If you're referring to the 'locals', you can reopen it (while debugging) by going into Debugging -> Windows
It's only accessible during a debugging session.
I was facing some weird issue on my Visual Studio 2017 (Community) installation while debugging which is how I reached this thread. I'm posting my findings in case it helps someone. Any of the already posted answer's didn't help me.
The thing was whenever I hover my mouse over a variable during a debugging session then I can see its value in tool tip but it was working only for primitive data types e.g. int, char, string etc. In case the target variable was an object or an array I will not see any way to expand the object to see its property values, internal members and things like that as shown in the screenshot below for variable A which is an array:
So to overcome this problem for non-primitive data type variables (objects and arrays), every time I will select the variable and press Ctrl + F9 to open the quick watch window and see the object members there but gradually it was becoming irritating and time consuming.
While trying various solutions present in this thread by mistake I clicked on the empty area beside the variable name in the tool tip window and whoaaa it was all there :)
In general in that empty area on the left hand side of the tool tip window, there is a plus (+) sign which we click to expand the object details but it was just that the plus (+) sign was invisible. I reverted all the options I had applied as per the suggestions mentioned in this thread and it was still working.
So I concluded it was just a curious case of invisible plus sign. Now I've a normal debugging life :P
Root cause of the problem could be Visual Studio 2017 Community (Version 15.3.0) or Windows 7 which is my host operating system(OS). As far as display drivers are concerned then that's not the case for sure as I had built this laptop more than a year back and it had been all good for all other applications.

c# read syslistview32 items tooltips via winapi

i want to write an application, which reads under windows xp the quick launch items in the order like they are located in the taskbar,
and sets hotkeys for each of these item.
windows + 1 should start the first application
windows + 2 the second, etc.
(like in windows 7)
all of these items are found i a folder, but if i read the items of this folder, i dont get the right order of these items.
i found two solutions the get the right order - first:
in the registry an entry is found, where its saved how they are located, but not in plain text. i dont know how to read this, and cant reverse engine it.
the second:
read via winapi the items tooltip from the taskbar, so i can (if there are not items with the same name) search via the name in the quick launch folder.
the quick launch bar is just a listview (syslistview32).
via sendmessage i got it work to count the items, and start one (faking a click on this item), but how the hell can i read the tooltip?
i have googled a lot, tried everything, but i didnt get it run.
i hope you have any snippets for me, to solve this problem.
cheers
Determining the order of the items in the Quick Launch toolbar programmatically is going to be inherently fragile. There's not an API exposed for this, which means that it's subject to change in future versions of Windows, breaking your code that relied on assumptions about undocumented implementation details.
However, this is less of a problem in this specific case than it normally would be, since the Quick Launch toolbar doesn't exist anymore (or, at least, no one uses it anymore). The last version of Windows that used the Quick Launch toolbar was Vista, so if you make sure that your code is compatible with Vista and earlier, you should be fine. It won't work with newer versions anyway.
The positions of items in the Quick Launch toolbar is stored in the Registry in the following key:
HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Streams\Desktop
You can extract the information from there, parse and interpret it, and then use it as you like. As you mention, this information isn't stored in plain text form because that would be very slow for the shell to load and parse itself. Since this is undocumented and not designed to be used by clients, they had no particular benefit in making it user (or developer) friendly. All that matters is what's most efficient for the shell, and storing the binary information from its internal structures is the obvious choice.
You will need to reverse engineer this in order for it to be useful to you. The way I'd go about it is probably by setting up a test environment with a couple of items in the Quick Launch bar in a particular order, exporting the information from the Registry, moving one of the items around, exporting the updated information from the Registry, and comparing the two exported Registry files to see what changed. Rinse and repeat as many times as necessary to deduce the pattern. (Really makes you wonder why so many developers actually do take the time to reverse-engineer undocumented aspects of Windows, doesn't it?)
The other option would be to use Spy++ to investigate the windows that implement the taskbar and its Quick Launch toolbar. I don't have a pre-Windows 7 system around, but it sounds like from the question that you've already done this and determined that the Quick Launch toolbar is implemented using a standard ListView. If you know the name of that window (and the names of its ancestor windows), you can walk through those windows to obtain a handle to the window you're interested in. And then you can determine the order of the items in the window as if it were a standard ListView in your own application.
The documentation for ListView controls is here; that should get you started in the right direction. You can get the text of one of the subitems by sending the LVM_GETITEMTEXT message.
This is probably the easier way of doing it. The same caveats apply--there is nothing keeping future versions of Windows from changing the names of those windows or the way that the taskbar is implemented, but since the only versions of Windows that have a Quick Launch toolbar have already been released (and therefore aren't likely to change), this may not be a big problem.
Then again, with the fact of the Quick Launch toolbar's obsolescence in mind, I struggle to comprehend why this endeavor is even worthy of investing developer time.
Also, even once you get this program all written and installed, consider what happens when the user adds a new item to the Quick Launch toolbar or re-arranges the existing items. How is your utility going to know that and adjust the keyboard shortcuts accordingly? What if an installer adds/removes an item from the Quick Launch toolbar?

How do I jump between XML doc comments in C#?

OK, this is a silly question, but when using Visual Studio, if I am writing XML doc comments in Visual Basic, I can use the tab key to switch between fields (e.g. Summary to Param to Returns). In C#, however, hitting the Tab key inserts a Tab, so I have to click on the individual fields to navigate to them (or use the arrow keys). This makes what should have been a simple process tedious and time-consuming.
Anybody know if there is a default keyboard shortcut I can use, or if there is a specific command I can map to an unused keyboard shortcut? I am using Visual Studio 2010, with ReSharper 6.1. Did some searching in the SO archives, but either nobody else has this problem, or I don't know the right keywords to ask (the latter is much more likely). Thanks in advance!
EDIT: I should clarify, a bit. The tabbing behavior in VB is native to Visual Studio 2010; the ReSharper install is fairly recent (after I switched to C#), and I wanted to mention it in case someone might know whether ReSharper had added their own navigation shortcuts (as they have tons) for this. Thanks again!
Resharper does have the possibility for structural navigation. Normally you can use the Tab or Shift+Tab Shortcut to the next or previous code element.
If your cursor is in a code element (i.e. not in the whitespace region before a code line) the Tab Key shouldn't insert a tab but navigate to the next section.
Configuration of the structural navigation can be done in Environment|Editor|Editor Behaviour.
If it's still not working as described I'd try to reset the settings (especially those for Resharper) and check wether Resharper is installed properly.
I might be misunderstanding the question, but maybe it sounds like you can just reset your user settings? http://msdn.microsoft.com/en-us/library/ms247075%28v=vs.100%29.aspx ? Or just run a devenv / resetuserdata . Do that, and when you start up visual studio, maybe choose the 'general' settings rather than the C# or vb.net specific ones?

Visual Studio F6 stopped working. It no longer builds the project

I'm using VS2008, been using it for quite some time now, and since I hate using the mouse while developing, I'm always using F6 to build the solution, or Shift+F6 to build the current project. What's weird though is for some strange reason, it simply stopped working over the last few days. In fact, when I pull down the Build menu, next to "Build MyProject" there's no longer a "Shift+F6" shortcut there on the menu?!? Anyone ever experienced this? Is there a setting I need to change?
You can change keyboard bindings in the Tools->Options dialog. It's under Environment->Keyboard.
You can reset the binding here, and also check what might have stolen it by checking what's currently bound to those keys.
If you recently installed any add-ins, they're known to set (sometimes unwanted) keyboard shortcuts.
Your Keyboard Mapping Scheme has changed.
Go to Tools -> Options. In Environments->Keyboard in the dropdown for "Apply the following additional mapping scheme" select "Visual C# 2005"
Have you tried : Tools -> Options -> Environment -> Keyboard
All the keyboard shortcuts have been shown there.
I'll add the proverbial "Is it plugged into the wall" question:
Do you have a fancy keyboard that replaces function keys with other things toggled incorrectly?
VMWare stole my Shift + F6. Maybe that's your prob?
I fixed this by going to going to tool-options-environment-keyboard just like the other suggestions but I clicked "Reset" instead to restore the proper short cuts.
Resharper was annoying about this.
I had to set BuildSolution to f6
then remove F6 from Resharper_Move
Just in case this bites anyone else: Parallels Desktop for OS X grabs F6 and uses it for "Show and hide Parallels Desktop". It can be disabled in Preferences -> OS X System Shortcuts
I know this question already has an answer but it is good to have this here for future reference:
On the Solution properties page, Configuration Properties -> Configuration, the list of projects will be displayed and the last column "Build" will have checkboxes, one for each project.
If they are all unchecked, you will press F6 but nothing will happen. Check the projects you want to build, on that case and you are now good to hit F6.

What's the default intellisense shortcut in vs2008?

I'd like to open the intelligence window without typing a character and then backspacing it. I can't seem to remember the shortcut for this. What is it?
Ctrl + Space for normal Intellisense, and Ctrl + Shift + Space for parameter Intellisense (e.g. to see what overloads are available in a method call which you've actually already filled in). I find the latter very handy :)
Ctrl + Space?
Also, go to Tools -> Options -> Environment -> Keyboard or Default Keyboard Shortcuts in Visual Studio, you can then search for commands and see what is assigned to that (and remap).
Ctrl + Space
If you have installed MSG Plus, then the problem is messenger lock keys, try to change them in msg plus and Intellisense will work again. Good Luck!

Categories