Code snippet highlighting in sublime text?(or suggest a note taking app for coding) - sql

I like to take notes as I learn new concepts and when learning something, say android which involves XML and JAVA syntax and even some SQL, when I copy paste it onto a single file I want each snippet to be highlighted in a way that makes sense for that particular language...and the rest of the text remain plain much like SO itself where I can mark only the code as code....I searched online and no application meets these requirements and finally I stumbled across a sublime Text Plugin ...thing is I don't understand how to install it even after reading the instructions please guide me or if you know any other application that meets these requirements please let me know .
Thanks!
link to the plugin

The plugin that you have linked to, "Notes", is a Sublime Text 3 plugin. It will not work on Sublime Text 2 (afaik).
Uninstall ST2 and install ST3 and then install Package Control and then install Notes. It should install without any issue.
I'm currently using Sublime Text 3 and am able to install the plugin without any issues.

You need to install it via Package control by pressing: cmd + shift + P. Then navigate to "install package". Once you begin typing in the package name (Notes in this example) will autocomplete then hit enter once its highlighted in the dropdown. Once installed read the Package Control Message that pops up in a new tab with instructions. These usually have key messages/directions for install or setup.
Kahlil was right when he said its not only compatible for ST2. So if it doesn't appear when you run package control thats why

Related

How to disable lines around text and explanations in Sublime Text

I have these lines around text and explanations popping up annoyingly.
Is there a way to turn these off?
I tried to look in settings and to adjust them but nothing works out.
P.S. ignore the code, it's just for example
White lines surrounding code like that are generally indicative of something like a code linter or other similar tool giving you an indication that there might be something wrong with the code (such as not following a code convention of some sort). The code explanation is a popup showing you the arguments and documentation for whatever function or method you're working on.
Both of these things are something that Sublime doesn't do on its own; you have installed a package of some sort that provides this capability.
If you were looking in the regular Sublime settings (Preferences.sublime-settings) for options that control this, they won't be there. In order to configure these away you would need to determine the package that you installed that's doing this and then configure that package not to do it or, if that's not possible, remove it.
If you use Preferences > Package Settings > Package Control > Settings - User from the menu, you can inspect the installed_packages setting to see what third party packages you installed and investigate which one of them is doing this.
Possible packages that do something like this would be Jedi or one of the Anaconda packages; essentially anything that says that it provides code support and assistance for Python is a candidate here.
Once you find the package in question, you can look in it's settings directly to see if you can turn the features you don't want off; failing that only removing the package will stop it from displaying these things.
These lines are called linting. Linting is the process of running a program that will analyse code for potential errors.
In sublime text it occurs usually because of some packages that you have installed...
In your case, it is actually the anaconda package and some other packages. It can be removed easily in a few simple steps.
In the sublime text window press ctrl+shift+P to open a command pallete and then type the name of the package. I typed anaconda because it is the one giving me these lintings so there will be an option Disable linting on this file. Just click on it, as shown in this picture .

SyncedSideBar on Atom IDE

Is there away to install SyncedSideBar or something similar to that for Atom IDE ?
I used this one on my sublime text 3, and I was looking for the same plugin that will work for Atom.
I like how it auto highlight the current opened file
Any suggestions ?
You don't need any extra plugin for this. It there in the default tree plugin. Search for tree in packages
Click on settings and check the Auto Reveal checkbox
And now the active file will be automatically highlighted
Some of the themes may not highlight this properly, so you should change the theme and make sure it works. Sometimes after changing the settings you may need a restart, if it doesn't work

IntelliJ - working with features

I have 2 simple questions that I cannot find answer to.
First is in NetBeans when I type . operator behind a variable or method or whatever, small window with documentation will show up like on the picture. On the other hand I can't achieve the same result in IntelliJ. I followed steps on official website and this is what I get in IntelliJ after I press CTRL+Q. All I want is full documentation so for a begginer like me it would be easier to use and learn stuff.
[EDIT]: I tried it once again and I saw little yellow message "download missing driver" and it is working just fine.. this one is solved.
Second question is about MySQL database driver (or connector). In NetBeans, I just press right click on project and add the library I want. But I can't find solution for this in IntelliJ.
Thanks for every advice!
For the first question, I'm thinking what you mean is the suggestions after you type a '.'. In IntelliJ, the suggestions show only if you have config a right dependency in the File > Project Structure, and the Libraries tab.
And for the second question, also you should find File > Project Structure, in the Modules tab, Add new Database support(Hibernate such as) for you project.
Hope it helps you.
Ok, so I finally found the solution.
I went to Project Structure -> SDKs -> Documentation Paths and I added https://docs.oracle.com/javase/8/docs/api/ in there so now when I press CTRL+Q for quick documentation it shows exactly what I needed.

Can't type in IntelliJ

