How to show a thin vertical line after column 112?
-
Assume I open a textfile.
To visually verify which of the 523415 lines are longer than 112 chars I would appreciate to have a feature to let NP++ show a vertical line after this column.
Is this possible?
How?
Thank you
Matt -
Settings > Editing > Vertical Edge Settings -
Hello Matt,
In addition to the vertical edge feature, given by dail, you could search, in Regular expression mode, for the regex :
^.{112}\K.+. This regex find ANY range of characters, in a line, located AFTER column 112, throughout the current fileOn the other hand, the regex
^.{112}\Kwould match the zero length string, located between the columns 112 and 113.So, after a first search, hit the ESC key to close the Find dialog. Then any hit, on the F3 function key, will move the cursor just after column 112, of the next line, with 112 or more characters long :-)
Thinking about location by column, here are, below, some useful regexes, relative to that topic. Of course, just replace the variable ‘n’, by an integer !
•---------------------------------------------------------------------------------• | With the "Count" button, of the "Find" dialog | | | | Options "Regular expression" CHECKED and ". matches new line" UNCHECKED | •-------------•-------------------------------------------------------------------• | ^\R | COUNT all the EMPTY lines | | ^.+\R | COUNT all the NON EMPTY lines | | ^.+ | COUNT all the NON EMPTY lines | | ^.*\R | COUNT all the lines | | | | | ^.{n+1,} | COUNT all the lines, of MORE than 'n' characters long | | ^.{n}\R | COUNT all the lines, of, EXACTLY, 'n' characters long | | ^.{1,n-1} | COUNT all the NON EMPTY lines, of LESS than 'n' characters long | | ^.{0,n-1} | COUNT all the lines of LESS than 'n' characters long | •-------------•-------------------------------------------------------------------• •-----------------------------------------------------------------------------------------------------------------------------• | With the "Find Next" button, of the "Find" dialog | | | | Options "Regular expression" CHECKED and ". matches new line" UNCHECKED | •-------------•---------------------------------------------------------------------------------------------------------------• | ^.{n}\K.+ | FIND any range of characters, in a line, located AFTER column 'n', in ALL lines of MORE than 'n' characters | | ^.{n}\K.* | FIND any range of characters, in a line, located AFTER column 'n', in ALL lines of 'n' or MORE characters | | | | | ^.{n}\K | MOVE the CURSOR to the location, BETWEEN column 'n' and 'n+1', in ALL lines of 'n' or MORE characters | •-------------•---------------------------------------------------------------------------------------------------------------• •----------------------------------------------------------------------------------------------------------------------------------• | With the "Replace All" button of the "Replace" dialog ( NOTE : Button "Replace" FORBIDDEN, due to the '\K' form ! ) | •-------------•----------------•---------------------------------------------------------------------------------------------------• | Find what | Replace with | Options "Regular expression" CHECKED and ". matches new line" UNCHECKED | •-------------•----------------•---------------------------------------------------------------------------------------------------• | ^.{n}\K.+ | | DELETE any character, AFTER column 'n', in ALL lines of MORE than 'n' characters | | | | | | ^.{n}\K.+ | STRING | REPLACE all characters, AFTER column 'n', by "STRING", in ALL lines of MORE than 'n' characters | | ^.{n}\K.* | STRING | REPLACE all characters, AFTER column 'n', by "STRING", in ALL lines of 'n' or MORE characters | | | | | | ^.{n}\K | STRING | INSERT "STRING", at column 'n+1', in ALL lines of 'n' or MORE characters | •-------------•----------------•---------------------------------------------------------------------------------------------------•Enjoy N++,
Best Regards,
guy038
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login