Posts Tagged ‘Notepad++’

Creating text snippet macros with Notepad++

notepadNotepad++ is one of my favorite applications, it is lightweight, flexible, and has all the tools I need to do my job. One of the great options it offers is a built in macro recorded, which among other things, allows you to create easily insertable text snippets into your files. Let’s take a look at how to insert an HTML comment (“<!–   –>”) with the push of a key combination.

First of all, open notepad and click the record button, which can be found toward the end of the toolbar, a big red circle. Once you clicked it, the app will start recording, so it’s time to type what you need, in our case: “<!– –>” (without the quotes). Once done, press the save button, which is the right most icon in that group and give it a title (eg. HTML Comment) and add a keyboard shortcut, in my case this was ctr + shift + c. Once saved you can press that combination any time to paste an HTML comment.

There are two things to watch out for when recording. First of all, don’t copy paste, since the copy paste action will be recorded, not the actual clipboard contents, so next time you invoke the action, the actual clipboard will be pasted. Secondly, your actions are all recorded, so pressing the arrow, or backspace and so on. This way you can record the same comment by pressing back 4 times after you typed it, and saving like that. This will place your cursor between the two dashes, which is where you will write your comment, saving your the time of pressing back every time you insert a comment.

This allows for a lot a fancy macros, but for now you can create simple text snippets. I’ll be covering a lot more advanced macros a bit later though.

Top 10 must-have apps after a Windows install

xamppI’m getting a new laptop today, and one of the first things I’ll do is format the hard drive, get rid of all the preinstalled stuff, and start with a new copy of Windows. I have a few pieces of software I always install right from the start, and I thought I’d share this list with you, so here goes (in no particular order and excluding Firefox, which should be obvious).

Notepad++

I’ve mentioned this here on Hack Your Day, and also on Scriptastique, the web development blog, Notepad++ is simply the best notepad replacement/programming tool out there. It features very powerful search and replace (especially coupled with macro capability), syntax highlighting and customizable syntax highlighting, built in ftp, and the list goes on and on. It’s a very simple, but highly effective application, a must have for me after install on day 1.

Unlocker

When doing a lot of work, I bet you’ve seen the message “can not delete folder: it is being used by another person or program”. You close every app, close every service and still no. Well, Unlocker is the solution, it adds an entry into the right click context menu, and if you click on it for any item you can see the services using it. You can “unlock” it from these services at any time, so you will eb able to delete all the files and folders you want.

Launchy

launchyI usually start all my applications by pressing around 4 buttons, and all this is enabled by Launchy. Press Alt-Space to bring up a stylish window, start typing the name of the app you need, and after a few keystrokes it will pop up, press enter and there you have it. It actually learns too, so for me starting firefox is now Alt-Space then F then enter. That’s pretty fast. Once quick tip, once you’ve installed, go to the settings, add you program files folder to the catalog and add “.ink” and “.exe” extensions to it. This way you will get all the applications in your program files folder.

Ps Hot Launch VVL

If you take a look at the PS Hot Launch website you might be deterred, to me it looks a bit like those no-good “freeware” sites, but this applications is absolutely great. It allows you to bind the opening of applications and folders to a global hotkey. Simply add a folder or a file, add a hotkey, and from then on, you can open it really quickly. This is handy when I’m doing some website work on my Xampp installation, where a typical directory for a website would be “C:\xampp\htdocs\website”. An added benefit is that the you can create these shortcuts in a start menu like structure, and right clicking the tray icon will show it to you.

Windows XP powertoys

This only applies to XP users, but the Powertoys are great and lightweight solutions for some every day problems. If you navigate to the site you’ll see quite a lot, and they’re all very useful. I always download TweakUI, which allows for a lot of tweaking in Windows, but the reason I need it is that it allows me to change the default folders on the left in the save dialogs. I usually keep desktop and my documents in there, but for the last three I use the website folders I’m currently working on. The image resizer is also very useful for quick right-click image resizing of one, or a batch of files. I’ve also tried SyncToy which was surprisingly good, syncing two folders, according to several customizable conditions.

Xampp

Ok, this is pretty specific, since Xampp is a sort of internet for yourself. It is basically an apache server, with PHP, MySQL, and loads of other stuff, things you would typically find on your webserver. It enables you to develop websites (with server side code) without the actual internet, your own PC will be like a server. You can even install Wordpress like you would online, but instead of FTP, or cPanel you have the same files and folders in explorer. Pretty handy if you want a private Wordpress blog, or if you’re doing some website work.