I'm using IntelliJ IDEA on my Mac to work on a project, and I keep on coming across an issue where I can't type. Occasionally when I switch to another application and then switch back to IntelliJ I can't type anything, and the cursor doesn't appear on text when I click on things. Does anyone know what causes this? After 1-2 minutes it goes back to normal, but it's started happening more frequently and it's pretty frustrating to not be able to type and have no way to fix it.
This is the version of IntelliJ I'm using:
IntelliJ IDEA 2016.1.3
Build #IC-145.1617, built on June 3, 2016
JRE: 1.8.0_76-release-b198 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Turn off Vim Emulator from Tools in the IntelliJ, like this picture:
I am encountering this issue aswell, ...
MAC os Mojave 10.14.2, Inteliij Community 2018.3.5
Aside from restarting / clearing caches, I found that cmd + leftShift + F still opens the search window, and all my keystrokes appeared in the searchbox!
After the searchshortcut, I was able to close the searchbox and work again!
The answer here helped me https://intellij-support.jetbrains.com/hc/en-us/community/posts/206152119-Can-t-type-in-editor-window
Quoting the author of the answer:
I had the same problem. It goes away after I click the icon at top of
the scroll bar. it happens frequently on windows 7/10, and
occasionally on mac. my colleagues said they have experienced it too
Have the same issue occasionally, can't type in any Intellij windows. My temporary/quick fix, is to:
Close any terminal windows in intellij
Use cmd+shift+f to pull up the search window.
Seems to fix it, for a while.
Closed IDEA, all IDEA projects! Even though in other IDEA windows I could type.
Removed .idea folder in the project I could not edit.
Restarted IDEA.
Then I was able to type!
Maybe you entered Vim emulator as said. Maybe only by mistake :).
Control-V is a frequently used shortcut. And Control-Alt_V is the shortcut to enable Vim mode so you can see the problem...
How to know in five seconds: type a ":" (colon) and if the cursor jump to end of the screen, that is vim. If so enter q to quit and then Control-Alt-V (on windows) to go back to IDEA standard mode.
vi is a powerful text editor since ever. But only if you pretend and know how to use it... There is even a warning on the IDEA install saying like "do not install unless you are familiar with Vim" in yellow bold text, iirc.
[Follows historic data, that you may find boring off-topic or interesting]
Today's editors opens the code in edit mode right away so you can start typing over existing code. Vim by the other hand opens the code in, let us say, browsing mode: there is a set of navigation keys to browse the code. Everything you type is supposed to be a command. When you want to edit you enter INSERT mode and then you can type new text. Only then.
Just for more historic data: vi navigation mode is great for studying code you do not know, using IDEA, since it does not change the text unless you tell it to, and some vi commands are clever.
One example:
"/" (forward slash) is one search command, and "z" is a smart scroll command so that:
/setCellFactory will search for the next match of "setCellFactory" and put the cursor there
Then if you type "z" the code will be positioned so that line is the first on screen. And if you type "." the line will be at the middle. And if you type "-" that line will be at the last position at the screen. And you can use these commands again and again. And new slash will go for the next match, like F3
This "z" thing is a feature I miss in Visual Studio, IDEA, Eclipse, Word, WordPad: these commands to scroll text AROUND a pattern... /pattern, z, z., z-. The alternative is the mouse wheel...
I am used to vi since the 80's and is the editor I still use today on Linux terminals so when this happened to me on IDEA I was lucky to remember and suspect of that on the first time.
Sorry if these details are boring
Ensure you haven't unintentionally enabled vim emulation. Go to IntelliJ Idea -> Preferences and select Plugins. Scroll down and look for the vim emulation plugin and if it's checked, then either uncheck it or uninstall it completely.
Ran into same issue with intelliJ 2017.1.2, but no VIM Plugin. However, I had just created an empty project with some .groovy files. I could edit the files in the groovy project, but not java projects.
Only way I could fix java projects, was blow-away workspace.xml files in each, then I could edit again. However, had to re-create tomcat configs, breakpoints, other IDE settings. etc.
I had a problem with entering characters when working with .story files. When I tried to type in any character, it appeared for a short while and immediately disappeared. The cause of the problem was jbehave plugin I was using. After uninstalling it and restarting IntelliJ everything was fine.
It seems to be because another window has the cursor and is not giving it back.
Check any open floated windows, click on them & then click back to your intellij instance
alternatively, if you have multiple intellij instances open the cursor could be there...
Go to the most recently opened IntelliJ instance
Check if the cursor has become stuck in that project's terminal window, or another window
no? check all other open IntelliJ instances
For me it happened because of vim
Om Mac, I solved it by navigating to File → Reload All from Disk.
Keyboard shortcut: ⌥ ⌘ Y
IntelliJ IDEA 2020.1.4
Try disabling plugins one at a time. It was the "BashSupport Pro" plugin that caused it for me. Disabled it and I could type again right away.
I read other comments saying some other plugins caused the issue as well.

IntelliJ 12, module-depenencies all red, no path.

I have a real problem with making Play2.0 work with IntelliJ EAP version (120.152).
I create an empty project without module in IntelliJ
I create a new application using the play command, and using play idea at the end
I then add this module from IntelliJ, using "Import from existing module"
Now, I have two folders too chose from when importing the module.
1. .idea
2. .idea_modules
After seeing some different ways on the internet,
I chose .idea_modules -> moduleName.iml
(I have tried all the others just to check)
Here is what bothers me the most
Anyone had anything similar? I am not sure why this is, every other screenshot I have seen from this, have a path behind the red text (making it work!), which I do not.
Any suggestions what I can do from here to hopefully make this work?
My Scala facet looks like this in the IDE, but I have not seen any Play documentation that goes into modifying the facet, so I just leaved it as is
In IntelliJ 12 - the same as in IntelliJ 11 you can open the Play's project since version 2.0.2, just by using option 'Open project' in the start window view.
You don't need to create blank project first in IDE.
play new test-leda + all required steps by play console
cd test-leda
play idea + wait for bash prompt which indicates finalization
Open Leda and choose Open project
Find the folder test-leda and just click Choose
That's all