Refresh browser on save in a non-local setup - visual-studio-code

I'm searching for a plugin that can autorefresh a specific page in my browser when I press CTRL+S in Visual Studio Code.
I'm working in a SaaS platform and I have to use WebDav to acces some Smarty template files .
I can live synchronise a local file to the platform when I save the file in VS Code, but I have to manualy refresh the browser each time to see the changes.
There are plugins that can autorefresh on save, but they are used in a local development setup.
As far as I can see, I can't use these plugins, because I can't execute the template files localy. I just change and upload them to the platform and see the result in the live website.

I found a solution with a browserextension:
Chrome: Autoreloader: reload tab on file change
Firefox: FileWatcher

Related

ftp-kr - Cannot edit in read-only editor

I cannot figure out how to use the ftp-kr extension for VS Code properly. I have read and re-read the GitHub Wiki and the README documentation and cannot find any other help for my issue. I posted this question to the project Issues on GitHub but have yet to receive a response.
ftp-kr is just a simple extension for editing files via FTP that are located on a remote server. Many other users seem to be using the extension with no issue.
I installed the extension, and then I successfully edited the connection settings (in ftp-kr.json) and successfully made a connection to the remote server I am trying to edit files on.
I opened the FTP-KR: EXPLORER pane to look at all of the files on the server, but if I double-click any of the files to open them and then try to edit them, I am unable to type and just get a warning in VS Code that says "Cannot edit in read-only editor".
I have tried right-clicking on files and clicking the "Download This" button, thinking that maybe I need to download a local copy of the files to edit before uploading the changes. However, whenever I click the "Download This" option on any file in the ftp-kr Explorer, it just gives me an error message that says "[file_name] is not in remotePath".
I tried running the >ftp-kr: Download All command, but it just spits out a notice that says "Nothing to DO".
How do I edit files located on the remote server and save those changes to the server?
P.S. I have tried the solutions found in this question but unfortunately none of them seem to work. Particularly, "code-runner: Run in terminal" is not in my settings and "Edit in Local" is not a context menu item that appears in my editor.
After a number of months, I finally have a solution to this thanks to the developer eventually responding on GitHub. There are a few things going on here.
Any file that a user wishes to modify must be downloaded as a local copy on the user's machine first and then that copy can be uploaded to the webserver via FTP.
ftp-kr cannot auto-download individual files. (Either when they are double-clicked on or through any other method.) It can only download entire directories, and those directories can be changed by using the localPath and ignore options in the configuration file, then stopping and restarting the ftp connection.
The "Download This" context menu option that appears is a piece of non-implemented code. It will not do anything.
>ftp-kr: Download All is the preferred way (by the developer's intent) to download the remote files onto the user's computer. The fact that it was returning an error before was a bug which has now been fixed.
Confusingly, the user can view the filenames and context of every file on the remote file system using a convenient tree view, you just cannot simply download any of those files individually.
In all, this plugin does not provide the functionality that I hoped it would have. (Namely, being able to easily download, modify, and upload individual files.) So I know how to properly use it, I will just be switching to a different plugin for my purposes.

How to connect my code from VS Code to my GoDaddy domain?

I have purchased a GoDaddy domain and I have made a website from code through the Visual Studio Code application. I tried to link the two together so that I can have a public website with my domain name and the content from VS Code. Does anyone know how I can do this? Any suggestion in VS code ftp/sftp plugins ?
Download ftp-simple extension for VSCode and then setup the configurations file.
To setup configuration file Press F1 -> ftp-simple: Config - FTP connection settings
Set up your configuration and then again press F1 -> ftp-simple: Remte Directory Open to Workspace.
You can check the output is Output console by selecting ftp-simple in dropdown.
Have you purchased hosting service? If yes, you just need to upload your files to your root folder and make sure you point your domain to your hosting provider name server.

Group policy to make Chrome open files automatically after download

I am in the process of updating our currently existing Chrome distribution so that when a user downloads a .pdf file, the file is opened automatically.
As a first step, I was able to prevent Chrome from opening the pdf in its internal pdf viewer and could do a registry entry by using AlwaysOpenPdfExternally. This way it was downloading the file immediately and not opening it in the Chrome viewer.
I'd like to use Adobe to view the file automatically after download.
Unfortunately I was not able to find a registry entry. Nor was I able to find a GPO entry to be changed for Chrome.
I had found the following PowerShell script to be started upon logon of the user. However, testing it did not give me the result I was looking for.
The given entry extensions_to_open was not existing even after starting the script.
The current version of Chrome used is 66.255.
I would be happy for any help.
Edit: I am able to get the file to be opened automatically by inserting the given line here:
Is there any way to programatically force "Always open files of this type" for a specific file type in Chrome?
however, I am unsure of how to distribute the line of code into every PC in my network.
Edit: Chrome offers Group Policy Templates which should be importet into the active directory of your Windows Server. Once imported into your GPO, Chrome offers the setting: "Always open Pdf files externally". Once you check this feature, file should not automatically open in the internal PDF viewer.
See second edit: import the latest group policy templates into the GPO (will be stored on the active directory). After that, go into the GPO policies for "Google Chrome" and check the feature "Always open PDF files externally".

Chrome devtools save changed file path

I use browsersync and run site on local machine on http://localhost:3000/ — when i change css file (example path: ./static/css/menu.css/from devtools - it saved to root project folder in ./localhost%253a3000/static/css/menu.css
how can i change this path?
Thanks!
You got override locals featured enabled. You need to disabled it, and enable workspaces feature instead. I'm not giving all details because this features are different from chrome version to another. You can use the links to get workspaces working.

How to deploy my project to localhost?

I'm working on a website and right now I am using FileZilla to make changes to it. Every time I make a change, I have to re-upload the file to the website through FTP and then wait for it to update online. I want to just deploy my project to localhost so I can get instant results and then just upload the whole project when it's finished. How do I do this? All I have is a set of directories with the files in them.
You really need to use a web/application server such as IIS/Apache.
For PHP projects go for WampServer/XAMPP.Easy to setup and works very well.
(maybe too obvious)
If you are working only static content based on html/css/js you can just edit and view changes directly by opening the local file in your browser and refresh each time.
Furthermore for css and html you can edit your code "live", directly into browser and see changes immidiately.
Another option is to edit files with an editor that supports ftp like notepad++, you can connect via ftp, open and edit files directly from server (like php,html,css,js) because once you save the editor will automatically upload your changes.
Heres a good explanation about notepad++ and ftp plugin.
Localserver
If you work with php (and even only with html/css) the best choise is to run a local server that rappresents a real environment in which your code will run. As said by others XAMPP is a good choise for begginers because of simple installation and management.
XAMPP download
XAMPP tutorial
Once installed put your folder inside C:/xampp/htdocs/yourCodeFolder
Run the xampp control panel and start the Apache server.
Finally navigate with your browser to: http://localhost/yourCodeFolder/