Set text editor other than Notepad for New Text File


  1. Posts : 52
    10 x64 20H2 19042.804
       #1

    Set text editor other than Notepad for New Text File


    Seems I can't set the text editor other than Notepad on Windows for New Text File?
      My Computer


  2. Posts : 843
    11 Pro 21H2 (22000.832)
       #2

    Sure you can. Just associate .txt and .text files with the text editor of your choice. The easy way is to find a .txt file in File Explorer, right-click it, choose Open With, and then use as much clicking and scrolling as you need to use until you find your text editor, then check the Always Use box, and you're done.

    If you hit a snag, c'mon back and post again. Someone here will gladly help.

    Dan
      My Computers


  3. Posts : 52
    10 x64 20H2 19042.804
    Thread Starter
       #3

    Wisewiz said:
    Sure you can. Just associate .txt and .text files with the text editor of your choice. The easy way is to find a .txt file in File Explorer, right-click it, choose Open With, and then use as much clicking and scrolling as you need to use until you find your text editor, then check the Always Use box, and you're done.

    If you hit a snag, c'mon back and post again. Someone here will gladly help.

    Dan
    Well I tried to set to GVim, but I want to set it as GVim Easy, but no avail other than use the reg and edit the txtfile action string value..., because if I set the .txt assoc to VimFile, the New File Text won't be available on right click context menu
      My Computer


  4. Posts : 21,421
    19044.1586 - 21H2 Pro x64
       #4

    benlimanto said:
    Well I tried to set to GVim, but I want to set it as GVim Easy, but no avail other than use the reg and edit the txtfile action string value..., because if I set the .txt assoc to VimFile, the New File Text won't be available on right click context menu
    Did you install Vim using the Windows installer? I have done that and my .txt files can be/are associated with opening by Vim without any registry edits required.
      My Computer


  5. Posts : 843
    11 Pro 21H2 (22000.832)
       #5

    I don't see why you can't associate "GVim.exe -y" with .txt files. Have you tried opening .txt files with GVim Easy? Have you checked the GVim settings to see whether all GVim files can be saved as ,txt?

    I don't think you can get the right-click menu to include "VimFile."

    There is a program called Context Menu Tuner

    Download Context Menu Tuner - MajorGeeks

    that can add a custom item to the desktop context menu. Double-click Add Custom Item and fill in the blanks and click Add and Desktop, and I think you can figure it out from there. You'll just have to navigate to your GVim.exe file and add the -y parameter to the command.

    Now I see that Steve 108 has responded while I was searching, trying a program, and typing, so maybe his solution is the right one for you: uninstall your GVim and re-install it with the Windows installer.

    Dan
      My Computers


  6. Posts : 18,034
    Win 10 Pro 64-bit v1909 - Build 18363 Custom ISO Install
       #6

    Hello @benlimanto,

    Although I have Notepad as my Default selection by choice, I also have Notepad++ installed. What I do is to right-click the .txt file and select Edit with Notepad++ . . .

    Set text editor other than Notepad for New Text File-notepad-.jpg

     Notepad++

    About Notepad++:

    Notepad++ is a FREE source code editor and Notepad replacement that supports several languages. Running in the MS Windows environment, its use is governed by GNU General Public License.

    Based on the powerful editing component Scintilla, Notepad++ is written in C++ and uses pure Win32 API and STL which ensures a higher execution speed and smaller program size. By optimizing as many routines as possible without losing user friendliness, Notepad++ is trying to reduce the world carbon dioxide emissions. When using less CPU power, the PC can throttle down and reduce power consumption, resulting in a greener environment.

    Basically, Notepad++ it is a text and source code editor that is more powerful than the basic Notepad editor. One advantage that I find extremely useful on a regular basis is that it can Compare text files and Highlights the differences between two or more files. To use the Compare feature you will need to download the Compare Plugin.

    Notepad++ and the Compare Plugin are FREE.

    > Website & Download => Notepad++ [ Download ]
    > Compare Plugin Download => Notepad++ [ Compare Plugin ] - SourceForge.Net

    I just thought you might find this useful!



    Also, have a look at these for making Notepad++ the Default for .txt files . . .

    > How to make Notepad++ Default Program for `.txt` Files
    > Set Notepad++ as Default App in Windows 10



    I hope this helps.
      My Computer


  7. Posts : 52
    10 x64 20H2 19042.804
    Thread Starter
       #7

    steve108 said:
    Did you install Vim using the Windows installer? I have done that and my .txt files can be/are associated with opening by Vim without any registry edits required.
    For some reason I'm against GVim installer, sorry. See Vim 8.2.3623
    builds for Windows


    Wisewiz said:
    I don't see why you can't associate "GVim.exe -y" with .txt files. Have you tried opening .txt files with GVim Easy? Have you checked the GVim settings to see whether all GVim files can be saved as ,txt?

    I don't think you can get the right-click menu to include "VimFile."

    There is a program called Context Menu Tuner

    Download Context Menu Tuner - MajorGeeks

    that can add a custom item to the desktop context menu. Double-click Add Custom Item and fill in the blanks and click Add and Desktop, and I think you can figure it out from there. You'll just have to navigate to your GVim.exe file and add the -y parameter to the command.

    Now I see that Steve 108 has responded while I was searching, trying a program, and typing, so maybe his solution is the right one for you: uninstall your GVim and re-install it with the Windows installer.

    Dan
    Well when we do DOS command

    ftype VimFile=C:/gvim/gvim.exe -y %1
    assoc .txt=VimFile

    well that make the file dissapear and won't work, because the VimFile doesn't have any default value, only shell open, after read the .reg provided on the first post, now I can use txtfile reg as Vim with Vim Easy, anyway Vim Easy doesn't have any exe only switch argument, when you pick up from right click, well you can't choose lnk right..


    Paul Black said:
    Hello @benlimanto,

    Although I have Notepad as my Default selection by choice, I also have Notepad++ installed. What I do is to right-click the .txt file and select Edit with Notepad++ . . .
    Output Ommitted



    I hope this helps.
    I already has Edit with Vim for Folder and File, I will skip NPP.
      My Computer


  8. Posts : 2,800
    Windows 7 Pro
       #8

    Hi benlimanto,

    I downloaded your version of Vim and extracted it in ProgramFiles. then started vim and accepted files registration.

    Then I used windows debugger to replace Notepad.exe image at the system level. (Should be executed in an admin cmd)
    Code:
    reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe" /v "Debugger" /t REG_SZ /d "\"%ProgramFiles%\GVim\gvim.exe\" /y" /f
    Restart is not required. I was able to create new file from right click menu and save them no problems, it now replaces Notepad system wide.

    If you're not happy with the results. To remove the modification use:
    Code:
    reg delete "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe" /v "Debugger" /f
      My Computers


  9. Posts : 52
    10 x64 20H2 19042.804
    Thread Starter
       #9

    Oh wow. This is more advance than I do, but it's useful. Anyway thank you.

    It's like what Notepad2 done. Well, I should look into it more. Thank you for sharing sire.
      My Computer


  10. Posts : 2,800
    Windows 7 Pro
       #10

    Not that difficult, the only thing you need to modify in the command is the part that points to your GVim.exe

    Code:
    %ProgramFiles%\GVim\gvim.exe\
    reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe" /v "Debugger" /t REG_SZ /d ""%ProgramFiles%\GVim\gvim.exe\" /y" /f
      My Computers


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 04:24.
Find Us




Windows 10 Forums