Phpstorm показывать скрытые папки и файлы
Я использую PhpStorm 6.0.3, и он не показывает никаких каталогов в окне инструментов проекта. Они были там всего минуту назад, но мне удалось заставить их исчезнуть, случайно нажав или нажав горячую клавишу.
Они есть в файловой системе - я вижу их в проводнике Windows, но они просто не отображаются в PhpStorm. Я проверил документацию Jetbrains, проверил объем и попытался удалить настройки проекта (.idea-dir), но безрезультатно.
Есть ли у кого-нибудь предложения, как их снова показать? Или где я мог настройки напортачить? Спасибо!
Итак, прошло пару месяцев, и я совершил ту же ошибку. Только на этот раз я заставил исчезнуть 1 каталог, и сам PhpStorm случайно указал в правильном направлении. Я исключил каталог из проекта, поэтому он больше не отображался. По-видимому, исключенные каталоги не сохраняются в настройках проекта, поскольку повторное создание проекта не помогло.
Вот как я его нашел: Файл> Настройки> Настройки проекта> Каталоги. Там я увидел, что мой каталог отмечен красным значком, что означает исключено. Просто щелкните его правой кнопкой мыши и еще раз нажмите «исключить». Тадаааа он вернулся.
Не могу поверить, что я так много раз не обращал на это внимания .
Приведенные ниже методы показали, что они были успешными, но все же не смогли показать некоторые каталоги, которые были пустыми или имели несколько файлов.
- Синхронизировать каталог
- На вкладке Каталог не были исключены никакие каталоги.
Что сработало для меня, так это закрытие проекта, в котором возникла проблема, и повторное открытие его в другом окне проекта и выбор open in the current window
Файл -> Настройки -> Каталоги -> + Добавить корень содержимого
Вы можете удалить файл .idea / workspace.xml .
Перейдите к настройке PhpStorm ( Ctrl + Alt + s ) введите и выберите "типы файлов", а не "другие типы файлов"! (Редактор> Типы файлов) в «Игнорировать файлы и папки» удалите все необходимые расширения (я удаляю все!).
Примените его, и вы увидите все свои файлы в PhpStorm.
PHPStorm, похоже, делает это в случае пустых каталогов (по крайней мере, если вы активно удаляете файл внутри phpstorm).
В качестве временного быстрого исправления вы можете просто открыть папку в проводнике и создать любой пустой файл :
После этого убедитесь, что вы синхронизируете свой проект, щелкнув правой кнопкой мыши и выбрав «Синхронизировать»:
Это должно сделать вашу ранее скрытую папку видимой, и вы можете просто создать свой первый фактический файл, а затем просто удалить пустой файл.
Я только что столкнулся с этой проблемой в phpStorm 9, где я пытался создать проект из существующих файлов, но phpstorm не мог видеть каталог. Очень странно.
Вместо этого я пошел «создать новый проект» и вручную ввел в поле местоположения путь к существующему каталогу. На следующем экране он спросил что-то вроде «каталог существует, вы хотите создать проект из этих файлов?» и это сработало.
Я решил проблему так: Closed Webstorm -> Добавил файл в пустую папку с файловым браузером Windows -> Opened Web Storm -> Папка и файл были показаны.
Мои папки были скрыты PHPStorm, когда я использовал представление проекта:
Все файлы отображаются при переключении в режим просмотра файлов проекта:
Вот, как я это сделал это в PHPStorm 2016.
Откройте диалоговое окно настроек / предпочтений, нажав ⌘ или выбрав Файл | Настройки для Windows и Linux или WebStorm | Предпочтения для OS X. Щелкните узел "Каталоги".
Мой USB-накопитель решил случайным образом отключиться, пока я открывал проект, затем я подключил его обратно, и никакие каталоги не отображались. Только файлы по умолчанию, такие как все файлы .git , .htaccess и index.php .
Перейдя в Файл> Настройки> Проект: Имя проекта> Каталоги . Корня содержимого больше не было. Мне просто нужно было нажать « Добавить корень содержимого », выбрать мою корневую папку, и я снова смог увидеть все :)
Также кажется, что люди исключили каталоги, такие как их корень содержимого или отдельные файлы, которыми можно управлять с помощью тех же настроек.
I'm using PhpStorm 6.0.3, and it doesn't show any directories in the Project Tool Window. They were there just a minute ago but I managed to make them disappear by clicking or shortkey on accident.
They are there in the file system - I see them in Windows Explorer, but they just don't show up in PhpStorm. I have checked the Jetbrains documentation, checked the scope and tried deleting the project-settings (.idea-dir), but to no avail.
Does anybody have a suggestion on how to show them again? Or where I might have screwed up the settings? Thanks!
Views
The tool window has several views:
Project view. This view displays all the project items along with their dependencies (SDKs and libraries). The emphasis is on the directory structure, although the packages are also shown.
Scopes views ( Project Files , Open Files , and so on). These views display the contents of the predefined and user-defined scopes. In other respects, depending on the currently selected view options, a scope view may resemble the Project view.
To switch between views, press Alt+Right / Alt+Left or select the desired view from the list on the title bar. You can also display each view in a separate tab: click and disable the Group Tabs option.
To configure a view, use the corresponding options in the title bar context menu. The necessary options can also be accessed by clicking on the title bar.
Title bar buttons
Select Next View or Tab
Select Previous View or Tab
If the views are currently shown as tabs (the Group Tabs option is off), this button appears to the right of the last visible tab.
Open the list of views, for example, to select a different view.
Navigate from a file in the editor to the corresponding node (file, class, field, method, and so on) in the Project tool window.
This icon is not available if the Always Select Opened File option is currently on.
Collapse all the nodes.
Open the menu for configuring the current view and changing the tool window viewing modes. The available options are a subset of the title bar context menu items.
Note that most of the menu items are options that you can turn on or off. An option which is on has a check mark to the left of its name.
Я создал проект в WebStorm, а затем отправил его на GitHub.
Когда я перезагрузил компьютер и перезапустил WebStorm (и проект), все, что я вижу на панели проекта, - это корневые файлы и ни одна из папок (да, папки есть)
См. Изображение ниже для справки.
Кто-нибудь знает, как я могу заставить эти папки снова появиться на панели проекта Webstorm?
Ознакомьтесь с этой проблемой, чтобы получить подсказки / решения.
Попробуйте удалить workspace.xml и watchertask.xml, а затем просто перезапустите среду IDE. Вы должны увидеть свой полный исходный код во всех папках.
Этаж 36 решаю мою проблему. в WebStrorm 11
- закрыть WebStorm;
- в папке проекта удалите .idea / (скрытый каталог);
- открой свой проект, наслаждайся :)
Я вижу это время от времени. Я использую Git, и мой файл .gitignore настроен как рекомендуется, в частности:
Я иногда вижу это после клонирования репозитория, и, пытаясь понять, почему, я наткнулся на этот пост и прочитал принятый ответ.
Я удалил файл modules.xml и снова открыл WebStorm (2016.2.4), и проблема была решена. Я посмотрел на новый modules.xml и обнаружил, что его содержимое точно такое же, как и раньше, но мой файл .iml был больше.
Похоже, это повреждение файла .iml , а не modules.xml . Я предполагаю, что удаление modules.xml вызывает перестройку файла .iml . Не уверен, что это кому-то поможет, но подумал, что могу предложить дополнительную информацию.
Я столкнулся с той же проблемой и решил ее, сделав кеш недействительным. Параметр находится в разделе «Файл»> «Недействительные кеши / перезапуск». В приглашении нажмите Invalidate и перезапустите.
Примечание. Прежде чем вы это сделаете, необходимо открыть проект, о котором идет речь.
Вам не нужно удалять всю папку .idea и перенастраивать весь проект, просто
- удалите .idea / modules.xml
- перезапустите IDE, и ваши папки снова будут там!
- закрыть WebStorm;
- в папке проекта удалите .idea / (скрытый каталог);
- открой свой проект, наслаждайся :)
Я просмотрел файл system/log/idea.log и обнаружил, что этот плагин выдает исключение Null всякий раз, когда я открываю новую папку как новый проект и нарушаю content root автоматическое обнаружение IDE, и после того, как я удалил этот плагин, все папки отображаются должным образом.
У вас может быть эта проблема из-за плагина-виновника, и отключение тех, которые вы только что установили недавно, непосредственно перед возникновением этой проблемы, решит проблему. Проверьте файл журнала и найдите ERROR .
Если вы обнаружите, что это важный плагин, который вы активно используете и который вы не хотите отключать, то для временного исправления откройте Settings->Directories и нажмите Add content root . , чтобы добавить корневую папку вашего проекта, нажмите Ok . Появятся папки и начнется индексация, и, конечно же, вам придется делать это каждый раз, когда вы открываете новый папку как новый проект.
Найдите .idea / modules.xml в корне вашего проекта и убедитесь, что эти строки верны:
Замените NameOfYourProject.iml названием вашего проекта.
Затем убедитесь, что файл .idea / NameOfYourProject.iml существует, если нет, создайте его и поместите в него:
Поиск
Ctrl + F — поиск в текущем файле
Ctrl + Shift + F — ищет слово в группе файлов (можно указать в каких папках искать)
Case Sensitive — чувствительность к регистру
Whole worlds only — только целиком слова (если часть слова найдена — то он не покажет)
Ctrl +N — зная название класса, найти файл, где он находится
Ctrl + Shift + N — найти файл по названию
Ctrl + Alt + Shift + N — поиск любой функции/метода и констант (полезно, если помните название метода, но не помните класс, в котором он записан)
Манипуляции
CTRL+Y — Удалить строку. Первое время пришлось привыкнуть к этой кнопке. Раньше пользовался CTRL+D кажется.
CTRL+Z — Вернуть изменения назад.
CTRL+SHIFT +Z — Вернуть изменения вперед.
Ctrl + O — Удобный инструмент для переопределения методов, который позволяет выбрать методы для переопределения и вставляет заготовки кода
Ctrl + / Comment/uncomment with line comment Закомментировать/Раскомментировать выделенный фрагмент кода с помощью //
Ctrl + Shift + / Comment/uncomment with block comment Аналогично предыдущему, но используется блочный комментарий /**/
Ctrl + W Select successively increasing code blocks Выделение содержимого текущего блока:
Ctrl + Alt + L Reformat code Реформат кода, особенно полезен, когда нужно разбираться в коде низкого качества и ужасного форматирования.
Табы / Вкладки / Навигация
ALT+LEFT/RIGHT — Быстрое переключение таба на левый или правый.
CTRL+TAB / CTRL+SHIFT+TAB — Переход к открытым табам и внутренним окнам. (Как и во многих приложениях)
CTRL+ALT+LEFT/RIGHT Переход по истории где вы побывали когда перемещались по файлам назад/вперед. Очень удобно, часто пользуюсь. Курсор возвращается имеено туда где я был, даже если это было в одном файле.
CTRL+B — Перейти к месту определения сущности указанной в коде (метод, переменная, и т. д.). Тоже самое, что и ctrl + клик левой кнопкой мышкой
Ctrl + I Implement methods Инструмент аналогичный предыдущему для определения методов
Буфер обмена
В буфер обмена помещается несколько скопированных значений.
CTRL+SHIFT+V — Вставить из истории буфера обмена.
История
CTRL+E — Показать историю открытых файлов
Управление VCS
CTRL+` — контекстное меню VCS для текущего файла
CTRL+K — Commit
CTRL+T — Update
Документация, параметры
Ctrl + Q — Выделите/поставьте курсор на метод/переменную/константу/функцию/класс и после комбинации отобразится документация по этому элементу.
CTRL+P — Показать передаваемые параметры внутри метода/фукции/класса. Когда курсор внутри скобок: $this->func(|);
Метки (полезно пометить какую-то строку в файле, чтобы потом к ней перейти)
Ctrl + Shift + (0. 9) — Установить/сбросить метку в проекте
Ctrl + (0. 9) — перейти к метке (у меня 1,2,3,4 заняты под рабочие столы mac, поэтому ставлю с 5)
Общие:
SHIFT + Tab — Убрать отступ (табуляцию)
Ctrl + Alt + S — настройки phpStorm
Preview files
There are two ways to preview files without opening each one in a separate tab:
Use the file preview popup — select a file in the Project tool window and press Space .
Enable the preview tab — click and select Enable Preview Tab .
13 Answers 13
removing the .idea folder, and restarting the app did the trick for me
thx - just slight variation - i used this for webstorm and it only worked when I opened it from inside the dir. ie. wstorm . vs wstorm mydir - not sure reason - had to move on for now. cheers
Really awkward, but this works. It really sucks that simply opening a project doesn't work without this crazy hack.
This also resets all the other project settings, which might not be desirable. I would use it as a last resort.
Have you changed the scope dropdown value by any chance?
I have checked, it is on "project". By the way, if I look under project settings > deployment > directories then I see I have not excluded my dirs.
So, it's now a couple of months later and made the same mistake. Only this time I made 1 directory disappear and was accidentally pointed in the right direction by PhpStorm itself. I excluded the directory from the project, so it didn't show up anymore. Apparently exluded dirs are not saved in the project settings since re-creating the project didn't help.
Here is how I found it back: File > Settings > Project settings > Directories There I saw my dir flagged with a red icon, meaning excluded. Just right-click it and click 'exclude' once again. Tadaaaa it's back.
I can't believe I've overlooked it so many times.
This helped me a lot. Just add a little comment so mac users can also find what they are looking for instead of file > settings > project settings > directories, mac users need to look for PHPStorm > preferences> project > directories.
I also had this issue and found it was a permissions issue. I couldn't track down the exact spot but giving everything full permission fixed it. I ended up just starting a fresh project though
This was more-or-less my solution as well, except under Directories I ad not directories listed so I clicked "Added root directory" and selected my root folder and was back in business. Thanks for the direction.
The Project tool window lets you take a look at your project from various viewpoints and perform different tasks such as creating new items (directories, files, classes, and so on), opening files in the editor, navigating to the necessary code fragments, and more.
Most of the functions in this tool window are accessed as context menu commands in the content pane and via associated shortcuts.
Also, the view contains the Scratches and Consoles folder that lets you manage created scratch files, database consoles, and extension scripts.
Show file size and modification timestamp
The Project tool window allows you to see the size and modification timestamp for the files in the project tree. To display this information, select View | Appearance | Details in Tree Views from the main menu.
Title bar context menu
The context menu that appears by right-clicking the title bar or clicking , provides settings for project views, viewing modes, as well as for switching between the views, resizing the tool window, and more .
The following table lists and briefly explains the available commands and options.
Select Next View or Tab
Use this option to switch between different views.
Select Previous View or Tab
Use this option to switch between different views.
Show List of Views or Tabs
Use this option to switch between different views.
If this option is on, the files in the tree that contain classes turn into nodes. When such node is unfolded, the contained classes with their fields, methods, and other members of the selected item are shown.
Show Excluded Files
This option is available only in the Project view.
Turn this option on or off to show or hide excluded folders and files.
If the option is off, the items (files, classes, and so on) are sorted alphabetically. If the option is on, the files are sorted by their extensions. Folders are always sorted alphabetically, files within are shown according to the status of this option.
Folders Always on Top
If the option is on, folders are shown above the files. Otherwise, all items are sorted alphabetically, and files and folders appear intermixed.
Enable Preview Tab
Enable the preview tab that allows you to view files in a single tab one by one without opening each file in a new tab.
Open Files with Single Click
If this option is on, PhpStorm will automatically open the selected item in the editor. Otherwise, you need to double-click items to open them.
Note that you cannot disable this option if you enable the preview tab.
Always Select Opened File
If this option is on, PhpStorm automatically locates documents that you open in the editor in the current view of this window.
Open the Scopes dialog in which you can create and edit used-defined scopes.
Note that this command is available only if the current view is a scope view.
Opens the File nesting dialog where you can configure presentation of files that have same names but different extensions.
If this option is on, there is a list in the left-hand part of the title bar from which you can select the necessary view.
If this option is off, the views are represented by tabs which appear in the left-hand part of the title bar.
This option lets you control general appearance and behavior of the tool window. See Tool window view modes.
To associate the tool window with a different tool window bar, select this command, and then select the destination tool window bar ( Top , Left , Bottom or Right ).
To resize the tool window by moving one of its borders, select this command, and then select the necessary Stretch to option.
Note that this command is not available for the floating mode.
Remove from Sidebar
This command hides the tool window, removes the associated tool window button from the tool window bar and removes the tool window from the quick access menu ( or ).
To open the tool window again (and restore the associated features), use the main menu: View | Tool Windows | or press Alt+1 .
Hide the tool window.
This command opens the description of the Project tool window in the PhpStorm online help.
Show tree indent guides
In the Project tool window, you can display vertical lines that mark indent levels and help you better understand the hierarchy of the components in your project. To display these lines, enable Show tree indent guides on the Appearance and Behavior | Appearance page of the IDE settings Ctrl+Alt+S .
Читайте также: