Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

LIST 'e' key to edit file

May
10
0
I can't seem to make the 'e' key in the LIST window do anything other than launch notepad. I am looking at a java file and would like to use Notepad++ instead of notepad. I have tried this on two different systems:

On Windows 2008 64-bit installation:
TCC 11.00.44 x64 Windows 2008 [Version 6.0.6002]

On this system both assoc and ftype show nothing defined for .java or javafile. Explorer doesn't know what to do with a java file if I double click on it, which is as expected.

On Windows XP 32-bit SP3:
TCC 11.00.40 Windows XP [Version 5.1.2600]

On this system, assoc shows .java=javafile, but ftype doesn't list anything for javafile. If I look at JAVA in the "File Types" tab under Folder Options in Explorer, it has JAVA File associated with SlickEdit. If I double click a java file in Explorer, vslick comes up on this system.

In both cases, no matter what I try, if I type 'e' when I am in LIST view for a java file, Notepad is opened. I tried setting the Editor on the Windows tab of the option command to:

"C:\Program Files (x86)\Notepad++\notepad++.exe" (on 64-bit)
"C:\Program Files\Notepad++\notepad++.exe" (on 32-bit)

I've tried with and without quotes, but in all cases Notepad comes up. I also tried exiting and restarting TC with no effect.

Thanks,
Danny
 
Hello Danny,

I just tried this on mine and it respects my "EDITOR" INI directive (which
is VIM). Set this to notepad++ and it should work I believe.

Michael


On Mon, Apr 5, 2010 at 1:22 PM, Danny <> wrote:


> I can't seem to make the 'e' key in the LIST window do anything other than
> launch notepad. I am looking at a java file and would like to use Notepad++
> instead of notepad. I have tried this on two different systems:
>
> On Windows 2008 64-bit installation:
> TCC 11.00.44 x64 Windows 2008 [Version 6.0.6002]
>
> On this system both assoc and ftype show nothing defined for .java or
> javafile. Explorer doesn't know what to do with a java file if I double
> click on it, which is as expected.
>
> On Windows XP 32-bit SP3:
> TCC 11.00.40 Windows XP [Version 5.1.2600]
>
> On this system, assoc shows .java=javafile, but ftype doesn't list anything
> for javafile. If I look at JAVA in the "File Types" tab under Folder Options
> in Explorer, it has JAVA File associated with SlickEdit. If I double click a
> java file in Explorer, vslick comes up on this system.
>
> In both cases, no matter what I try, if I type 'e' when I am in LIST view
> for a java file, Notepad is opened. I tried setting the Editor on the
> Windows tab of the option command to:
>
> "C:\Program Files (x86)\Notepad++\notepad++.exe" (on 64-bit)
> "C:\Program Files\Notepad++\notepad++.exe" (on 32-bit)
>
> I've tried with and without quotes, but in all cases Notepad comes up. I
> also tried exiting and restarting TC with no effect.
>
> Thanks,
> Danny
>
>
>
 
I used the dialog that comes up when you use the OPTION command. This appears to be setting the EDITOR directive in:
c:\users\Administrator\AppData\Local\TCMD.INI on my 64-bit system
and
c:\Documents and Settings\Adiminstrator\Local Settings\TCMD.INI on 32-bit

This setting is not having any affect as to which program gets used for the 'e' key in the list view.

Danny


Hello Danny,

I just tried this on mine and it respects my "EDITOR" INI directive (which
is VIM). Set this to notepad++ and it should work I believe.

Michael


On Mon, Apr 5, 2010 at 1:22 PM, Danny <> wrote:
 
| I used the dialog that comes up when you use the OPTION command.
| This appears to be setting the EDITOR directive in:
| c:\users\Administrator\AppData\Local\TCMD.INI on my 64-bit system
| and
| c:\Documents and Settings\Adiminstrator\Local Settings\TCMD.INI
|
| This setting is not having any affect as to which program gets used
| for the 'e' key in the list view.

Please verify using "echo %_ininame" that the files apparently modified are
the ones actually used to initialize TCC.
--
Steve
 
I can't seem to make the 'e' key in the LIST window do anything other than launch notepad. I am looking at a java file and would like to use Notepad++ instead of notepad. I have tried this on two different systems:

I can reproduce this. It seems that TCC doesn't like pathnames in the Editor specification. If you use just the filename, and it's findable via the search path or AppPaths, it works as expected. Ditto if you alias the executable name to a fully qualified filename. You might try changing the Editor string in the OPTION dialog to just "notepad++.exe" (without the quotes) and creating an alias:

