Automating GNUStep from Notepad++

会有一股神秘感。 提交于 2019-12-05 16:03:19

The npp-plugins gives you most of what you are looking for. Install the plugin and:

  • Press F6 to open the NppExec Execute window
  • Type 'make' (you may also want to cd to the proper directory first) and click OK
  • Output from make is shown in the notepad++ console

Another cool feature is that it will save the command if you restart notepad++, so you only need to type 'make' a single time.

You may need to make some tweaks to only show compiler errors, however.

I have done it, with considerable help from my friends.

  1. Create a Bash script called 'nppmake'. I saved it in c:\GNUStep. The file should contain the following:

    #! /bin/bash

    cd $1 make

  2. Create a DOS batch file called 'nppmake.bat', which again I saved in c:\GNUStep. This file contains the following:

    sh --login -i C:\GNUstep\nppmake %1

  3. In N++, go to 'Plugins > NppExec > Execute' and type in the following:

    C:\GNUstep\nppmake.bat $(CURRENT_DIRECTORY)

  4. Hit 'Save' and call the script 'make'.

  5. In 'Plugins > NppExec > Advanced Options...', create a menu item, which I called 'Build' and associate it to the script called 'make' (I'm a Visual Studio developer, so 'build' feels more natural to me). Make sure 'Place to the Macros submenu' is checked.
  6. You may need to restart N++ at this point, but then all that is left to do is add the keyboard shortcut. Go to 'Settings > Shortcut Mapper > Plugin Commands' and find 'Build'. I assigned 'Ctrl-Shift-B', is it is the same as VS.

You're done. Now open up a file in a Objective-C project, that has a GNUmakefile, and hit 'Ctrl-Shift-B'. The NppExec window reports any errors, or hopefully a successful build!

Just a small correction to kim3er's answer.

cd $1 make

should be

cd $1 
make
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!