I want to open a small browser. I open the browser with the code below, but how can I adjust the size.
Run chrome.exe "https://www.youtube.com/channel/UCNb8hHMKUSL4HigPdg2ht4A" " --new-window "
Chrome actually has a command-line option that lets you specify the size of the window. To start a chrome window with a specific size from AHK use the following.
Run, chrome.exe --window-size=800`,600 --app=https://example.com
Make sure to include the ` as it escapes the ,.
Related
I am using latest iTerm on catalina with the "Semantic History" feature which allows you to Cmd+Click urls and filename/paths in the terminal. I set iTerm to open vscode:
This seems to work well if the text is like "src/foo/bar.js:3:3" - however if the text is like "src/foo/bar.js" it treats it like a file url. When you hold CMD and hover over these pure file paths, it shows the full file url in the bottom right, just like when you hover over links inside a browser:
What ends up happening with the file:// url is it will open the default app specified by the OS. On one hand, iterm should be smart enough to know that we want to open files in our editor... On the other hand, it would be nice if Jest also added the column and line number for iterm to recognize.
Turns out, clicking the last stack frame at bottom of the stack trace goes directly to the highlighted error line+column number.
I am using a command line script to open a particular web page in Chrome and send keypresses to that web page
When Google Chrome opens for the 1st time chrome opens up its own Tab e.g. welcome to chrome/login to chrome and this throws everything off.
I dont want any new tabs generated I want only the web page I asked for
Is there a command line switch or method to force chrome to not generate its own tabs. Perhaps registry entry etc?
I have tried some but no success so far
Thanks
Confuseis
Since your question contains the AutoIt tag, I have to assume you want an AutoIt solution.
The best way to do this would be to use chromes --new-window command line switch. This opens a new instance of Chrome, with a single tab pointing to the URL provided, by executing the chrome executable via ShellExecute.
$sPath = #HomeDrive & "\Program Files (x86)\Google\Chrome\Application"
ShellExecute($sPath & '\chrome.exe', '--new-window "https://www.google.com/"', $sPath, "", #SW_MINIMIZE)
I am working on a script that will set up most of the programs I use during work.
I started simple like this:
#!/bin/bash
thunderbird &
utox &
firefox http://www.stackoverflow&
it is already pretty nice, but lubuntu doesn't memorize the position. so it is all messed up and i have to position every window.
I am looking for a possibility to move every window using the very same script. I found the -geometry parameter, but it is application specific and e.g. firefox doesn't support something like that.
as I have 2 monitors there has to be the ability to also control the screen the window shows up.
A bonus would be to also set up windows on my 2nd virtual desktop.
Thanks in advance.
I realized that I waste 10% of my time changing windows between Vim and Firefox.
Alt + Tab + F5 (and sometimes a get the wrong window).
Is there a way of making this task easier?
I thought of the following:
Embending vim to firefox (I think it is impossible).
Making a Vim shortcut which sends me to Firefox's window.
Any suggestions?
Technically, I guess this ain't proper answer, but You might benefit from these tools.
For Chrome - try LiveReload.
For Firefox - try XRefresh.
Here's a Vim shortcut to open the current file in Firefox. It should work on Ubuntu, though I'm not in front of my Linux machine to test. You can add it to your ~/.vimrc
map <Leader>p :!firefox %<CR><CR> " Preview the current html file in Firefox
If you're looking for varations on that same theme, there are quite a few similar tips on the Vim wiki. Check the duplicate links tip at the top and the "See Also" links at the bottom.
If you are on Windows, AutoHotKey is a good free option.
You could assign a key combination to activate the Firefox browser, send the F5 key to Firefox, and then return focus to Vim.
Benefits of AutoHotKey:
You could have logic that checks whether the Firefox is open, and if it is not open, open it.
You could use the AutoHotKey Window Spy tool to actually activate Firefox. Alt+Tab will fail if you've activated another window in between Vim and Firefox.
See for example:
http://www.autohotkey.com/docs/commands/WinActivate.htm
http://www.autohotkey.com/docs/Tutorial.htm
I know that using a command like:
:%bdelete
Using this command I can close all buffers, in all tabs, what I'd like to do is to close all buffers open in the current tab, is that possible?
Usage:
What I'd like to do, is to open ViM and load :VSTreeExplorer and then open related files in the same window switching between them using :next and :previous and then open other files a new tab (with VSTreeExplorer as well), when I need to clean one of the tabs, I would like to use whatever command that closes buffers in the current tab.
For now, what I do is use :%bd and then open the VSTreeExplorer and start over...
Thanks
If you're done with a tab you can just use :tabclose.
:windo bd will delete all buffers in the current tab.
Buffers are global to the Vim instance, not confined to a specific tab page. A tab page is simply a way to organize windows and windows are simply a way to display a buffer. Zero or more windows (and therefore tab pages) can display the same buffer. Getting used to this concept should help your workflow in Vim.
The Vim wiki has a couple pages that give some more explanation and tips for using tab pages.