Code:
alias notepad++.exe="C:\Program Files\Notepad++\notepad++.exe"
You could also e.g. delete the editor string altogether, and just

Code:
alias notepad.exe="C:\Program Files\Notepad++\notepad++.exe"
 
Interesting. That does not seem to be the case here. Here is my EDITOR
option:

C:\>echo %@option[EDITOR]
c:\apps\vim\gvim.exe -p -u C:\Users\Michael\ConfigFiles\vim\_vimrc

I'm running 11.00.44 x64

Michael


On Mon, Apr 5, 2010 at 4:12 PM, Charles Dye <> wrote:


> Quote:
> Originally Posted by *Danny* [image: View Post]<http://showthread.php?p=9366#post9366>
> I can't seem to make the 'e' key in the LIST window do anything other than
> launch notepad. I am looking at a java file and would like to use Notepad++
> instead of notepad. I have tried this on two different systems:
> I can reproduce this. It seems that TCC doesn't like pathnames in the
> Editor specification. If you use just the filename, and it's findable via
> the search path or AppPaths, it works as expected. Ditto if you alias the
> executable name to a fully qualified filename. You might try changing the
> Editor string in the OPTION dialog to just "notepad++.exe" (without the
> quotes) and creating an alias:
>
> Code:
>
> alias notepad++.exe="C:\Program Files\Notepad++\notepad++.exe"
>
> You could also e.g. delete the editor string altogether, and just
>
> Code:
>
> alias notepad.exe="C:\Program Files\Notepad++\notepad++.exe"
>
>
>
 
I can reproduce this. It seems that TCC doesn't like pathnames in the Editor specification...

It works okay for me, though I have quotes surrounding the filename:

> echo %@option[editor]
"C:\Program Files\TextPad 4\TextPad.exe"
 
> I can't seem to make the 'e' key in the LIST window do anything other
> than launch notepad. I am looking at a java file and would like to use
> Notepad++ instead of notepad.

The EditorName directive is only used if Windows does not have an existing
"edit" verb assigned for that file type. LIST is first going to try a
ShellExecute "edit" with the specified filename. If that fails, LIST looks
for EditorName.

So if you want to use Notepad++ for your java files, either change the
Windows "edit" association for java, or remove it so LIST can use the
specified editor.

Rex Conn
JP Software
 
On Mon, 05 Apr 2010 18:57:07 -0400, frossm <> wrote:

|Interesting. That does not seem to be the case here. Here is my EDITOR
|option:
|
|C:\>echo %@option[EDITOR]
|c:\apps\vim\gvim.exe -p -u C:\Users\Michael\ConfigFiles\vim\_vimrc

That's good that it honors command line options. So (see dcantor's post) it
makes a lot of sense that a path\exename with spaces needs to be quoted.
--
- Vince
 
On Sat, 10 Apr 2010 04:06:26 -0400, w_krieger <> wrote:

|I suppose that something like ^E could be added to open in a preferred editor.

A question for Rex: While in LIST, does TCC send keystrokes to plugin keystroke
handlers?
--
- Vince
 
The EditorName directive is only used if Windows does not have an existing
"edit" verb assigned for that file type. LIST is first going to try a
ShellExecute "edit" with the specified filename. If that fails, LIST looks
for EditorName.

I have EditPlus.exe as my default text-editing app. I also have it (with fully qualified path) in the OPTION dialog. But TCC is always launching Notepad when 'e' is pressed when LIST is used.

Is there some way to disable this option entirely?
 
> ---Quote (Originally by rconn)---
> The EditorName directive is only used if Windows does not have an
> existing "edit" verb assigned for that file type. LIST is first
> going to try a ShellExecute "edit" with the specified filename.
> If that fails, LIST looks for EditorName.
> ---End Quote---
> I have EditPlus.exe as my default text-editing app. I also have it
> (with fully qualified path) in the OPTION dialog. But TCC is always
> launching Notepad when 'e' is pressed when LIST is used.
>
> Is there some way to disable this option entirely?

Either change your file associations to point to EditPlus, or remove the
existing associations so that LIST will use the value in EditorName.

Rex Conn
JP Software
 
Either change your file associations to point to EditPlus, or remove the
existing associations so that LIST will use the value in EditorName

Ok, I was wrong about this -- I didn't have my .txt file assocation pointing to EditPlus. When I changed that the 'e' key did what I expected it to do. The associated app for .csv files is Excel, but when I press 'e' in LIST as I view a .csv file, Notepad launches, rather than Excel. I found it curious, but not a deal-breaker. :)
.
 
