久久国产成人av_抖音国产毛片_a片网站免费观看_A片无码播放手机在线观看,色五月在线观看,亚洲精品m在线观看,女人自慰的免费网址,悠悠在线观看精品视频,一级日本片免费的,亚洲精品久,国产精品成人久久久久久久

分享

Adding Code Formatting Tools in Notepad | T...

 newencn 2013-03-28

Adding Code Formatting Tools in Notepad++

I am a big fan of beautiful code, not only in terms of quality of programming but also formatting the code nicely so that it is easy on eyes.

If you are using a full-blown IDE, they come with their own formatting facility, but if you are using a multipurpose editor such as Notepad++, then you may have to use a plugin to format your code. There are many 3rd party programs that can be used with Notepad++ that will help you format your source code without going through a lot of effort.

I use different tools for different languages. I use PerlTidy for formatting my Perl code, and AStyle for certain other languages. Here are the steps taken to add AStyle to Notepad++. Please check the AStyle website for further information on AStyle and its options.

First you need to make sure you have NppExec plugin added to your Notepad++ by going to Plugin menu.

NppExec Menu

NppExec Menu

Download AStyle. The zip archive includes all the source and an  executable. You can simple copy the executable to a suitable location (For this demo, I am copying it to H:\tools\AStyle.exe. Or you can recompile from the source.

Go to NppExec under Plugin menu and click on Execute or hit F6. You will get the Execute dialogue box.

Execute Dialogue Box

Execute Dialogue Box

Select ” from the dropdown box if it is not already selected.

Type in the following commands in the window:

h:\tools\AStyle --style=allman "$(FULL_CURRENT_PATH)"
npp_open $(FULL_CURRENT_PATH)

The first line, formats the code and saves the file. The view doesn’t get refreshed, so we need to reload the file from disk, and npp_open does that in the above. Note that I am using AStyle with –style=allman flag which uses broken brackets.

Hit the save button and it will ask you for a name, just type an appropriate name and hit OK to run.

Execute AStyle

Execute AStyle

You could stop right there and every time you need to run the command, just go to Plugins -> NppExec -> Execute… But let’s go one step further.

Under Plugins, go to NppExec and click on Advanced Options.

NppExec Advanced Options

NppExec Advanced Options

Select “Run AStyle” from the Associated Script drop down menu and then hit the “Add/Modify” button. Make sure the “Place to the Macros Submenu” is ticked.

This will add a new option in Macro Menu.

 

Notepad++ Macro Menu

That is it. Hope you have found this short tutorial useful.

    本站是提供個(gè)人知識(shí)管理的網(wǎng)絡(luò)存儲(chǔ)空間,,所有內(nèi)容均由用戶(hù)發(fā)布,,不代表本站觀(guān)點(diǎn)。請(qǐng)注意甄別內(nèi)容中的聯(lián)系方式,、誘導(dǎo)購(gòu)買(mǎi)等信息,謹(jǐn)防詐騙,。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,,請(qǐng)點(diǎn)擊一鍵舉報(bào)。
    轉(zhuǎn)藏 分享 獻(xiàn)花(0

    0條評(píng)論

    發(fā)表

    請(qǐng)遵守用戶(hù) 評(píng)論公約

    類(lèi)似文章 更多