{"id":310,"date":"2013-11-14T00:19:44","date_gmt":"2013-11-14T05:19:44","guid":{"rendered":"http:\/\/homepages.uc.edu\/~yaozo\/wordpress\/?p=310"},"modified":"2013-11-14T00:19:44","modified_gmt":"2013-11-14T05:19:44","slug":"tricks-with-notepad","status":"publish","type":"post","link":"https:\/\/zhuoyao.net\/index.php\/2013\/11\/14\/tricks-with-notepad\/","title":{"rendered":"Tricks with Notepad++"},"content":{"rendered":"<p>Notepad++ is an amazing text editor which not just gives you option to edit and save your text files, but also gives lot many features which can help you in doing magic.<\/p>\n<p>Few of the useful options available are listed below. Experiment yourself and unveil the power of Notepad++<\/p>\n<p>&nbsp;<\/p>\n<h3>Remove all whitespace char\u2019s<\/h3>\n<p>Select all the text you want to remove the white space chars and click \u2018Cntrl+H\u2019, type space in the find field and leave the Replace field blank. Click \u2018Replace all\u2019 to remove all the spaces in the text file.<\/p>\n<p><a title=\"Replace Whitespace\" href=\"http:\/\/img.a4apphack.com\/nplus-replacewhitespace.gif\" rel=\"lightbox[251]\"><img loading=\"lazy\" decoding=\"async\" title=\"Replace Whitespace\" alt=\"Replace Whitespace\" src=\"http:\/\/img.a4apphack.com\/nplus-replacewhitespace.gif\" width=\"600\" height=\"409\" \/><\/a><\/p>\n<p>Replace Whitespace<\/p>\n<h3>Delete the first word\/space\/line no\u2019s<\/h3>\n<p><code>TextFX &gt; TextFX Tools &gt; Delete Line Numbers or First word<\/code><\/p>\n<p><a title=\"Remove Line Numbers\" href=\"http:\/\/img.a4apphack.com\/nplus-removelinenumbers.gif\" rel=\"lightbox[251]\"><img loading=\"lazy\" decoding=\"async\" title=\"Remove Line Numbers\" alt=\"Remove Line Numbers\" src=\"http:\/\/img.a4apphack.com\/nplus-removelinenumbers.gif\" width=\"600\" height=\"409\" \/><\/a><\/p>\n<p>Remove Line Numbers<\/p>\n<h3>Remove the trailing spaces<\/h3>\n<p><code>TextFX &gt; TextFX Edit &gt; Trim Trailing Spaces<\/code><\/p>\n<h3>Remove Blank Lines<\/h3>\n<p><code>TextFX &gt; TextFX Edit &gt; Delete Blank Lines<br \/>\nTextFX &gt; TextFX Edit &gt; Delete Surplus Blank Lines<\/code><\/p>\n<p><a title=\"Remove Blanks\" href=\"http:\/\/img.a4apphack.com\/nplus-removeblanks.gif\" rel=\"lightbox[251]\"><img loading=\"lazy\" decoding=\"async\" title=\"Remove Blanks\" alt=\"Remove Blanks\" src=\"http:\/\/img.a4apphack.com\/nplus-removeblanks.gif\" width=\"600\" height=\"345\" \/><\/a><\/p>\n<p>Remove Blanks<\/p>\n<h3>Change Case of Selected Text<\/h3>\n<p><code>TextFX &gt; TextFX Characters<\/code>, the following options are available<\/p>\n<ul>\n<li>UPPER CASE<\/li>\n<li>lower case<\/li>\n<li>Proper Case<\/li>\n<li>Sentense case.<\/li>\n<li>iNVERT cASE<\/li>\n<\/ul>\n<h3>Insert\/Append Words in all the Lines<\/h3>\n<h4>Prefix\/Suffix Present<\/h4>\n<p>Consider an example that all the lines start with a prefix file_ (like file_my1.txt, file_my2.txt etc), the click \u2018Cntrl+H\u2019 and search for file_ and replace with new_prefix. This will result in a leading space character in all the lines, follow this section to remove that.<\/p>\n<h4>Prefix\/Suffix not Present<\/h4>\n<p>Enter the prefix you want to add,say new_prefix, in the first row\/column. Click \u2018Cntrl\u2019 and drag the small black rectangular box to the number of lines you want to add the prefix to (i.e if there are 10 lines drag till the 10th row). Copy the text from the text file and paste it in the second column. Now copy first and second rows and paste it back in the notepad++. If you find and space between the prefix and the previous text then follow this section to remove that.<\/p>\n<h3>Move Lines Up\/Down<\/h3>\n<p>Select the line and click Cntrl+Shift+Up \/ Cntrl+Shift+Down for moving the line up\/down respectively.<\/p>\n<p><a title=\"Move Lines\" href=\"http:\/\/img.a4apphack.com\/nplus-movelinenumbers.gif\" rel=\"lightbox[251]\"><img loading=\"lazy\" decoding=\"async\" title=\"Move Lines\" alt=\"Move Lines\" src=\"http:\/\/img.a4apphack.com\/nplus-movelinenumbers.gif\" width=\"600\" height=\"251\" \/><\/a><\/p>\n<p>Move Lines<\/p>\n<p><strong>Update<\/strong>:\u00a0(Check the\u00a0<a title=\"Remove New Line Chars\" href=\"http:\/\/a4apphack.com\/index.php\/featured\/tricks-with-notepad#comment-36302248\">comment<\/a>)<\/p>\n<h3>To remove the \u2018Newline\u2019 characters<\/h3>\n<p>1. Click on the \u2018Show All Characters\u2019 Button in Notepad++ toolbar (Or View Menu \u2013 Show Symbol \u2013 Show All Chars)<\/p>\n<div><a title=\"Show All Characters\" href=\"http:\/\/img.a4apphack.com\/nplus-removenewlinechar.jpg\" rel=\"lightbox[251]\"><img loading=\"lazy\" decoding=\"async\" title=\"Show All Characters\" alt=\"Show All Characters\" src=\"http:\/\/img.a4apphack.com\/nplus-removenewlinechar.jpg\" width=\"600\" height=\"264\" \/><\/a>Show All Characters<\/div>\n<p>2. Open the Replace Dialog box (Cntrl+H)<\/p>\n<div><a title=\"Replace Newline\" href=\"http:\/\/img.a4apphack.com\/nplus-removenewlinereplace.jpg\" rel=\"lightbox[251]\"><img loading=\"lazy\" decoding=\"async\" title=\"Replace Newline\" alt=\"Replace Newline\" src=\"http:\/\/img.a4apphack.com\/nplus-removenewlinereplace.jpg\" width=\"482\" height=\"320\" \/><\/a>Replace Newline<\/div>\n<p>3. Select the \u2018Extended Search Mode\u2019<\/p>\n<p>4. Search for \u2018\\n\u2019 and enter nothing in the \u2018Replace with\u2019 field (Make sure that no spaces are entered there)<\/p>\n<p>5. Search for \u2018\\r\u2019 and repeat the above step<\/p>\n<p>Info: Here, we are removing the Carriage Return and Line Feed characters which make any text editor identify and render the new lines. The position of CR and LF characters can be viewed by clicking the \u2018Show all chars\u2019 button.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Update 2<\/strong>: Request for Column editor tip, via\u00a0<a title=\"Comment 96\" href=\"http:\/\/a4apphack.com\/index.php\/featured\/tricks-with-notepad\/comment-page-1#comment-96\">Comment<\/a><\/p>\n<h3>Using Column Editor<\/h3>\n<p>Check the Video to see it in action below,<\/p>\n<p>[youtube w=600 h=475]http:\/\/www.youtube.com\/watch?v=1p7rMCGt_30&amp;hd=1[\/youtube]<\/p>\n<p><strong>\u00a0Update 3:<\/strong>\u00a0Column-wise selection for large files, via\u00a0<a title=\"Column Editor Tip\" href=\"http:\/\/a4apphack.com\/featured\/tricks-with-notepad#comment-509796045\">comment<\/a>\u00a0(form Only333)<\/p>\n<p>If the file size is huge, we can use\u00a0\u00a0use Alt+Shift+Click to mark a start position, then scroll to end position and then again use\u00a0Alt+Shift+Click to mark an end position. This will highlight the text and lets us do the required manipulation with the selected text.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Notepad++ is an amazing text editor which not just gives you option to edit and save your text files, but also gives lot many features&hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-310","post","type-post","status-publish","format-standard","hentry","category-notepad"],"_links":{"self":[{"href":"https:\/\/zhuoyao.net\/index.php\/wp-json\/wp\/v2\/posts\/310","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/zhuoyao.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/zhuoyao.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/zhuoyao.net\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/zhuoyao.net\/index.php\/wp-json\/wp\/v2\/comments?post=310"}],"version-history":[{"count":0,"href":"https:\/\/zhuoyao.net\/index.php\/wp-json\/wp\/v2\/posts\/310\/revisions"}],"wp:attachment":[{"href":"https:\/\/zhuoyao.net\/index.php\/wp-json\/wp\/v2\/media?parent=310"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/zhuoyao.net\/index.php\/wp-json\/wp\/v2\/categories?post=310"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/zhuoyao.net\/index.php\/wp-json\/wp\/v2\/tags?post=310"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}