Menu

Hyperlinks in Notepad++

2011-04-09
2013-11-08
1 2 > >> (Page 1 of 2)
  • Charles W Billow

    Should Hyperlinks in Notepad++ be clickable to activate and go to the page?

    If so, mine aren't - how come?

    Regards,
    Chuck Billow

     
  • Bob Uncle

    Bob Uncle - 2011-04-10

    Notepad++ is a text editor and as such, hyperlinks are, by default, not clickable. There may be a plug-in to enable this, but I don't use plug-ins so am not familiar with this.

    - Bob

     
  • Charles W Billow

    OK, thanks Bob.

    Chuck

     
  • Charles W Billow

    One thing I just noticed Bob:  TextPad has an "Open in Browser" in the context menu of hyperlinks.  Not a bad substitute…

    Chuck

     
  • srbs

    srbs - 2011-04-11

    No plug-in needed:
    Settings ->Preferences -> MISC. -> Clickable Link Settings -> Enable

    srbs

     
  • Bob Uncle

    Bob Uncle - 2011-04-11

    Even better … thanks srbs

     
  • Oceans Blue

    Oceans Blue - 2011-06-24

    in word or excel you can right click and get this option

    So how can I create a HyperLink to Document on my C: drive in Notepad++ ?

     
  • Bob Uncle

    Bob Uncle - 2011-06-25

    file:///C:/Path/To/File/Filename.ext

     
  • Oceans Blue

    Oceans Blue - 2011-06-26

    Thanks,
    still not working for me.

    Is it suppose to be three /// after File: ?

    Let say the faile name is  xx.doc

    it is located in the c:\

    under directory called Files

    So it should be

    file:///c:/Files/xx.doc
    or
    file:///c:/Files/To/File/xx.doc 

     
  • Oceans Blue

    Oceans Blue - 2011-06-27

    I'll take that back:

    It works

    file://C:/directory/FileName.doc[\code]
    
     
  • Oceans Blue

    Oceans Blue - 2011-06-27

    here it is again

    file://C:/directory/FileName.doc[\code]
    the word [code] and [\code] is important
    
     
  • Oceans Blue

    Oceans Blue - 2011-06-27

    -

    file://C:/directory/FileName.doc[\code]
    
     
  • Oceans Blue

    Oceans Blue - 2011-06-27

    not too sure why the word code at the beginning not showing

    lets try using REM at the beginning
    REM   

    file://C:/directory/FileName.doc[\code]
    
     
  • Dave Brotherstone

    It's forwardslash code as the end, just like XML.   stuff here  

     
  • boyboy400

    boyboy400 - 2012-02-09

    This works great for me: file://C:/directory/FileName.doc

    BUT

    I have two questions:
    1- can I use the "%" character to shorten the addresses? For instance, I need to open the following file:
    c:\program files\abc\dec\ght\book.txt
    can I use something like     file://C:/%ght%/book.txt    ? (it didn't work)

    2- How should I write "program files"? it doesn't understand the space between program and files. I tried:
    file://'c://program files//library//shelf//book//try.txt'
    but didn't work.

    Please help me. Thank you

     
  • cchris

    cchris - 2012-02-12

    Encode the space as %20, this will work.
    As for path shortening, I'm not sure what this feature is. Encoding % as %25 may work.

    CChris

     
  • boyboy400

    boyboy400 - 2012-02-13

    Thank you CChris but I just tried
    file://g:/program%20files/try.txt
    and didn't work :(

    PS. I made a try.txt file in program files directory only for this reason …

     
  • boyboy400

    boyboy400 - 2012-02-13

    PS2. My program files directory is g indeed (not c)

     
  • cchris

    cchris - 2012-02-18

    You need a third / after file:

    CChris

     
  • Norbert

    Norbert - 2013-09-13

    To my humble knowledge the syntax for file protocol has to be used always with three or two slashes in the following way:

    • local: file:///c:/program%20files/file.ext
    • remote: file://server/path/file.ext

    Reason for three slashes is that if the host/server is localhost, it can be omitted resulting in ///. See: RFC 1738 URL. Sometimes you see also links with five slashes, but I think this is redundant. It may also happen that other strange slash combination including backslashs are working with different windows versions, file managers or browsers. Some tools are intelligent and can correct wrong combinations automatically either visible or invisible.

    Correct used slash ensures maximum compatibility and allow for example also the copy&paste of such links in filemanager or browser. Such links also do work then with text files opened in browser (e.g. with firefox extension linkification). The code "%20" has to be used for space coding, which is the main reason why I hate and never ever use space or any special characters in directory and file names.

    What I could not find out is how to use MSDOS environment variables in Notepad++. "%25" as code for % in %ProgramFiles% does not work.

    What I also could not find out is how to provide parameters to EXE programs and BAT batch files started with file:/// from Notepad++. If you separate any parameters after tool.bat or tool.exe with "%20" (e.g. tool.exe%20/e) the extension is modified and not the parameter (in this example "/e") is forwarded. As a workaround I start from Notepad++ only batch files without parameters and in these batch files another batch or exe file with its correct parameters can be started. Other ideas...?

    Regards from Norbert

     

    Last edit: Norbert 2013-09-13
  • cchris

    cchris - 2013-09-15

    This works:
    file:///C:/Program%20Files%20%28x86%29/langs%20%2D%20Copie.xml

    However, environment variables don't appear to be resolved.

    CChris

     

    Last edit: cchris 2013-09-15
  • THEVENOT Guy

    THEVENOT Guy - 2013-09-15

    Hi Cchris and All,

    The hyperlink :

    file:///D:/Documents%20and%20Settings/xvr823.380490A/Mes%20documents/Notepad++_645/Liste_Entit%e9s_HTML.txt

    is OK with my 6.4.5 version of N++

    In hyperlinks, don't forget to change ANY character, with code-point is ABOVE \x7f, by the syntax %nn with nn = the two hexadecimal values

    => The accentuated French character é, in the hyperlink above, is replaced with %e9

    Cheers,

    guy038

     

    Last edit: THEVENOT Guy 2013-09-15
  • Davey

    Davey - 2013-10-28

    Hello,
    I am trying to use the hyperlink feature to open a file
    I think I followed everything that was written here, but I cant get it to work
    If someone can help me I would appreciate it.

    I wrote the following
    file:///C:/Tag/myScripts.txt
    The hyperlink feature is enabled... see screen shot

    Thanks
    Davey

     
  • THEVENOT Guy

    THEVENOT Guy - 2013-10-28

    Hi Davey,

    Pleased to chat with you again :)

    I really don't understand why it doesn't work on your N++ configuration ?

    As for me, I created a folder Tag under the root C: of my XP notebook. Then, I created a file myScripts.txt with any text inside.

    Finally, I wrote your exact link : file:///C:/Tag/myScripts.txt , in a new tab, on my local 6.5 version of N++.

    And, as soon as I double-clicked on this link, the file myScripts.txt, in C:\Tag, was opened, as expected, in Microsoft notepad, with N++ in the background !! And I don't even use my notebook, with administrator rights !

    May be, a plugin may interfere and prevent you from using hyperlinks, but I don't really believe in that possibility.

    Sorry to have no more idea about it, for the moment. But, I hope that other users will be able to give better explanations !

    Cheers,

    guy038

     

    Last edit: THEVENOT Guy 2013-10-28
  • Davey

    Davey - 2013-10-29

    Hi THEVENOT Guy!
    Thanks, and same here.

    In such a silent unassuming way you solved my problem! (thanks to your efforts in adding text formatting to your posts!)
    I simply didnt know that a DOUBLE CLICK was required...! :-)
    I almost turned my whole computer inside out, but didnt think to try that!
    (Usually hyperlinks have a single click functionality, but I guess its better to avoid unwanted opening of files)

    Thanks a lot
    All the best
    Davey

     
1 2 > >> (Page 1 of 2)