In Notepad++, how can I launch my HTML files in Google Chrome through the Run menu?

11

1

I have Notepad++ 5.4.3 and I have Google Chrome installed.

In Notepad++, I know I can click on the Run menu; then browse for the .exe. But unfortunately, the only chrome.exe file I can find seems to be for the chromeframe for Internet Explorer.

Also, how can I remove the "Chrome" shortcut (which is not working) which I have added to the Run menu?

systemovich

Posted 2010-07-27T17:02:24.637

Reputation: 1 017

Answers

9

If you download the latest version (5.7?), the Run Menu has four different "Launch in browser" menu items (IE, Firefox, Chrome, and Safari)

Adam

Posted 2010-07-27T17:02:24.637

Reputation: 1 723

5

You can edit the link in the run menu by going to the %AppData%\Notepad++ directory and editing the shortcuts.xml file to reference the proper location of Chrome.

<Command name="Launch in Chrome" Ctrl="yes" Alt="yes" Shift="yes" Key="82">chrome &quot;$(FULL_CURRENT_PATH)&quot;</Command>

Thats what it reads by default

<Command name="Launch in Chrome" Ctrl="yes" Alt="yes" Shift="yes" Key="82">%LocalAppData%\Google\Chrome\Application\Chrome.exe &quot;$(FULL_CURRENT_PATH)&quot;</Command>

That's what it could read

Type this into the run command box:

%LocalAppData%\Google\Chrome\Application\Chrome.exe "$(FULL_CURRENT_PATH)"

jer.salamon

Posted 2010-07-27T17:02:24.637

Reputation: 758

I get the access denied error, even though I have closed Notepadd++. Also, the links that I added to the Run menu inside Notepad++, do not appear in the xml file. Maybe I could copy the contents of the current shortcuts file to a new one and delete the current one. – systemovich – 2010-07-27T17:39:20.460

You get access denied error when trying to edit "C:\Program Files\NotePad++\shortcuts.xml"? Close notepad++ edit the shortcuts.xml file to what you want to have appear then open notepad++ and everything should reload fine. – jer.salamon – 2010-07-27T17:52:47.510

If you get 'access denied' when you try to edit shortcuts.xml, how do you know that the links you added are not in the file? Are you logged in as a restricted user? Try logging in as an admin. The links you entered in Notepad++ are probably in Settings > Shortcut Mapper > Run commands. – boot13 – 2010-07-28T14:50:09.963

@boot13, I can open the file and edit it, but I cannot save my edits, because of that "access denied" popup. I am logged in as admin. – systemovich – 2010-07-28T18:09:23.953

@jer.salamon, I copied this C:\Documents and Settings\user\Local Settings\Application Data\Google\Chrome\Application\chrome.exe"$(FULL_CURRENT_PATH)" into the Run dialog, but nothing happened. Should I perhaps replace the " with something else when I paste it into the Run dialog? Thanks. – systemovich – 2010-07-28T18:14:10.620

I added the correct command to the answer. – jer.salamon – 2010-07-28T20:01:00.473

1

Try adding the shortcuts you want in Settings > Shortcut Mapper > Run commands.

boot13

Posted 2010-07-27T17:02:24.637

Reputation: 5 551

1thanks. Now I could at least delete the nonworking shortcuts that I added. – systemovich – 2010-07-28T18:10:48.303

1

In later verions of Notepad++ (currently 6.6.8) the shortcuts for browsers are not set by default, so one needs to save them first. To do so you can:

  • Add them manually from Run menu
  • Edit shortcuts.xml file

For the step by step solution, you can visit this link.

Musa Haidari

Posted 2010-07-27T17:02:24.637

Reputation: 133

0

I made the shortcut to be Alt + Shift + R and all is working fine.

The same for the other browser shortcuts.

ashwinsa

Posted 2010-07-27T17:02:24.637

Reputation: 101