Is it possible to use Rstudios build in HTML-snippets when editing RHTML-files in Rstudio?
When I open an RHTML-file the language is set to RHTML, as in the picture below:
But the HTML-snippets do not work for this language, and I can't see a way to enable RHTML as a language in the snippets menu.
The HTML-snippets work if I change the language to HTML, instead of RHTML, but then the R-functionality does not work anymore.
Any ideas to get HTML-snippets to work in a RHTML-file in Rstudio?
Using Rstudio Version 1.2.5033
Answer:
Use <shift> <tab> to insert HTHL-code snippets in RHTML.
<tab> alone does not work, when the language is set to RTML.
This is hinted at here:
https://support.rstudio.com/hc/en-us/articles/204463668-Code-Snippets
Related
I'm
running IntelliJ 14
using Mac OS X layout
running on OS X (Yosemite)
IntelliJ is using DVORAK in general but not for keyboard shortcuts.
keyboard shortcuts are in QWERTY. As if they were scancode based instead of the key value after mapping.
Ideas?
edit 1
#gabriel hard to tell but here are some examples...
note: m, a and 0-9 are same on DVORAK and QWERTY
cmd+/ 'comment line' flashes code menu and sometimes moves to a brace (/ == {)
cmd+b works, goes to definition (b == n)
cmd+opt+l 'reformat' flashes code menu (l == p)
It turns out this is a problem in Java that has existed for some years, and is still present in Java 9. See the bug report here: https://bugs.openjdk.java.net/browse/JDK-8022079
JetBrains has been aware of the problem for some years, but is waiting for Oracle to fix it. See these JetBrains bug reports: https://youtrack.jetbrains.com/issue/IDEABKL-6493 and https://youtrack.jetbrains.com/issue/IDEA-63779
In those reports you'll find a work-around using a free tool called Karabiner. I have just verified that it works for IntelliJ. It will probably also work for other Java-based tools.
For OSX earlier than Sierra The work-around is:
Download and install Karabiner from https://pqrs.org/osx/karabiner/
In the OSX System Preferences, set your keyboard to the default "U.S. International" PC. If you don't often type diacritics and other international characters, it's easier to just set the keyboard to "U.S" instead.
In the Karabiner settings, type "dvorak" in the search box, then scroll down to the section For U.S. Input Source and check Use Dvorak Keyboard Layout (QWERTY to Dvorak)
From macOS Sierra onwards, as reported by user MithrilTuxedo in the comments, the procedure is different. You have to use Karabiner Elements (the new Karabiner core) with a configuration file. I have outlined the procedure at https://cpbotha.net/2016/12/16/dvorak-remapping-with-karabiner-elements-on-macos-sierra-works/ and summarise it here briefly:
Download and install Karabiner Elements.
Copy qwerty_to_dvorak.json from the examples and install it as the new karabiner.json configuration file.
If Karabiner Elements is running, it'll pick up the new file.
This bug will affect most Java-based tools such as those by JetBrains (IntelliJ, PyCharm, WebStorm, AppCode) and probably also Netbeans. The work-around summarised above should alleviate the problem in all cases.
I've had a similar problem using key combinations like ctrl+n in intellij 16 on linux (red hat). I use Colemak keyboard. I had two input sources setup in my operating system, system preferences .
English(US)
English(Colemak)
When I changed the order of the Input Sources, and put Colemak first, the problem seemed to go away.
System Tools > Settings > Keyboard > Input Sources
JetBrains are waiting for the bug to be fixed upstream in JDK, which of course will never happen. The other answer here is informative, but will only work on Mac OS, so if you're on linux or windows you're out of luck there.
I wrote a script to work around the issue, which you can find here. If you normally use GNOME keymap in pycharm on linux, then you're in luck - you can simply import my dvorak_settings.jar file and get back to coding.
Otherwise you can use the script to generate your own bugfixed keymap, read on...
The original keymap files are located in <pycharm>/lib/resources.jar/idea/Keymap_*.xml.
Example usage:
./to_dvorak Keymap_Emacs.xml -o Keymap_Emacs_Dvorak.xml
Have a browse over the generated file and if it looks sane, pack it up into the .jar file (see my dvorak_settings.jar example for the required structure) and import this in your IDE.
This problem is (finally!) fixed in IntelliJ IDEA 2017.1. See JetBrains issue JRE-172, “Wrong keys are picked up on dvorak layout in Mac OSX 10.6.2”.
It also seems to be fixed in other JetBrains tools. I tested that it's fixed in PyCharm 2017.1, CLion 2017.1, and AppCode 2017.1.
Is there a way to edit TFS 2013 Work Item Templates from the command line? I'm looking for this because I currently don't have access to VS2013 in a version that will allow me to use the Tools -> Process Editor functionality. It seems like it would be part of tfpt.exe, but I'm not seeing the functionality.
The Work Item Templates are just XML in a format known as WITD.
I only ever work on customising work items in XML these days.
The command to export is:
witadmin exportwitd /p:TeamProject /n:Bug /f:Bug.xml /collection:http://mytfs:8080/tfs/DefaultCollection
Edit it with your favourite XML editor then import again using:
witadmin importwitd /p:TeamProject /f:Bug.xml /collection:http://mytfs:8080/tfs/DefaultCollection
Run witadmin exportwitd /? or witadmin importwitd /?for further help.
I like ZendStudio feature when after typing class name and pressing "Enter" it automatically adds namespace use statement into the head of the script file.
Is it possible to do the same in the PhpStorm IDE?
Not sure if this has been there all the time, or if it a new addition but it can be done already.
On my case, you get on top of the class that you want the use imported and you press alt+Enter. A popup allowing you to select which namespace you want to import pops up.
You can see a more graphical explanation here:
PHP Storm Tricks: Add your USE Statements Automatically!
I just wanted to disable it (it's native and enabled by default now) and found this SO thread.
For people like me, here's where the setting:
Editor > Auto-import > PHP - Enable auto-import in namespace scope
Please vote http://youtrack.jetbrains.net/issue/WI-1362
In PHPStorm 6.0.3 on Mac (and presumably other platforms) you should follow the advice given by #Savageman. It worked for me.
Go to "Settings" (Ctrl+Alt+S) > "Code Style > PHP" (I'm assuming you're using PS 3.0)
When debugging with GDB, i usually using layout src to check my code. But when i open it, i don't know how to close it. It seems that there are some other layout, and when open a new layout, it will split the window, but i still can not found a command to merge the splitted windows.
You can always leave or enter TUI at any time durring debug session. For example you can do it with ctrl+x a key binding. 25.2 TUI Key Bindings.
vi Readline input bug
In GDB 7.7, Ctrl-x + a does not work if you have in your ~/.inputrc:
set editing-mode vi
set keymap vi
If I remove those lines it works.
This seems to be mentioned at in the following bug report: https://sourceware.org/bugzilla/show_bug.cgi?id=15163
I have requested a workaround at https://sourceware.org/ml/gdb/2015-06/msg00009.html and Andrew Burgess replied that he had just submitted a well received patch to add:
tui enable
tui disable
so in future versions we should have commands as an alternative to the shortcuts.
I have later tested this on GDB 8.1 in Ubuntu 18.04 and it worked perfectly.
But then I saw the light and moved from TUI to GDB Dashboard: https://github.com/cyrus-and/gdb-dashboard which is simply more powerful and less buggy.
See also: http://superuser.com/questions/180512/how-to-turn-off-gdb-tui
The debugger is really (de)bugging me. Every time I try to type a po ... command, it autocompletes (without giving me any options) and I end up typing stuff like po [selfelf and so on until I go mad. Is there any way of stopping this, or of always giving me the autocomplete popup like in the standard editor?
This answer applied to the GDB debugger which is no longer the standard debugger used with Xcode
This is achieved by adding the following line to the "readline init file" (which, by default, I think does not exist). I created the file ~/.inputrc and put the following text in it:
set disable-completions 'On'
Hmm, the accepted answer is kind of overkill.
How about the answer provided to this question:
The closest I've come to solving this incredibly annoying problem is
to turn off automatic code completion in general (Preferences > Text
Editing > Suggest Completions While Typing) and then hit esc whenever
I actually do want code completion.