如何使Notepad ++像cmd中的常规记事本一样起作用? [英] How to make notepad++ function like regular notepad in cmd?

查看:134
本文介绍了如何使Notepad ++像cmd中的常规记事本一样起作用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我喜欢使用命令提示符来编写和编译Java。
要编写代码,请在cmd中输入以下内容:

I like using the command prompt to write and compile java. To write the code I enter this in cmd:

记事本MyJavaClass.java

notepad MyJavaClass.java

这将打开记事本,询问我是否要创建新文件(如果尚不存在)。
对我来说,问题是我喜欢使用notepad ++作为文本编辑器,因为它具有不错的功能。

This opens notepad and asks if I want to create new file (If it doesn't already exist). The problem for me is that I like using notepad++ as a text editor because it has nice features.

所以我的问题是:

如何做到这一点,以便可以在cmd中键入 notepad ++ MyJavaClass.java并打开notepad ++,可以进行编辑而不必键入notepad ++的完整路径?

我试图将notepad ++。exe文件简单地放在System32文件夹中,但cmd
无法识别该命令。

I tried to simply place the notepad++.exe file in the System32 folder, but cmd doesn't recognize the command.

很抱歉:)

推荐答案

在您的<$ c中添加记事本++ $ c>路径

在Windows中(使用GUI):

在开始菜单中,右键单击计算机,在左侧区域中选择高级系统设置,然后在弹出的窗口底部选择环境变量。

From the Start Menu, right-click Computer, select Advanced system settings in the left area, then select Environment Variables at the bottom in the window that pops up.

转到PATH用户变量,然后单击编辑,然后将您的路径添加到notepad ++的末尾。
例如:

Go to the PATH user variable and click edit, and append YOUR path to notepad++ to the end. For example:

C:\Program Files(x86)\Notepad ++;

别忘了分号!

在Windows中(使用以管理员身份运行的命令行)

仅在命令行会话期间设置:

To set only for the duration of command line session:

set PATH =%PATH% ; C:\程序文件(x86)\ Notepad ++;

要永久设置,请使用与上面相同的命令,但替换 set setx

To permanently set, use the same command as above but replace set with setx:

请注意,并非所有Windows发行版都附带使用setx,并且可以在此处进行手动安装。

Note that not all Windows distributions come with setx, and can be manually installed here.

这篇关于如何使Notepad ++像cmd中的常规记事本一样起作用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