Billy

Listening to music is a must for me, but I actually don’t need any power tools for this. I have maybe 30 albums, of which I listen to about 8 Enigma albums and that’s it, since when I work this type of music is the only one that lets me concentrate. Anyway, all I need is a simple music player which can play MP3-s and that’s it. Billy is a new addition to my must install list, I worte a quick reveiw about it on gHacks not long ago, check out the link for the review and the player’s site. It takes up less than 5,000K of my memory and while being as simpel as foobar it offers some neat tools to manage your music. If you’re looking for Media Monkey, or Windows Medial Player like power organization, you will not like Billy.

Meebo Notifier

meeboThis again, is a new addition since it just came out, but I’ve been using it ever since. In short, Meebo would have been my IM of choice, but I needed to keep a browser tab open all the time to be logged in. With Meebo Notifier in my taskbar, I don’t have to go to the site to log in, or to stay logged in. The notifier will log in for me, and if I get a message or if someone goes online I can simply click the icon to open up Meebo in a tab. Extremely handy, and it is the single app that made me switch to the otherwise much-easier-than-anything-else Meebo.

TugZip

For all my file extraction and compression needs I use an app called TugZip. As far as I know it, is built around the popular 7-zip, and offers all the functionality I will ever need. I don’t think I’ve ever actually opened this application, I just use the right-click context menu options. You know, I don’t even know the features, it supports all the compression formats I’ve ever needed and hasn’t been any trouble yet, so there was no need to look into it. Set and forget.

Windows Styles

I used to use some apps to modify my desktop, but I soon learned that all the power (well some of the power) offered by tools like Stardock products are readily available in Windows. You completely change your theme in XP (including the startbutton and all, not just colors, using Windows styles, which have the “.msstyle” extension. It is a pain to get them to work because you need to patch a system file to use unsigned themes, and you also need to have the correct file structure, but read this guide for patching uxtheme.dll, and this guide on msstyles and you should be fine. I use the Areao4.2 theme, but you might also like to check out Thallos, Neo Geni X.  Using styles without an external program is great because it enables you to get the same look, without the resources.

Paste frequent text with short cuts in Notepad++

I’ve been ranting on and on about how I love Notepad++, and recently I’ve started looking ore and more at, let me share a cool feature I found which lets you create keyboard shortcuts for pasting anything really. This helps my productivity to no end, especially when writing html or css code.

I use comments a lot when first creating a design so I know where I am later on too. Creating a comment in html means you have to write the following code <!-- Comment Here -->. This can get a bit tedious, especially at the beginning, when I add a comment below all my div containers, and also at their closing tag. For this reason I created a macro to paste comment tags quickly.

In Notepad++, just go to the macro menu and choose start recording. Tye the desired text anywhere on screen, in my example I wrote <!-- -->, and then go to the macro menu again, and click stop recording. You will need to go to the menu again and click “save currently recorded macro”. You can now set the key combination for it, I use a combination of the control and shift key, plus a letter usually.

Using Notepad++ to edit online files

notepad++While I was updating the look of my blog I found Notepad++, a Windows notepad replacement one of the most useful tools ever. It gives you syntax highlighting for many programming languages, advanced search and replacement features, line collapsing, ftp down and uploading and so on, but if you just need a simple text editor it’s great as well.

I used it to be able to modify my blog template and php files without the need to upload then after each save. Another feature I found very helpful was automatic line collapsing. This means that it knows where a <div> element begins and ends for example (it also handles many other block elements), enabling me to just collapse lines I don’t need.

Using it to edit online files is also very simple. You need to configure the ftp client, but if you have your server details this should be a cinch. Once you have configured the client, you can connect to the server and access the files. They will be opened inside Notepad++ in a new tab and you can edit the contents. When you save the document it will be uploaded automatically, so you can see the changes immediately online.

First of all, find the icon (fifth from the right) which is labeled “show ftp folders”. Next, click the “open settings dialog” in the sidebar that just opened. You may also want to click the newly opened bottom window as well, this is for server messages and is only needed if you are an ftp whiz or if something goes wrong. So in the settings dialog, click new (at the bottom), type in a name and click rename. Edit the server details as needed, press ok, and you are ready to connect.

Just navigat through the folders as you would do normally, you can even perform folder actions. Double click on an item to open it, and when you save it, it will be uploaded automatically. Your productivity will increase by a lot using this app, no more downloading, renaming, renaming and other types of misery.