How do I search for text in Gems and External Libraries in RubyMine? - rubymine

I'm trying to search for text in gems in the "External Libraries" section of my RubyMine project, without having to manually find the Gem directory in the file system. Unfortunately, the 'Find in Path' dialog doesn't seem to offer any options for 'Find in External Libraries'. There are also no right-click find options for the Gems.
What is the best way to search for text in External Libraries/Gems in RubyMine?

I found an answer here:
http://makandracards.com/brainchild/34379-rubymine-search-in-external-libraries
The trick is to try and do the search on a subfolder of a gem. Then you can edit the path to that gem to include the entire gem or all of your gems.

Related

How to view Plugin Manager in Notepad++

I downloaded Notepad++ from https://notepad-plus-plus.org/repository/7.x/7.5.1/npp.7.5.1.Installer.x64.exe.
And I installed the same. Now I need to install few plugins, but in the menu option Plugins there are only Converter and MIME tools listed, but not Plugin Manager.
Edit: They have removed Plugin Manager with the version 7.5. Still it can be added by following #johnny 's instruction in the best solution.
P.S: The plugin manager is only supporting the 32-bit version.
As of Notepad++ version 7.5, plugin manager is no longer shipped with Notepad++
From the Notepad++ release notes:
You may notice that Plugin Manager plugin has been removed from the official distribution. The reason is Plugin Manager contains the advertising in its dialog. I hate Ads in applications, and I ensure you that there was no, and there will never be Ads in Notepad++.
A built-in Plugin Manager is in progress, and I will do my best to ship it with Notepad++ ASAP.
If the above doesn't put you off, and you want to proceed and install the plugin manager anyway, it looks like there's a GitHub repository for nppPluginManager - though I haven't personally used it, so cannot comment on it's validity.
The nppPluginManager installation instructions state:
To install the plugin manager, simply download (links below) the .zip, and place the PluginManager.dll file in the Notepad++ plugins directory, and the gpup.exe in the updater directory under your Notepad++ program directory. (e.g. "C:\Program Files\Notepad++\updater")
In fact, if you prefer, you can just add the PluginManager.dll to the plugins directory, then do a reinstall of Plugin Manager from the plugin itself, which will place the file in the right place! Of course, if you're already using an earlier version of the plugin manager, you'll be able to just update from the update tab (or when you get the notification that the update has happened).
The GitHub repository also contains the latest release.
Follow the steps given below:
Download Plugin Manager from here.
You can find the most updated version in the release section in the Git repository:
Extract the contents of zip file under "C:\Program Files\Notepad++"
Restart Notepad++
That's it !!
To install a plugin without Plugin Manager:
Download your plugin and extract contents in a folder. You will find a .dll file inside. Copy it.
Open C:\Program Files (x86)\Notepad++\pluginsand paste the .dll
Run Notepad++
You can download the latest Plugin Manager version PluginManager_latest_version_x64.zip.
Unzip the file.
Copy
PluginManager_latest_version_x64.zip\updater\gpup.exe
into
path-to-installed-notepad\notepad++\updater\
Copy
PluginManager_latest_version_x64.zip\plugins\PluginManager.dll
into
path-to-installed-notepad\notepad++\plugins\
Start or restart Notepad++.
Enjoy!
The way to install plugins seems to have changed, the previous answers here did not work for me.
The current (checked with 7.8.1) way to install plugins is to install it in a sub folder:
The plugin (in the DLL form) should be placed in the plugins subfolder of the Notepad++ Install Folder, under the subfolder with the same name of plugin binary name without file extension. For example, if the plugin you want to install named myAwesomePlugin.dll, you should install it with the following path: %PROGRAMFILES(x86)%\Notepad++\plugins\myAwesomePlugin\myAwesomePlugin.dll
from https://npp-user-manual.org/docs/plugins/
So PluginManager.dll goes into PluginManager sub folder.
Notepad v7.6 includes a Plugin Admin and from this you can install Plugin Manager(note1) but it doesn't work fine with npp v7.6(note2)
On the other hand Plugin Admin is only available on NPP "Setup version" and after following conditions
on Custom installation, "Plugin Admin" checkbox is enabled
on Choose Components "Don't use %APPDATA%" checkbox is disabled
Plugin Admin will place plugins at C:\ProgramData\Notepad++\plugins
(note1)Installation from Plugin Admin is not complete and \updater\gpup.exe is missing
(note2) Plugin manager is not using new plugins path and folder structure; from version 7.6 npp Plugins will be stored in individual folders (having same name than file.dll)
If you want to use npp7.6 portable, you can copy updater folder from Setup version, copy plugins from Setup version, or copy Plugins from npp v<7.6 and place each one in a individual folder.
Latest version of Notepad++ got a new built-in plugin manager which works nicely.
My system was 32 bit. I removed and re-installed Notepad++. After that from below got PluginManager_v1.4.12_UNI.zip and extracted it.
https://github.com/bruderstein/nppPluginManager/releases
I created a folder called PluginManager at C:\Program Files (x86)\Notepad++\plugins\ and copied PluginManager.dll into it. I restarted my notepad++ and now I see Plugin Manager.
A direct process to install / configure Plugin Manager :
Download the latest version of NotepadPlus Plugin Manager from the
official Github handle.
Extract the zip file.
Copy the pluginmanager.dll file and paste in C:\Program Files\Notepad++\Plugins\PluginManager directory.
Restart the Notepad++
Note: Create the
PluginManager directory if it is not present.
Notepad++ v8.1.2 has it where it used to be
I changed the plugin folder name. Restart Notepad ++
It works now, a
It can be installed with one command for N++ installer version:
choco install notepadplusplus-nppPluginManager

Projectile search only part of the project

When using emacs Projectile and helm-projectile, I am used to search for text inside the whole project. However is there a way to search only part of the project?
Something like:
search inside a subfolder only
search while excluding a subfolder
Yes you can exclude (sub) folders. Add a line in your .projectile:
-/sub/folder
So search inside a subfolder, I don't see something automatic. You could put project files in some subfolders (https://projectile.readthedocs.io/en/latest/configuration/#file-local-project-root-definitions) and switch projects.
For now I am using rgrep, which prompts for a string and a directory to find.
I would be happy to hear about an equivalent solution using ag, and I should mention I haven't yet dug into the link from #goromlagche (https://github.com/ggreer/the_silver_searcher#emacs).
Install helm-ag, this requires silversearcher-ag package; for debian apt install silversearcher-ag. And then you can
helm-do-ag to search inside a sub-folder/directory inside project
to ignore sub-folders/directories add them to either .gitignore or .hgignore if it is git and hg project respectively or add then to .projectile file, details here.
references:
https://github.com/emacsorphanage/helm-ag
https://github.com/ggreer/the_silver_searcher

PhpStorm PhpUnit via phar autocomplete not working

I have PHPStorm 8.0.1.
PHPUnit is installed via PHAR archive like:
wget https://phar.phpunit.de/phpunit.phar
chmod +x phpunit.phar
sudo mv phpunit.phar /usr/bin/phpunit
PHPUnit works via cli:
user#pc:/usr/bin$ cd ~
user#pc:~$ phpunit --version
PHPUnit 4.3.5 by Sebastian Bergmann.
I followed the instructions from JetBrains website https://www.jetbrains.com/phpstorm/webhelp/enabling-phpunit-support.html#d298258e897
In PHPStorm File->Settings tab PHP/PHPUnit
the radio button Path to phpunit.phar is checked
and value is set to /usr/bin/phpunit
I have a file with a test defined like:
class MyTest extends PHPUnit_Framework_TestCase {
...
At this point PHPStorm marks Undefined class PHPUnit_Framework_TestCase
I've restarted PHPStorm and Computer, but still have the same problem.
I've also tried adding /usr/bin to include path (right click on external libraries in project view, and choose option Configure PHP include paths) without success.
Here's the config for PHPStorm Settings, tab PHP (if it matters):
PHP Language level: 5.5 (finally, generators, etc.)
Interpreter: PHP 5.5 (5.5.9-1ubuntu4.5)
Include path is empty
In order to have a PHAR archive indexed by the IDE it has to have a .phar extension (that's a requirement).
The easiest solution is to place phpunit.phar somewhere in your project (usually it would be PROJECT_ROOT/vendor/ folder).
If having local copy inside the project folder is not desired (for whatever reason; although Composer and other similar kind of tools (bower/npm/etc) are primarily aimed at keeping dependency stuff/packages locally), you may use symbolic links:
either create a symbolic link to that file locally (e.g. PROJECT_ROOT/phpunit.phar --> /usr/bin/phpunit)
or place a full copy (or such symbolic link) in a separate folder outside of the project and then reference it via PhpStorm's Settings | PHP | Include Paths functionality.
The above fix by Calin worked for me too on PhpStorm 2019.1.1, so I'll post it as an answer for easier visibility:
Try right clicking on the .phar and clicking "Exclude phar from project", then clicking "Include phar into project" to refresh it.
In my case, both the .phar file and my .idea folder were pulled from a git commit. I guess PhpStorm didnt realise that the file needed reimporting.
I noticed even though PHP itself can find and run phar that is in its include path, PHPStorm having trouble finding and parsing them.
LazyOne's explanation is correct, however, I didn't need to put it in project folder to be recognized, you can put them in any path as long as its path is introduced to IDE. In my case, I put all phar files in PHP folder, so I just needed to add PHP folder to Include Path list in IDE
Include Path for PHP is under Settings -> Language & Frameworks -> PHP screen (that tiny + at the bottom of screen).

How to use SASS with Netbeans 8.0.1

I'm trying to use SASS in Netbeans 8.0.1. I have Ruby and SASS set up correctly based upon the feedback from ruby -v.
I have a web application set up with css and scss folders under Project\Web Pages\resources.
My input and output are set to /scss and /css respectively and I have checked 'Compile Sass File on Save'. I have created a styles.scss file and added some SASS/CSS.
When I save the styles.scss file, is it supposed to generate a styles.css? Nothing happens when I save or compile the project.
Has anyone run into any similar problems or have suggestions on how to debug this problem?
Thanks in advance!
Installing SASS on Windows10, Ruby2.2.3, Netbeans8
Download SASS for Windows - RubyInstaller.org
Install Ruby like:
Search windows for CMD (Command Prompt) and start it.
Access Ruby's bin folder using cd \Ruby\bin (Hit Enter)
Install sass using the command gem install sass (Hit Enter to install)
Wait for the installation to finish
In Netbeans open
Options → Tools → Miscellaneous (HTML/JS in v8.1+) → CSS Preprocessors tab
Enter the path to the installed sass.bat C:\Ruby\bin\sass.bat than click Install Sass.
Confirm your changes with Apply / OK
Use an existing one or Create a New Project (HTML5, PHP, whatever...).
After the project is created open the Projects window.
Right-Click your project and choose > Properties.
From the Project Properties popup select CSS Preprocessors.
Select the Compile SASS Files on Save.
(If you want the compiler to automatically minimize your .css result file, use --style compressed under the Compiler Options)
You can see from the image above that the compiler uses two default Input(watchable)/Output(compiled destionation) folders paths.
Create the scss folder (an optionally the css folder) in your project as well.
You're done!
As soon you create a new .scss file or you save it Netbeans will automatically compile the file to .css in the /css folder.
Yes, when you save the file, the css should be created/updated. I think you have wrong mapping for the input/output directories. The paths need to be relative to site root/web root. I don't know for sure what your project is (HTML5 or PHP or Java Web or other?), but if you have Java Web project, then the paths need to be
resources/scss -> resources/css
Salam guys, the below image form my (Command Prompt with Ruby) says that:
"Ruby Sass has reached end-of-life and should no longer be used"
For modern SASS and Netbeans we can just use https://github.com/sass/dart-sass/releases/tag/1.56.1 and install it in our PATH.
The release has the sass.bat file we need (as Roko C. Buljan pointed in his tutorial for Ruby).
There's not need to install Ruby and any other environment.
I applied this on Netbeans 15

Json Editor Plugin installation?

I feel really stupid by asking this question, but how can I install Json Editor Plugin in my Eclipse Helios? I looked at the Forum in sourceforge, but I can't install it neither through .zip or by adding a web site. And will I need to change the execution environment to Java 1.6?
Here is what I did to get the Json Editor Plugin to show up in the Install Dialog.
By doing a little Google-ing, I found this page which describes the steps to install JsonEditorPlugin on 3.4.
After you have followed the first 6 steps, make sure that Group items by category is un-ticked. After that, you can then choose Json Editor Plugin to be installed from the local Zip archive that you have downloaded from the net.
Edit: as a side note, you must not have the unzipped contents of the zip archive in the dropins/ folder, otherwise it will appear as if the plugin is already installed.
Simply dropping the zip contents into the dropins folder however did work also.
Note: You must right click your .json file and choose 'Open with' -> 'Json Editor'
You can install plugins by just unzipping them into the dropins folder.
It does not matter if the zip file contains the parent folders "plugins" and/or "eclipse".
I would recommend Java 1.6 as it brings a better performance and the plugin might require Java 1.6. On your desktop shortcut you use following execution arguments:
eclipse -vm <path to jre 1.6 installation folder>\bin\javaw
Download jsonedit-repository-0.9.7.zip (or whatever) and put it in a folder you like.
In Eclipse Help --> Install New Software
Add --> Archive button and select the zip file.
Name it and press OK
Press button Next and Follow master of installation.
Then after opening json file possibly needed right click mouse on the file --> open with --> JSON editor