Adding a vertical column to the right side
I’m sorry i don’t know exactly what the name/terminology of what I’m looking for is but I’ve taken some screenshots in order to convey my idea.
I’m looking to add a sectioned off area divided by a vertical line that i could write small descriptions to refer to later.
I’ve thought i could just make a companion file and open them side by side but that is just a work around for what i really want. My codes are usually just AHK’s and Css files so i don’t really do anything too extensive so another section on the file shouldn’t bother anything.
My apologies if this is an option and i haven’t figured it out.
Writing the veritcal line of
;|as the separator is easy:
Alt+Clicksomewhere off to the right, then drag down to get a thin rectanglular column selection, then type
;|, and you’ve got the divider.
You can then just type on the right half of that. However, you will have to manually change lines when you’ve gone as far right as you want to, as ENTER will take you to the start of the next line, rather than to after the
;|on the new line. Though really, that “manual change” is as simple as hitting down-arrow.
@PeterJones Yeah, I know the ways around doing it manually, i just thought maybe there was some sort template that i could apply to text files.
I’m also having trouble with moving the multiple lines of ;| with shift tab to push them back and i see now it’s because i populated the text in place without using tab to push them into position.
maybe there was some sort template that i could apply to text files.
Notepad++ doesn’t have a builtin templating system. I use the QuickText plugin, available through Plugins Admin. Then, in the QuickText settings, I would pick the right language (if you’re using a UDL instead of a builtin language, I think you pick “External” from the dropdown, but I’ve never tried that). You can then define a new quick-text keyword, and then in your document, you’d use type the quick-text keyword then use the assigned keystroke for QuickText completion (I think TAB is the default; I change mine to Ctrl+Shift+Enter, because TAB has too many important meanings to me to be also used for this function).
In the languages that I use, I have a QuickText entry called “start”, so I would type
startthen the keystroke (or Plugins > QuickText > Replace Snip), and get my starter template.
But I’m guessing what you really want is “I want to be able to take my existing code and add the column easily”. Since macros don’t know how many lines are in your file, if I were doing it for me, I would be tempted to pull out the PythonScript plugin, and code up something that would add the veritcal-bar comments to all the lines in the file.
with shift tab to push them back
Shift+Tab works for shifting the first non-space characters of a file back one tab-stop (honoring your language’s tab settings for using either n spaces or the actual tab character). But for something that’s later on the line, I would again just recommend using the column-mode editing (either via Alt+Click as I said before, or using Edit > Begin/End Select in Column Mode for long files – use that once to set it at the beginning, then Ctrl+End to get to the end of the document, move the caret to the right column of the last line, and use it again to end the selection) and then delete that selection to move it left (or do one or more TABs or spaces to move right)