keyboard-shortcuts

Eclipse comment/uncomment shortcut?

僤鯓⒐⒋嵵緔 提交于 2019-11-26 11:45:12
问题 I thought this would be easy to achieve, but so far I haven\'t found solutions for comment/uncomment shortcut on both Java class editor and jsf faceted webapp XHTML file editor : to quickly comment/uncomment a line (like ctrl + d is for removing single line) being able to choose multiple lines and comment/uncomment it For example : single line java code , from : private String name; into //private String name; multiple line java code , from : private String name; private int age; into /

javascript capture browser shortcuts (ctrl+t/n/w)

北城以北 提交于 2019-11-26 11:42:34
Is it possible to capture these shortcuts? Ctrl + N Ctrl + T Ctrl + W I tried this but it doesn't work: $(window).keydown(function(event) { console.log(event.keyCode); event.preventDefault(); }); When I press T it shows 84 in the console, but if I press Ctrl + T it shows nothing, and opens a new tab. I would like to capture these shortcuts and prevent any browser action. Gergely Fehérvári Capturing Ctrl keyboard events in Javascript Sample code: $(window).keydown(function(event) { if(event.ctrlKey && event.keyCode == 84) { console.log("Hey! Ctrl+T event captured!"); event.preventDefault(); }

VS2010 CTRL+M keyboard shortcut has stopped working

我与影子孤独终老i 提交于 2019-11-26 11:35:34
问题 I have a strange problem which seems to have recently appeared. I used to be able to press the keyboard shortcut CTRL + M + O to \'collapse to definitions\' in VS2010 when editing code, but it seems suddenly the CTRL + M key seems to have stopped working. When I now press the key combination I get the Open File dialogue. I have tried the obvious things like resetting the keyboard scheme in Tools > Options but this has had no effect, I did also check that the default mapping for the keys were

Is it possible to chain key binding commands in sublime text 2?

喜你入骨 提交于 2019-11-26 10:17:31
问题 There are times in Sublime Text when I want to reveal the current file in the side bar and then navigate around the folder structure. This can be achieved using the commands reveal_in_side_bar and focus_side_bar however they have to be bound to two separate key combinations so I have to do 2 keyboard combinations to achieve my goal when ideally I\'d like just one (I\'m lazy). Is there any way to bind multiple commands to a single key combination? e.g. something like this: { \"keys\": [\"alt

Make Visual Studio understand CamelCase when hitting ctrl and cursor keys

倾然丶 夕夏残阳落幕 提交于 2019-11-26 10:17:26
问题 Is there a way that I can configure Visual Studio 2008 to understand CamelCase? Specifically, I\'d like to be able to get ctrl + right or left cursor to take me to a subsection of a variable or type name. i.e., if my cursor was at the start of this line: LongNamedExampleClass longNamed = new LongNamedExampleClass(); and I hit ctrl + right , I\'d like to jump to \" Named \" in the class name, rather than the start of the variable name. If I hit it again, I\'d like to go to \" Example \". I

Xcode source automatic formatting

帅比萌擦擦* 提交于 2019-11-26 10:07:53
问题 As a C# developer, I have become highly dependent on the automatic formatting in Visual Studio 2008. Specifically, I will use the CTRL + K , D keyboard shortcut to force things back into shape after my sloppy implementation. I am now trying to learn Objective-C and am missing certain features in Xcode, but probably none are quite as painful as the formatting shortcut. My Google searches have yielded nothing built in, though it seems there are some hacks. Am I missing something or does this

window.close() doesn't work - Scripts may close only the windows that were opened by it [duplicate]

人走茶凉 提交于 2019-11-26 09:58:20
问题 This question already has an answer here: window.close and self.close do not close the window in Chrome 12 answers I\'m having a problem always when I\'m trying to close a window through the window.close() method of the Javascript, while the browser displays the below message on the console: \"Scripts may close only the windows that were opened by it.\" This occurs in every part of the page. I can run this directly of a link, button, or a script, but this message always are displayed. I\'m

Assign keyboard shortcut to run procedure

∥☆過路亽.° 提交于 2019-11-26 09:39:23
问题 When I press F5 in the VBA editor I would always like to run my \"Sub Skynet()\" procedure. Is there any way to assign a keyboard shortcut to this procedure. 回答1: For assigning a keyboard key to button on the sheet you can use this code, just copy this code to the sheet which contain the button. Here Return specifies the key and get_detail is the procedure name. Private Sub Worksheet_SelectionChange(ByVal Target As Range) Application.OnKey "{RETURN}", "get_detail" End Sub Now within this

How to auto import the necessary classes in Android Studio with shortcut?

与世无争的帅哥 提交于 2019-11-26 09:22:09
问题 I\'ve just switch to Android Studio 0.5.1, and the things going so slow here, because nothing works in the regular way... How do I import the necessary classes with shortcut? I mean like this ones? import android.os.Bundle; import android.support.v7.app.ActionBarActivity; import android.view.Menu; import android.view.MenuItem; 回答1: Go to File -> Settings -> Editor -> Auto Import -> Java and make the below things: Select Insert imports on paste value to All Do tick mark on Add unambigious

Eclipse - List of default keyboard shortcuts

爱⌒轻易说出口 提交于 2019-11-26 09:06:45
问题 Is there a list of the default Eclipse keyboard shortcuts? I\'m generally looking for language agnostic things like starting the debugger or deleting an entire line in the source editor. 回答1: Rather than a full list of shortcut (JGlass mentions for Eclipse 4.6 this pdf), I prefer using only a few shortcuts: CTRL + Shift + L : "Show Key Assist", List of shortcuts (depending on the context) CTRL + 3 : Quick Access Source: "Good features of Eclipse 3.6 (Eclipse Helios) JDT, 2011, from Sony