I had this working with version 11. I upgraded to version 12 and something in the migration of the configuration parameters and the ini file has made it stop working. Here's what I have:

echo %@option[editor]
"C:\Program Files (x86)\Notepad++\notepad++.exe"

Typing 'e' while LISTing a .java file still launches regular notepad. I checked the association, and it originally appeared to be unassigned:

assoc .java
.java=

I used Windows Explorer to always open .java files with Notepad++. Now:

assoc .java
.java=java_auto_file

If I type a java file name on the command line and hit enter, it is opened in Notepad++. If I type the 'e' key inside List, it still launches regular notepad.

Any suggestions?

Danny
 
LIST will first look for an "edit" associated with the extension. If there isn't one in the registry, LIST will use the Editor value in TCMD.INI.

In TCMD.INI:
Editor="C:\Program Files (x86)\Notepad++\notepad++.exe"

C:\> assoc .java
.java=java_auto_file

C:\> ftype java_auto_file
java_auto_file="C:\Program Files (x86)\Notepad++\notepad++.exe" "%1"

C:\> list test.java


While in list, I press the 'e' key and Notepad opens.

What do I need to change to make this open Notepad++?

Danny
 
In TCMD.INI:
Editor="C:\Program Files (x86)\Notepad++\notepad++.exe"

C:\> assoc .java
.java=java_auto_file

C:\> ftype java_auto_file
java_auto_file="C:\Program Files (x86)\Notepad++\notepad++.exe" "%1"

C:\> list test.java


While in list, I press the 'e' key and Notepad opens.

What do I need to change to make this open Notepad++?

Danny

After rereading your response and looking at the right mouse button menu options in Explorer one more time, I understand I need to set the 'edit' command for the file type or extension. How do you set that without going into regedit?

Danny
 
On Thu, 21 Apr 2011 09:22:32 -0400, Danny <> wrote:

|After rereading your response and looking at the right mouse button menu options in Explorer one more time, I understand I need to set the 'edit' command for the file type or extension. How do you set that without going into regedit?

In an Explorer window ... Tools ... Folder Options ... File Types ...
 
In an Explorer window ... Tools ... Folder Options ... File Types ...

That doesn't appear to work for Windows 7 -- there is not a "File Types" option under Explorer->Tools->Folder Options.

I can find Control Panel->Programs->Default Programs->Set Associations, which is how I set the file type and association I showed above with the assoc and ftype commands. However, I believe this sets the 'Open' command not the 'Edit' command that Rex mentioned.

In Explorer if I right mouse on a .java file, I see both Open and Edit in the context menu. Open launches Notepad++ as expected. Edit launches regular notepad. Based on Rex's response I think this is the command that 'e' in list is invoking. How do I set the 'Edit' command for a file type without resorting to regedit?

In regedit, I can find my notepad++ setting under the following keys:
HKEY_CLASSES_ROOT\java_auto_file\shell\open\command
HKEY_CURRENT_USER\Software\Classes\java_auto_file\shell\open\command
HKEY_USERS\S-1-5-21-1401048745-1924985351-1576591933-1000\Software\Classes\java_auto_file\shell\open\command
HKEY_USERS\S-1-5-21-1401048745-1924985351-1576591933-1000_Classes\java_auto_file\shell\open\command


Does this mean I need to use regedit to define a shell\edit\command in each of these places as well? Surely there must be an easier way to make List open the file in the program I want for editing.

Danny
 

Thanks for these pointere, but I really don't want to download and install another utility. If the 'e' key in list uses an association that can only be set by installing another utility or using regedit, then I consider it broken (at least for my desired use case). I see several ways for this to be fixed in TCC:

  1. Change the 'e' function to use the 'open' association instead of the 'edit' association.
  2. Change the 'e' function to use 'edit' if defined. If not, then use 'open' if defined. If not then the default behavior.
  3. Add a check box to configure 'e' to use either 'open' or 'edit'
  4. Provide another configuration parameter and another key in list so that both 'open' and 'edit' can be used. Unfortunately, 'o' is already used to open a new file, so the most obvious key is taken.
 
but I really don't want to download and install another utility.
Why not?

Of course, this is really Microsoft's fault, since they removed it from the user interface in Vista.

Maybe Rex could add an option to FTYPE to modify actions other than open.
 
Back
Top
[FOX] Ultimate Translator
Translate