7 Replies Last post: Jun 23, 2013 7:47 PM by Andriy Bazanov  
n a Newbie 7 posts since
Jun 23, 2013
Currently Being Moderated

Jun 23, 2013 4:37 AM

Problem with message "Cannot resolve directory/file" when edit files via WinSCP

Hello 2all!

 

 

1)

 

Is there any way to disable this warnings when you edit files (html, css) remotely, for example from ftp programs like WinSCP?

 

Example css (Cannot resolve file  error.gif)

 

.error {border:1px #CA1D13 dashed; color:#CA1D13; background: #F2EDE9 url('/images/error.gif') no-repeat 5px 50%;}


2)


Wrap lines didn't work

 

 

Project settings - > General -> Wrap when typing reaches right margin  (checked)

IDE Settings -> Editor -> Use soft wraps in editor (checked)

 

[IMG]http://i.imgur.com/GARNnIc.png[/IMG]

Andriy Bazanov Master 3,910 posts since
May 28, 2010
Currently Being Moderated
Jun 23, 2013 6:15 AM in response to: n a
Re: Problem with message "Cannot resolve directory/file" when edit files via WinSCP

Hi there,

 

1)

.error {border:1px #CA1D13 dashed; color:#CA1D13; background: #F2EDE9 url('/images/error.gif') no-repeat 5px 50%;}

If such URL starts with a slash (which means -- url relative to the website root) then you can mark the parent folder of /images/ as Resource Root (Settings | Directories) -- IDE will look for those resources relative to such folders

 

Alternatively -- "Settings | Inspections" and try to find correct inspection to disable.

 

 

2) Soft Wraps actually work -- it's clearly shown on your screenshot -- look at lines #95, 96, 106, 108 -- they occupy visible 2 lines in editor and they do have some "twisted arrow" icon at the end of the line.

 

Soft warp is like a "word wrap" option in text editor -- it will display long lines (that are wider than editor width) in multiple virtual lines so the whole content of the line is shown. This feature does not actually breaks the long line into 2 separate lines

 

As to "Project settings - > General -> Wrap when typing reaches right margin" -- I'm not exactly sure when it works .. but I think it should only work when you actually typing -- it does not work when you edit already existing text (but, once again, I'm not sure on this one).

Andriy Bazanov Master 3,910 posts since
May 28, 2010
Currently Being Moderated
Jun 23, 2013 4:12 PM in response to: n a
Re: Problem with message "Cannot resolve directory/file" when edit files via WinSCP
Question about remote editing files without local projets so any folders I do not want to create.

PhpStorm does not support editing files directly on remote server (FTP/SFTP etc) -- you have to have local copy.

 

To remove the message I have tried to remove the option in  "Settings | Inspections - CSS"  for "Unknown file or directory" but still no effect

I do not know then, sorry. Maybe it is recently introduced bug which worth reporting to the Issue Tracker

How to set width for wrap lines? Example Subime text:

It will wrap on the width of the editor itself -- you cannot set it smaller (unless you make editor area smaller).

Andriy Bazanov Master 3,910 posts since
May 28, 2010
Currently Being Moderated
Jun 23, 2013 7:30 PM in response to: n a
Re: Problem with message "Cannot resolve directory/file" when edit files via WinSCP
No, it's work. You're talking some wrong information. When you're editing a file from winscp he automatic downloaded on local dir first.

I'm not talking about WinSCP -- I'm talking about PhpStorm only. I cannot comment on any interaction between WinSCP and PhpStorm since I have never used WinSCP myself, unfortunately

 

PhpStorm has built-in FTP supprt and it cannot open file directly from FTP -- it needs local copy first (as it needs to index it -- that's the requirement), otherwise this ticket would not exist in first place: http://youtrack.jetbrains.com/issue/WI-1398

 

 

It's very strange for me 8( It is bug?

No, It's not a bug.

 

Why would I need to virtually (yes, virtually -- soft wraps are virtual) wrap the line and leave lots of empty space on the right side?

 

If it would be physical wrap (when you will have line split into 2 or more lines, each separated by line ending characters) -- then yes, it makes sense. If physical wrap does not work -- then it should be a bug indeed.

 

 

In any case: you can report Bugs or any missing Feature Requests to the Issue Tracker if desired.

Andriy Bazanov Master 3,910 posts since
May 28, 2010
Currently Being Moderated
Jun 23, 2013 7:47 PM in response to: n a
Re: Problem with message "Cannot resolve directory/file" when edit files via WinSCP
I said in the beginning about the third-party program!

In this case I'm sorry -- I misunderstood your initial question -- I was not expecting you to use PhpStorm in this way since it has built-in FTP support.

 

PhpStorm is an IDE and not advanced text editor .. and may not be suitable for such workflow (editing some random files). It's built around having local project idea (whole project, not just 1-2 unrelated files) -- only there you will see all features it can offer.

More Like This

  • Retrieving data ...