sublime text 3, indexing, and goto symbol/goto definition - ide

so I downloaded sublime text 3 which allegedly "Sublime Text now scans the files in your project, and builds an index of which files contain which symbols. This backs the new features Goto Definition and Goto Symbol in Project".
I created a new project containing the source code of zend framework...I then attempt to do goto definition and goto symbol but they are all still only allow you to "Goto" definitions/symbols in the current file instead of the entire project.
How exactly should I configure sublime text 3 such that I can use the goto definition/symbol to any method in the project and not just the current file (akin to Eclipse's Ctrl + Shift + M Open method feature).

First off, make sure the relevant folders are added to your project by checking that they appear in the side bar under FOLDERS (which you can toggle using ⌘-K ⌘-B). If the Zend folder isn't there, add it by going to Project » Add Folder to Project....
Then you should use Goto » Goto Symbol in Project... (or ⇧-⌘-R). Goto Definition should search in the whole project. At least this is what it behaves like for me on Sublime 3 build 3019 for OS X.
Replace ⌘ with CTRL and ⇧ with SHIFT if on Windows.

Assuming this is not a shortcut issue (You can test this by trying to find symbol from the menu)
Try:
Quit Sublime Text 3.
Clear out the Sublime Text 3 Index folder
In OS X, delete the contents of ~/Library/Application
Support/Sublime Text 3/Index
In Windows, delete the contents of AppData\Local\Sublime Text 3\Index\
Open ST3 and your project
Open Console (View -> Show Console)
Check for errors
Most likely after step 3, your project will be back to normal, but if it isn't check what the problem is while indexing and try to search for that specific problem.
EDIT: Depending on the size of your project rebuilding cache might take looong

Related

CLion code navigation with C++ doesn't work

I've used AppCode (Intellij C++/ObjC IDE that replaces Xcode) for a while and really gotten used to being able to Ctrl+Click on any identifier to get to its definition/decleration.
Now on a new work place, I'm using CLion for a somewhat larger code base and Ctrl+Click hardly ever works. It only seem to work when the identifier is in the same file.
Is there anything I need to setup for this to work correctly? CLion seem to index the code successfully and doing text searches works fine.
You need to use import project functionality of CLion from File -> Import Project and give ok for CMakeLists.txt file automatic creation. Never mind the file is for CMake, you can build your project with other tools too, but CLion uses it for the dependencies.
Then append in the beginning of that file a line stating:
include_directories(.)
After that go to File -> Settings and there search for Keymap from the left and after that on right, right below the word "keymap" there is a selection element for taking for example Eclipse default keymapping in use and there you have at least (I tested only it) the ctrl + click functionality working like charm!!
kudos about the include_directories(.) goes to this question: CLion indexer does not resolve some includes in the project directory
You need to press ctrl + alt + shift + n.
And after pressing it a dialog box will appear to enter your variable/function name and click enter.
Tip: Filter the result for a better experience. Filter option is present on right side of the dialog box.
To get a quick peek of function/variable definition press ctrl + q while focusing on the variable or function.
To get the detailed or full definition of function press ctrl + shift + i while focusing on the variable or function.
I just looked at one of my more complicated teaching examples with multiple header/source files where this would come up.
What I see is that ctl-click (and the red/green arrows in the gutter) does work only in the same file. But I can right-click on a method from another file and choose to go to either the declaration (in header) or definition (in cpp).
The hotkeys to do this are not ctl-click. But you can remap hotkeys in IntelliJ ides, so you may be able to come up with hotkey combinations that don't seem too awkward to you.
What helped me was to run File > New CMake Project from Sources
Until that point, Ctrl+click in CLion would go to the definitions, but wouldn't find any usages.

where to configure phpstorm 7 less compile directory

I'm using Phpstorm7 on mac. When I open one less file, Phpstorm tells me that it can be watched, so I just allow it to be watched. However, I want to compile this less file to another directory, instead of the same directory.
Saying, I need compile sites/all/themes/bic/less/style.less to sites/all/themes/css/style.css.
After a long research, it seems I need to edit some file watcher, but I can't find such file watcher stuff anywehre in Phpstorm7. There's no such 'File watcher' setting when I go to 'File' => 'Default Settings' in Phpstorm7. Now I can't stop this less from compiling either.
Any help would be much appreciated. Thanks!
File | Default Settings is for settings that will be applied to the brand new projects.
All settings (both IDE-wide as well as project specific) are located in the same place as every other Mac program does -- it's called "Preferences" (which you should now where to find, since you are a Mac user).
PhpStorm v7.x has a feature called Search Everywhere (Shift 2 times or by clicking on corresponding icon in toolbar) -- it searches trough settings/preferences as well.

IntelliJ IDEA: how to search for a folder / directory / package name?

I wish to search just directory (folder) names and packages within the modules of my current project.
How can I do this?
CTRL+Shift+N allows me to find a
class
CTRL+Shift+Alt+N allows
me to find a symbol
Is there a function for that allows me to search just directories, folders and package names?
I'd like the result of this search to be that the directory / package sought is highlighted in the "Project" box.
For example, if I type in "model.feed" then then I get this:
and preferably while I'm typing that a list of any directories matching would be shown in real time (in the same way as classes are when you do CTRL+Shift+N).
I'm using IntelliJ IDEA 12.0.4 (Ultimate).
In IntelliJ IDEA 13, you can use Goto File (Ctrl+Shift+N) and enter the directory/package name with a slash afterwards. Then you'll see all the matching directories in your project.
I propose this as a partial solution to your query.
The following steps will allow you to find a file or directory or package name or jar name that is visible in the project view.
Caveats stated explicitly below, but give this a go.
Click on the root folder in the Project View.
Start typing words that you want to search on to find packages/files/folders/jars in the project view
A tool tip will appear that contains the text Search For: along with the text that you have
entered.
The Project View will then highlight the first folder or file that matches the text that you have entered.
This may be close to what you are looking for.
The only caveat is that this search is constrained to those entities currently visible in the Project View so if you want to search a particular part of the project it appears that you have to expand those folder within the Project View. (From my testing of this in IntelliJ Ultimate Version 11.)
One way to work around this is to go to the root element in your project. Perform a partial traversal of where you want to go then by pressing enter you open the folder that you have landed on and then that search is completed.
Starting typing text again after pressing Enter will recommence the search from the current item in the Project View.
So by experimenting with this feature you can interactively walk around your project in the Project View in a dialog-box-free manner.
As a side note you can use the letters Camel Case style to traverse and find classes in the ProjectView
WINDOWS:
CTRL + SHIFT + N
MACOS:
⌘ command + ⇧ shift + O
If you try
CTRL + SHIFT + F
You can do a global file search (like eclipse CTRL + H).
In the file search, you can select which folder to search for, what file type to search for, case sensitive etc, all the normal stuff.
Global Replace is
CTRL + SHIFT + R
(Mac replace CTRL for CMD)
On mac it is
CMD + Shift + O
at least for intellij 14.1
If you have the file open in the editor and can't figure out the location in the project view
WINDOWS:
ALT + F1
From Select In... pick the first item, Project View
It seems IntelliJ doesn't directly support this. Here are the best alternatives I've thought of so far:
I suggest these steps if there is nothing in the folder yet (Windows):
Windows:
Right click on the project root, and choose "show in explorer"
In the search box on the top right, search for the folder you want (e.g. META-INF)
Right click, "open folder location"
Linux/Unix/Cygwin:
Copy the path instead, (in the right-click menu),
cd to the directory using a console or cygwin,
use the 'find' utility. E.g. type find . -iname 'SomeFolderName*'
If there is already something in the folder, I suggest you do this:
Ctrl-Shift-F to search for files
Enter the directory name inside a wildcard pattern (eg. */META-INF/*)
open the first file that occurs in that folder
Click on the circular target icon to "scroll from source" (at the top of the project panel).
If you find yourself wanting to search for folders/packages often, you can use the Go to File command (Ctrl + Shift + N) and set a filter on Directories so that you can quickly search for directories and packages. The filter will be saved for the next time you use Go to File. As a demonstration:
Use Go to File (Ctrl + Shift + N) and click on the filter icon (funnel-shaped) on the top right of the search box. Disable/unselect all other selections and only keep Directories selected.
Try searching -- you should only see directories and packages in the result.
Try using Go to File again -- you should find that the filter still exists

How to filter files based on file status in IntelliJ Idea

When I add a new file at local, the file status is unknown and the file color is brown. But that file somehow isn't shown in the dialog Commit Changes until I explicit add it to the repository.
The real problem is I can barely remember how many files I created after a long working day. Could someone tell me how to get IntelliJ to show all unknown files?
Thanks in advance
File Status Highlights in IntelliJ Idea:
http://www.jetbrains.com/idea/webhelp/file-status-highlights.html
Alt+9
click on Local
click on 'Unversioned Files (n directories and m files) Click to browse)'
Ctrl+NumPad + select all files that have to be added to version control click on '+'

Jump to next error FILE in Intellij [duplicate]

This question already has answers here:
Go to next compiler error across project in IntelliJ
(9 answers)
Closed 9 months ago.
I am looking for any way to navigate between errors in IntelliJ.
I know how to jump INSIDE one file. And I found a bunch of macros, editor extensions, etc. plugins to extend the functionality, but there seem to be nothing to help me in these scenarios:
I remove method from baseclass.
I hit rebuild, so nice, now 20 files have errors as expected.
Now I have to manually click either on the red error in the make info to open the file, or on the file in the project tree (marked red) to open the error file. Once inside the file its easy, F2, some ALT+ENTER, fixed.
So any way to jump TO NEXT ERROR FILE.
Or any way to navigate between (not open) files by keyboard. E.g. Open next file in tree structure, etc..
With IntelliJ 2017.2.2, F2 is mapped to "Next Highlighted Error" per default. Make sure to focus the Project editor first. Similarly Shift + F2 is mapped to "Previous Highlighted Error". The mappings mentioned in the other answers do not work.
I'm on WindowsXP, and I use Ctrl + Alt + ↓ to navigate through the messages in the Make window - does this do what you want?
One thing about that though, is that it is actually navigating though "messages" not just errors - so if you have a lot of warnings in your project, that could get in the way. I did just notice there's a "hide warnings" button though, so that could help.
On Mac it is: ⌥ + ⌘ + ↓ (or ↑ for previous)
(Found this in the documentation thanks to #Shorn's answer for Windows.)
If you switch to the Project Editor (Alt + 1) and then press F2 it jumps to the next file with an error.