使用记事本++执行命令 [英] Execute commands with notepad++

查看:15
本文介绍了使用记事本++执行命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

How can I specify the actual file to process using the Run command in Notepad++. I want for example run pdflatex using the actualfile as input, or the cs compiler, etc. Using the entire path isn't practical, it must works with any actual file.

解决方案

You can automatically add the current file using a variable in the execution string:

C:	emp	est.exe "$(FULL_CURRENT_PATH)" 

The list of available variables is documented here. Examples:

  • FULL_CURRENT_PATH = E:My Webmainwelcome.html
  • CURRENT_DIRECTORY = E:My Webmain
  • FILE_NAME = welcome.html
  • NAME_PART = welcome
  • EXT_PART = html
  • SYS.<var> e.g.: SYS.PATH = %PATH%
  • CURRENT_WORD = <selection or word under cursor>
  • CURRENT_LINE = <line number>
  • CURRENT_COLUMN = <column number>
  • NPP_DIRECTORY = c:Program Files otepad++
  • NPP_FULL_FILE_PATH = c:Program Files otepad++ otepad++.exe

You can also see the source code at RunDlg.cpp line 77 and line 26

这篇关于使用记事本++执行命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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