While looking through some Cisco configs recently a colleague mentioned that Notepad++ was really helpful in viewing configs, I agreed as it’s handy doing a search across 5 different config files to find where a device is connected. However what he pointed out was that Notepad++ could do more than that using “User-Defined Language”…
Notepad++ supports a wide range of programming languages which is what makes it so popular. However it’s also possible to define your own ‘language’ to make life easier for yourself. At first I tried to see if anyone else had done for Cisco and they had, here’s the ones I found:
These are useful but didn’t give me what I wanted as everyone has their own ideas about what they want to see. However it turns out it’s easy to define your own!
1. Firstly open on the config file you want to review
2. Go to ‘View’ – ‘User-Defined Dialogue..” and “Dock2 the screen that pops up (see notepad++ site for more info) & make sure you have ‘Language’ set to ‘User-Defined’
3.Decide if you want to ‘group’ any information. This will let you ‘fold’ lines of info to make it easier to read. I did this for ‘interface’. This goes into “Folder & Default” on the User-Defined Language tab. Now I can collapse/expand interfaces for easy reading
3. Decide what the key pieces of info you want to highlight. For me this was ‘interface’, ‘description’, ’speed’, ‘duplex’ and a few others. There’s four separate groups of keywords that you can highlight differently so group them the way it makes sense to you, and decide what formatting you want for each group. You are provided with a live view of the formatting you apply so you adapt it to suit what you want.
There’s also options for Comments, Numbers & Operators but I’ve not made use of them
4. Make sure you save, I’ve saved mine as a new User-Defined language called ‘cisco’.
5. Now when you open a new config file you can go to Language and select your newly defined ‘Language’
I’ve quickly passed over details on how to use ‘User-Defined Languages’ principally because there’s plenty of other resources out their, start with the Notepad++ site and you should find what you need. However, User-Defined Languages open up a lot possibilities…
Filed under: network stuff, useful stuff , cisco, notepad++, technology, xml

