Skip to main content

Posts

Showing posts with the label NotepadPlusPlus

Batch convert file line ending from Windows to Linux using Notepad++

Batch convert file line ending from Windows to Linux using Notepad++ Working on cross-platform project means you have to be careful with file line endings. If for some reason the files were not using the correct line endings Notepad++ can be used to do batch conversion of the files. To do so, open Find in Files (Ctrl+Shift+F) and use the following options: Find what: (\r\n) Replace with : \n Filters : *.* Directory : C:\Temp Search Mode: (o) Regular expression

Remove blank lines using Notepad++

Say you have a document as shown below. And you want to remove the blank lines - represented by {CR}{LF}. To do this using Notepad++, bring up Replace dialog ( Search | Replace...  or CTRL+H ) and use ^\r\n in Find What  and blank for Replace . In Search Mode, change it to Regular Expression . See below for an example. What it does it use regular expression to search for carriage return and linefeed characters and match only if it is the beginning of the line (^). And of course replace it with a blank character.

Split a line into multiple lines using Notepad++

Say you have a document like below. And you want to split "hello world" into multiple lines. Doing this using Notepad++ is easy. Bring up Replace dialog ( Search | Replace... or CTRL+H ), in  Find what use hello world\r\n . This matches the entire line including carriage return and linefeed character. In Replace with replace the string with the intended multi-line data, for example, hello\r\n\world\r\n , will replace the line into two. One is hello , followed by world in the next line. And of course, for this to work you need to select Regular expression in the Search Mode .

Load langs.xml failed! in Notepad++

I got Notepad++ 5.7 installed in Windows 7 Professional, used to work nicely but lately I am getting the following error: Load langs.xml failed! One reason could be that lang.xml got corrupted. This is not unexpected as Windows 7 I am using tends to hang-up and I need to force a hard reboot. One way to fix this is to: 1) Navigate to C:\Program Files\Notepad++. 2) Rename lang.xml to lang.xml.1. 3) Copy lang.model.xml to lang.xml Enjoy! References: http://superuser.com/questions/67128/notepad-load-langs-xml-failed ~ts