How to tell Vim: Open current document in Browser and Refresh? - vim

Right now I open archives in my browser (localhost) with the follow line: :! start "http://localhost" file:///"%:p""<CR>.
It is possible to tell Vim: Open Firefox and hit refresh? (I don't want to refresh the current document I'm editing in Vim because if I open, for instance, the current CSS, the results won't show up in the browser.
PS: I'm using Windows XP (Unfortunately)

What about using the https://addons.mozilla.org/en-US/firefox/addon/115 extension for automatic page reloads?

Related

Is there anyway to delete browser history when that browser windows get close without using in incognito mode?

If I open many chrome or brave or other browser windows with different tabs, And when I close any particular browser window .I need all the browser history for that window alone to be deleted and This should be optional.
without using incognito mode

How to clear browser cache through command line

I am getting the error "Error generating workflow content. Try to clear the browser cache and reload page"
How to clear the chrome cache.
You can do it via the command line or terminal. There is a nice tutorial here
On mac you can open Chrome. Open Preferences using cmd + ,. Then scroll down and open Advanced. Then click on Clear browsing data and select Cached images and files.
I don't have a Windows machine, but I found a nice guide for clearing cache on Windows here

How to open a browser within VSCode just like another editor tab

For a VSCode extension i want open browser within VSCode not externally, wherein i can load some URL (https://developers.redhat.com/)
I tried looking into various options to achieve it in VScode extension, what i came across is with help of webview i.e 'vscode.previewHtml' we can pass html content which would be rendered with in VSCode editor tab, but what i have is url to load. Can pass it to iframe but i can't open it in iframe
Another option is to open it in browser but it opens external browser.
what i need is to open a browser within IDE (VSCode), experience should be similar to what we get for 'vscode.previewHtml'
or as we see in IDEs like eclipse where browser window is opened right inside IDE.
As we can see below
Please give inputs, suggestions
It's possible now without extension. Open command palette (CTRL+P) and search for "Simple Browser: Show".
This is how it looks:
In order to render your html you can use the WebView API:
https://code.visualstudio.com/docs/extensions/webview
Microsoft has an extension in development, Live Preview. I use it to view html codecov reports inside of VSCODE and it at least works for that.
You just search for it in extensions and add it to VSCODE

How to use the Tincr Google Chrome extension for live reloading local files

I have tried using the Tincr Chrome Extension now on Windows and Linux (Ubuntu) and it still does not seem to do the Live Reloading it claims to on its website when I am editing the file in an external editor. The Tin.cr website claims:
Any CSS or JavaScript changes you make in any editor reloads in Chrome
without refreshing the whole page
To explain further, I have tried installing this extension as an unpacked extension in Chrome with Developer Mode checked under chrome://chrome/extensions/ as suggested in the Tincr documentation. I have also tried installing this extension directly through the Chrome Web Store. The effect has been the same.
In terms of setting up Tincr, I have tried opening up my file locally without a web server using file://C:/htdocs/file.html which Tincr claims in its documentation it can read automatically without needing any setup, and also I have tried opening up my file via an Apache Web Server on localhost e.g. localhost/file.html and setting up the Project Type in Tincr as Http Web Server as suggested in the documentation, but both ways have been to no avail.
In terms of editing my local file, I have used a number of different external editors, for example, Geany on Ubuntu and Titanium Studio on Windows.
After editing the file in the editor I have left the page I am editing open in my Chrome browser with the Tincr plugin setup and enabled. However, after saving my file in the editor and looking to see if it live reloads in Chrome, nothing happens. The file simply stays the same. Again, to reiterate, this is happening in both Windows and Linux (Ubuntu).
And so my question is this: has anyone successful tried using this extension with an external editor and if so could you please detail the steps to get live reload to work as I'm beginning to think this may be a bug in the extension?
I think I may have an explaination. Having a look at the google groups for Tincr, it appears Tincr does not support html file refresh, and that it can only detect changes in either css or javascript.
source: https://groups.google.com/forum/#!topic/tincr-for-chrome-devtools/VyC0mavLs_A

Closing tabs when a chrome extension is disabled/reloaded

I have a Chrome extension that opens a number of tabs, which it keeps open and uses to display data. I want those tabs to close when the extension is disabled or reloaded. My initial thought was that background.html would be unloaded when I restarted the plugin, but I can't seem to get anything that involves this to work. Any suggestions?
Chrome automatically closes pages with chrome-extension://<your_extension_id>/local.html urls (pages from the extension directory) when an extension is disabled. So if you can display your data using those pages - they will get closed. If it is some external site you are displaying - maybe you can make a local stub page with iframe and load your external site there.
Otherwise I can't think about any other way (besides having another extension watching this one).
i dont' know so much about chrome extensions, but, I think you are openning new windows by something like var w = window.open(params), so, you can close the window with w.close().
if not, ignore my answer :P

Resources