keyboard-shortcuts

Keyboard shortcut to toggle between previous file and current file in editor

感情迁移 提交于 2019-12-01 18:57:39
I usually use ctrl + tab to toggle between last viewed tab or file and current one in other editors like VS or Netbeans or even on browsers. But with xcode I cannot find a keyboard combo for that. I have googled with no avail. Can anyone please help with this? Chakalaka You can navigate forward and back with ctrl + cmd + left or ctrl + cmd + right 来源: https://stackoverflow.com/questions/11449399/keyboard-shortcut-to-toggle-between-previous-file-and-current-file-in-editor

Listening for global key-combinations in python on Linux

有些话、适合烂在心里 提交于 2019-12-01 18:47:48
I just wrote a little program which downloads a new wallpaper from flickr every few minutes. Now I want to add the capability to "like" a wallpaper, so it will occur more often than non-liked or disliked wallpapers. I'd like to assign a global keyboard-shortcut to this function. For example: If I press ctrl+7, it would execute some kind of "like" function in Python. Are there any libraries for this (in JavaScript for example there's a library where I can define shortcuts with shortcut("ctrl-b", someFunction); ) Otherwise, how would I go round doing this? I've seen this similar SO question ,

Is it possible to yank the entire element without moving to the beginning?

折月煮酒 提交于 2019-12-01 18:38:33
When my cursor in middle of a word, and I want to yank the whole word, I must press b first, and press y w to yank it. I want to know can I yank the word without hitting b first? y a w is yank around word, meaning if there is a space after the word, it will grab it too (but not a space before). y i w is yank inside word, which yanks just the word characters. You can see what will be yanked by v a w or v i w to select the same characters. You could then also hit y to perform the yank. i and a of course apply to all the other VIM groups, like W , which is any non whitespace. You can use y a w .

Get the value of a textbox during cut event

ぐ巨炮叔叔 提交于 2019-12-01 16:54:44
I have trapped the cut event (jquery) on a textbox. What I want is to get the text on the textbox during the cut event is triggered. I've tried accessing the data the user cut via evt.originalEvent.clipboardData.getData('text') but returns undefined. My goal is to know if the user cut all the text (textbox is now empty) or not. Thanks in advance You can setTimeout with a duration of 0, which schedules a function for immediate execution. The nice thing is that the function will execute once the text has already been cut, so you can check then if your textarea is empty (which would mean that the

Keyboard shortcut to remove empty lines in a C# code file

*爱你&永不变心* 提交于 2019-12-01 16:42:36
Is there any keyboard shortcut to remove empty lines in C# code files (.cs)? Similar to Ctrl + K , D which formats the whole .cs file. Or is there a workaround? Ed Guiness Use the Find and Replace dialog ( Ctrl + H ). Search for \n\n and replace with \n using regular expressions (expand the Find Options section to enable). If you want to remove lines containing nothing but whitespace you could try searching for \n\s*\n+ CodeMaid has a setting that automatically removes empty lines (when you save the file, I think) according to some configurable rules. I think it makes the files quite neat.

Create a simple, unmodified key binding in WPF

泪湿孤枕 提交于 2019-12-01 16:05:52
I'm trying to create a very simple WPF application. I'd like to have an command handler called when the user presses "H" (not Control-H or Alt-H, just H). If I use the following in code-behind code: var gesture = new KeyGesture(Key.H, ModifierKeys.None); var inputBinding = new InputBinding(MyRoutedCommand, gesture); InputBindings.Add(inputBinding); I immediately get an exception saying that the key and modifier combination isn't supported for KeyGesture. (I get the same exception if I create the XAML to do the analogous thing). My application doesn't accept typed input, no text boxes are in

Visual Studio 2010 'Assign to local variable' function?

家住魔仙堡 提交于 2019-12-01 16:02:22
I'm in love with the function in Eclipse "assign to field". Basically, when I have getString(); and I type Ctrl + 2 , Eclipse converts this into String getString = getString(); Is this possible in VS 2010? I believe the thing you're looking for is a refactoring typically called "introduce variable". As far as I know, Visual Studio doesn't support this. However ReSharper and other tools like it do. I have not worked in eclipse for years so I am not familiar with the example, but have you tried code snippets in VS? There is a tool for customizing them that you can get from here . If you are

Sublime Text - command to make first character uppercase

家住魔仙堡 提交于 2019-12-01 15:18:41
There are upper_case and lower_case commands: { "keys": ["ctrl+k", "ctrl+u"], "command": "upper_case" }, { "keys": ["ctrl+k", "ctrl+l"], "command": "lower_case" }, I'm searching for command to capitalize the first letter of string, which can be assigned to custom shortcut. Under Edit -> Convert Case is the Title Case option. The following key binding should work: { "keys": ["ctrl+k", "ctrl+t"], "command": "title_case" } Add this to your custom keymap, and it will override the default command for Ctrl K , Ctrl T - fold_tag_attributes . Alternatively, you can use { "keys": ["ctrl+k", "ctrl+i"],

Visual Studio 2010 'Assign to local variable' function?

冷暖自知 提交于 2019-12-01 14:39:48
问题 I'm in love with the function in Eclipse "assign to field". Basically, when I have getString(); and I type Ctrl + 2 , Eclipse converts this into String getString = getString(); Is this possible in VS 2010? 回答1: I believe the thing you're looking for is a refactoring typically called "introduce variable". As far as I know, Visual Studio doesn't support this. However ReSharper and other tools like it do. 回答2: I have not worked in eclipse for years so I am not familiar with the example, but have

showing in popup window method implementation in intellij

ぐ巨炮叔叔 提交于 2019-12-01 13:58:47
问题 I'm using Intellij 2016.1 and I was wondering if there's a shortcut to see the method body in a popup window , instead of jumping to source code like Ctrl + Left Mouse Button does . 回答1: The feature is called "Quick Definition Lookup" ( Main menu > View > Tool Windows in the keymap settings). The default combination is Ctrl + Shift + I (or ⌘ + Q for Mac). It appears like Any editing actions in the popup window lead to jumping into the file where the code is defined. 回答2: Not to my knowledge,