shortcut

How can I specify an icon with a RELATIVE path for a Linux desktop entry file?

痞子三分冷 提交于 2019-12-03 02:06:29
For one of my Linux applications, I have the application binary, a launcher.sh script (for the LD_LIBRARY_PATH) and a .desktop file, all in the same folder. I'd like to use a relative path rather than an absolute path for the icon. I've tried: Icon=app.svg Icon=./app.svg Icon=$PWD/app.svg Icon=$(dirname %k)/app.svg but none of these work (only Icon=/path/to/app.svg ). If it's not possible to specify a relative path and I must use a workaround, I was thinking I could regenerate the icon path in the .desktop file every time the launcher.sh script is run. What would be the best way to do that?

Collapse all methods in Visual Studio Code

我只是一个虾纸丫 提交于 2019-12-03 01:29:13
问题 In Visual Studio Professional, we have a shortcut key, Ctrl + M Ctrl + O to collapse all methods and properties in a class. How can I do a similar thing in Visual Studio Code? I know there are shortcut keys like Ctrl + Shift + [ , but this does not meet the needs. Is it possible to get the Visual Studio Professional-like behaviour in Visual Studio Code? 回答1: Fold All: Windows: Ctrl + k + 0 Mac: ⌘ + k + 0 Unfold All: Windows: Ctrl + k + j Mac: ⌘ + k + j To see all the shortcuts in the editor

Is there any shortcut to select the current line in Visual Studio?

孤街醉人 提交于 2019-12-03 00:59:01
I couldn't find such feature in VS's shortcut list. Is there anyway? Mitch Wheat If you want to copy a line, simply place cursor somewhere in that line and hit CTRL + C To cut an entire line CTRL + X @Sean found what I was looking for: To disable this default behavior remove the checkmark (or check to re-enable) Apply cut or copy commands to blank lines when there is no selection Accessed from the menu bar: Tools | Options | Text Editor | All languages You can also enter copy into the options search box for quicker access [Tested in VS2008, 2010, 2017] Clicking the line 3 times does the trick

IntelliJ IDEA shortcut keymap for matching brace

时光怂恿深爱的人放手 提交于 2019-12-02 21:34:12
What is the keymap for navigating to the matching brace in IntelliJ IDEA? public void blah() {| ... } If | is my cursor, I would like to jump to the closing brace with this keymap. dhable I've only verified this with IntelliJ 9 but: On Windows: Ctrl + } will move to the close bracket. Ctrl + { will move to the open bracket. On Mac: Use cmd instead of Ctrl . As an alternative to Ctrl + } and Ctrl + { you can by default use Ctrl + Alt + Shift + 9 and Ctrl + Alt + Shift + 8 respectively. I haven't even tried to remember that yet. ;) Also in Settings -> (IDE Settings ->) Keymap -> Editor Actions

How can I launch Chrome with flags from command line more concisely?

谁说我不能喝 提交于 2019-12-02 20:16:15
I am developing a WebGL driven application and I want to launch chrome like this from the command line: open -a Google\ Chrome --args --disable-web-security I just don't want to have to type that in every single time. Is there a way to easily turn that into a one word command? I am using a mac if it matters. Just make an alias in your .bashrc or .bash_profile alias ogc='open -a Google\ Chrome --args --disable-web-security' And then reload your shell. exec $SHELL Now, every time you type ogc (or whatever you want to call it) in your terminal, it will run the full command open -a Google\ Chrome

Creating Shortcut where folder name is having unicode characters

我与影子孤独终老i 提交于 2019-12-02 20:09:26
问题 I have been using the below code to create shortcuts dynamically. But the targetPath throws Argument exception when the folder name has unicode characters like Thai,greek language. IWshRuntimeLibrary.WshShell shell = new WshShell(); IWshShortcut shortcut = (IWshShortcut)shell.CreateShortcut(shortcutLocation); shortcut.Description = "My shortcut description"; // The description of the shortcut shortcut.WorkingDirectory = currentPath; shortcut.TargetPath = targetFileLocation; // The path of the

does webstorm have some shortcut for console.log or console.info

你说的曾经没有我的故事 提交于 2019-12-02 19:55:24
Just tired of typing console.log again and again, and do not find a way like 'Sysout + Control + Space' in Eclipse will create System.out.println(). There's a predefined Postfix template that allows you to type .log after a JavaScript expression or string and hit Tab to transform it to console.log(). You can also create a Live template (see Preferences | Editor | Live templates) that would expand into a code snippet once you type the selected abbreviation and hit Tab. Update: there's now also a plugin that allows you to add console.log with a shortcut: https://plugins.jetbrains.com/plugin

How to get shortcut target

家住魔仙堡 提交于 2019-12-02 19:43:12
问题 I need to be able to read the target of a shortcut (a .lnk file). I have Googled this and found numerous results that I have found to be helpful: http://cboard.cprogramming.com/windows-programming/62962-ishelllink-getpath-dev-cplusplus.html http://www.go4answers.com/Example/get-shortcut-target-cpp-win64-216615.aspx http://msdn.microsoft.com/en-us/library/bb776891%28VS.85%29.aspx http://www.codeproject.com/KB/shell/create_shortcut.aspx Some of these web pages don't mention which header files I

How do I call a function twice or more times consecutively?

荒凉一梦 提交于 2019-12-02 17:55:35
Is there a short way to call a function twice or more consecutively in Python? For example: do() do() do() maybe like: 3*do() I would: for _ in range(3): do() The _ is convention for a variable whose value you don't care about. You might also see some people write: [do() for _ in range(3)] however that is slightly more expensive because it creates a list containing the return values of each invocation of do() (even if it's None ), and then throws away the resulting list. I wouldn't suggest using this unless you are using the list of return values. You could define a function that repeats the

iOS - Shortcut for jumping to definition in Xcode 9?

妖精的绣舞 提交于 2019-12-02 16:28:28
In previous Xcode version , I could jump to definition with simple Cmd + click on that method/variable . But in Xcode 9, I feel uncomfortable to jump to definition . Does anyone has a better solution for jumping to definition in Xcode 9 ? I am tired of selecting options from dropdown list. user8315745 Ashish and Ghulam's answers were great but it still kinda bugged me that things had changed and I couldn't jump to definition as before. Then I found this... Xcode9Beta2-Preferences->Navigation->Command-click on Code:->Jump To Definition : Solution 1: Go to Xcode menu Click on Preferences Select