missing missing

Features

automatically insert a new line if there is no selection and a character is inserted at left of LF or at right of CR

automatically remove line delimiters if there is a selection and the rest of the line is deleted

triple click doesn't include any line delimeters in selection. also doesnt use a null selection,meaning visibly stays on one line, because it is visible wo it

selection fixed eol highlighting?not really the options are true and really true.the cursor don't blink no more because that's annoying. (not that blinking html tags also got recently taken out of the standard for the same reeson.) get rid of dots for spaces but keep arrow for tabs . space character is pure invisible space.

reload remembers selection

so a line operation can be deleted or moved keeping the selection on a single line

handle mixed line delimeters in the same file

delete both CR LF pair if no selection and one is deleted

notepad copy broke, cut fixed, drag ok- copy cut context only work in geany only, drag to left and far right

the Newline hide function can be used to use regular expression search normally,and other menu items

the features go along with the fact that the line characters really already represent beginning and ending of lines it is just showing it. the selection and auto features go along with how at the beginning of a file there is always an assumed LF character and an assumed CR character at the end, not only a file but any piece of text.

when ctrl+drag copy drag now leaves the selction on the original. if u drag within a selection then it duplicates the selection, then you can drag the copy without needing a control key (not fixed for notepad), delete to move or cancel

ctrl+drag to copy keeps the original text selected. you can then press delete to move it. thought about making copying the default drag action but decided not to. dragging to within the selected text keeps it selected because if you select a big text area then decide you need to actually scroll the window.

tabs are now interpreted as column breaks instead of super spaces. multiple tab sequences merge columns similar to how spaces are used in succession in documents.if wrapping is on giving the tabs extra width and wrapping them ensures that they line up vertically.there is a minimum window width dependant on the maximum number of tabs on a line.there is one click selection of tabs or the middle

like newline characters, although the plugin uses spaces to display tabs, only tabs are saved to file keeoing it small and regular.allows trailing spaces based off indicators

shows the assumed characters as read only characters, and instead of always assuming CRLF assume based on the mode.

insertion points are best because length is exactly the difference between two cursor positions,can pivot because it can b empty

when there is a selection and a single character is pressed overwrite mode is now the default. nobody uses overwrite mode separately anyway. undo redo looks much better by being easier to follow. if a single character is selected the input result will look the same as before this feature. it is a better management of temporary memory: example if you want to type over the word apple butter to say cocoa butter, if you select apple butter then type cocoa you will have to shift the character buffer zero characters, before this feature if you select apple it will shift -4+1+1+1+1 for a total result of zero end example. that would have modified the address of every character after unnecessarily many times. if you select not enough characters there is a smooth transition to insert mode. if you select too many characters simply press delete at the end.

drag move undo in 1 operation (plugin enabled)

Summary

Displays all LF characters at beginnings of lines.

CR and LF are displayed and edited as normal characters, but not selected on triple click, extra delimiter characters are assumed based on the mode but not saved to file to never have a null line, auto insert and remove of lines

Uses tab stop positions as absolute positions based on the number of the tab on the line. Makes tabs end before the next tab column by wrapping them, shows the currently selected column

Enforces the following options: the cursor will not blink, spaces will be blank, tabs will be displayed as arrows. hides or displays the line wrap marker in the margin. adds the option to not show a selection at line ends. overtype mode is no longer recommended. copy drag keeps the selection on the original copy,dragging within the selection duplicates the selection no matter if ctrl is pressed or not (geany only for now)

Adds a function to switch the contents of the clipboard and selection

Allows simple scintilla scripting

Application Examples

the selection line by line a null selection is a selection of character width 0.this would still be selecting a line ending without this plugin. but control characters are physically the same as characters.when visible now only characters are always selected with a width

also displaying line end characters introduces an extra cursor position. this means the positions at the beginning and ending of adjacent lines are aliases for the same position. this makes some sense because if you look at the selection line by line, if you snapped to only one position, like you would if they are not visible, then a null selection on a line would be required in exactly one direction instead of none.

uses the tab stop width just make it absolute positioning,horizontal only using wrapped lines, maybe should overlap the text instead then make the current column visible when selected- impossible for a plugin, without extra data structures.maybe want to adjust tab stop width using a slider,or auto detect like column unix command, or percentage of percentage of screen.

the input can always be printed line by line. using the width of the window the tab columns will always line up on otherwise independent lines. tables can be constructed but each row doesnt know about the other rows.

Displays CR character and displays LF character on beginning of lines, makes them selectable but not on triple click, auto insert or delete of line delimiters. Hides the line wrap marker, disables cursor blinking,((close geany to fully unload)) and other minor modifications that cannot be made through normal preferences

this is the full readme file for newline plugin, a x platform. this file may be updated separately so check for the latest version

cleans up the ending of files: some applications expect all lines to be terminated to be complete,such as if the line is only partially written inreal time. this is like expecting the assumed CR at the end to be explicit. but NO application forces a leading LF, therefore a leading LF really is assumed by all applications

mater of fact i can't really stand programming without this plugin despite its bugs

line delimiters are helpful to be visible because while not visible differences in the layout,it can affect the text length and postions

note that this plugin helps implement some of the "line operations"

The main inspiration behind this plugin is because i like it better.

this is an experimental plugin.since the implementation was not straightforward it mostly serves as a functional model and there is probably lots of little bugs;report for example any newline characters appearing out of place;probably different undo behavior

cant be held liable for any loss of data according to the use of this plugin or variants

please spread it across the interwebs starting from here

Download Files List

project discussion page on sourceforge

Sources

newline-2014-03.zip - these other 5 files expect to be placed with the external sources

newline_bat.cpp, newline.c, newline_sh.c - source files

newline.bat, newline_sh - build scripts for each platform

External Tools

geany-0.19.1.tar.gz - you will also need gcc compiler

NppPluginTemplate.zip - you will need Visual Studio on windows

Compiled Files

includes two compiled versions placed alongside the other plugin files

newline.dll - for Notepad 6.5 or later and Scintilla 3.3.4 on windows

newline.so - for Geany Vellam (0.19.1) and Scintilla 2.12 on linux

Development Notes

notepad is assumed to be unicode while geany and scintilla are ansi

even though this implementation is only possible through the use of substitute characters,these characters are meant to replace their corresponding characters exactly

line characters can still get confused with normal characters. the clearing and stretching of indicators is sort of bad by scintilla but it is probably possible for the plugin to catch all cases anyway. maybe allow absolute positioning of indicators and markers, relative to line. scintilla box indicators right now have a minimum width of 1 and also combine horizontally. scintilla has tab indentation guides like vertical dash but they aren't an indicator. i can use multiple selections to draw a vertical line

like inserting between positions, all the positions move like the cursor, so do indicators and markers, but it would be nice if the markers had the option to be absolute, and the indicators absolute relative to beginning of line

reimplements cut,copy;copy and cut in the context menu can be used(in geany), not shortcuts--ignore this

Scintilla can you find nested undo level to prevent syntax errors?...i dont know why, i thought it would be nested;

clipboard editing is used for cut on windows only, and in the paste and fix copied menu items

highlighting 3 characters ltr then hide menu item just deactivates selection and notification updates for raw copy debbugging

edge mode can be set to 2 to color the wrapped lines of a line differently. it is set to 1 to show a vertical guide based on the end of the currently selected column;

use SCI_FINDCOLUMN instead of SCI_GETCOLUMN

possibly use separate data structure like an undo stack

SCI_REPLACETARGET can use -1 for string length, which might be useful for column wrap

is the new overwrite mode similar to some autocomplete text boxes?like if you select one of the scintilla autocomplete suggestions the whole selection is still replaced,but in those there is still an ending selection but the content changes to suggest word

Scintilla was aslo updated to use Unicode line ends which i dont know about so i will continue to ignore them. i cant even see them because none of the lexars support them.

i guess an example of where you would be selecting eol chars and not: LF mode select full line and drag to end of another. else triple click then drag to beginning...

if the default font doesnt include a character the computer should borrow it from any font that is available, or even display a similar unicode character that is available.maybe display unknown unicode characters using normal characters by pretending the leading bits aren't set and it will look like garbage but still be editable.

embedded fonts and images are helpful for self contained documents.for word processers having a page width is helpful and they have page breaks and column breaks, similar to tabs but the tabs stops can be adjusted

there is a command line unix command caled column that sort of does this(line to long, by word), there is also a fold command. the column command processes all lines to find a width.

wrapped rows can look the same as different rows,but its easier to edit like using tabs,but with a width will still lookk the same when copied, therefore it is still preset (not with plain text documents because there is not a set width, there should be an option to include a set width,but you can drag it and scroll it),also should specify tab width unless a percentage. maybe virtual space should be default but there should be a set width for it, and compress it like png has built in compression

spaces can be used to format layout of text before it is displayed like to right-justify numbers or force syntax. but its harder to edit unless you use a pretty printer but then what if the user didnt want that so it should be a function. it is faster for the reader to display spaces than automatically justify everything itself, which is maybe why line wrapping is not the default for scintilla, but is for this plugin

the new overwrite mode is doesnt move positions so much which is good visibility for undo and even just replacing so you can remember it or capitalize it for example;

all the positions are relative and build up.auto ins is possibl because an extra vertical position allows you to select between lines wo a horizontal cursor

tab has minimum width 1 like a space to make it visible and editable

Features of Scintilla

scintilla only uses the first character to detect line mode--in contrast python will give you a list of all combinations of endings encountered in a file

SCI_GETVSCROLLBAR there is no way to always show it, if set Geany always shows it, Notepad it is shown when needed ; SCI_GETSELEOLFILLED there is no way to turn it off completely (though this plugin uses multiple selections to turn it off)

scintilla paste auto-convert endings-- only has an effect on windows, as stated in the documentation (i noted before that that it would always convert one way or the other, but it works now,actually notepad sometimes? upon paste all are converted to current mode), information loss on gtk,set to false by this plugin

SCI_SETCARETLINEVISIBLEALWAYS true the cursor is still hidden when the window is not in focus but the line is shown(already set to true by notepad if you have current line highlighting on)..finally only on windows because it is a new scintilla feature, the line wrap marker is set by this plugin to be in the line number margin

scintilla internally numbers lines and characters from 0 but shows lines from 1 as in scripting. scintilla messages show line delimiters at the end of lines. cursor position numbering matches the left of characters.

there are some new scintilla features which would be used by this plugin except notepad has not upgraded its scintilla. from scintilla 3.3.5 there are character representation commands, and set SCI_SETMOUSESELECTIONRECTANGULARSWITCH

a scintilla command to check the version would be good

(the docs ((still)) says SCLEX_* is defined in Scintilla.h but it is in SciLexer.h)

bug fix wrapped rectangle mode, the selection skips over any wrapped lines. during rectangle mode if you select past the end of a line the eol chars are moved and virtual space is selected instead(or if virtual space is off then the end is jagged), if line wrap is on the cursor can not move to a wrapped line which should be possible to use instead of the first line, it is likely that the position is past the ends of other lines in which case it can't be drawn, also word wrap will cause the selection to not line up on other wrapped lines unless you count characters from the start of the wrapped line

scintilla word wrap has a bad effect on tab positions, a tab ends on the nearest multiple of the tab width in characters from the beginning of the line, but not from the beginning of a wrapped line like it should, because otherwise if you add one character to the first line then the tab positions on the second line move without any of the other text on the second line moving. also in the about dialog you can see the amount you will have to resize the window to get only full tabs per wrapped line, the arrow points should line up to the vertical edge, the measurement seems to be off in notepad,and maybe in geany sometimes.either way there is a bug that an extra space has to fit before the first wrapped tab to cause the wrapped tab positions to line up and cause the first tab to shrink by 1 so that that space stays on the first line

to do add option to break lines BEFORE spaces, instead of using start indent. word wrap tags on any trailing spaces to the current word, even though it is not a word char. try putting so many spaces so that it wraps and you have one word on a whole line

inserting a tab insert double tabs(i think is a scintilla bug in SCI_GETADDITIONALSELECTIONTYPING), and insert tab at start of line

Scripting

the program counter is marker number 6 by line.SCI_MARKERDEFINE(6,0) always ends the program

currently two extra commands can be used in place of scintilla commands,commands can be nested

command #+ converts number to text,the type is determined automatically if all characters are numeric or a leading - ,hex not supported on windows because of the external library (including constants)

command - subtracts a from b

a marker in the margin indicates if the input string is returned

doesnt support registering notification hooks for now

Scintilla.h must be open to dereference functions, detects a constant if the input string is not prefixed by sci_

cant use buffers,structures,etc. maybe use a general purpose scripting language instead.there could also be a script level interpreter for c for example(i found notepad plugins for c# script it is probably that,now i found a python one that is better)

maybe detect and print return values which would be thrown away, or use the current position interactively

possibly use Scintilla.iface which contains argument descriptions

Geany vs Notepad

geany's function list is way better than notepads's. notepad cant detect functions if they are padded with anything other than space or underscore _ or control characters,esp. cant if there is a comment on the same line--which is legal c syntax. neither notepad or geany sidebar show functions that begins with extern "C"

notepad has an unnecessary find tab in the search dialog, and i dont like that the direction is not a button. i like its RegEx support. geany the settings are not saved(but in a newer version), geany regular expressions arent used in the find widget, and the find widget is automatic on change

scintilla tabs are drawn as arrows. in notepad the color can be changed under Settings:Style Configurator:Global Styles:White space symbol. the show all characters button can reset the option in the View:Show Symbol menu,it is harder to reset in geany-the settings should be kept separate like in geany. but the old geany combined 'always wrap search' and 'hide the find dialog'.so this plugin always displays tabs as arrows and doesn't display white space,switching tabs will reset the option on notepad

notepad does not indicate in the menu what language is currently selected,geany does not indicate which submenu,they are organized differently

Edit:Preferences:Editor:Indentation:Width is the geany option for tab stop width. Settings:Preferences:Tab Settings:Tab Size notepad.

notepad has an option to poll for file status, geany can set the interval to 0.bug if it goes missing, hit cancel, then restore and reload it, if it changes then geany doesnt detect it (still a current bug)

word count and sel in status bar of geany, and summary menu in notepad, is about doubled by this plugin (bug). in notepad sel in status bar is not shown because like rectangle mode is not counted (vs). instead of showing N/A it should show characters/ranges, for some reason the summary shows a rectangular selection as 1 range (bug). geany word count- doesnt count lines when in CR mode(current bug)

geany's status bar is so much nicer for debugging,i might try to use a scintilla object on notepad,getting scintilla document pointer from buffer id would be useful without having to switch tabs.it would be good to allow the user to rename tabs even if they are unsaved, there is a function in the geany api

there is a setting so you could press tab to input multiple spaces for indentation at the beginning of lines instead of a tab. geany there is already "replace tabs by spaces" menu items,and "newline strips trailing spaces"...

i like notepad's simple backup feature. not so much its newer save all files to disk backup vs ram.

notepad has a nice ascii panel,geany has a nice color chooser built in.notepad by default has ctrl+d as scintilla duplicate

i like how notepad separates the style settings, notepad's keybinding is superior, and the redesigned notepad preferences ui, there is additional settings section in the new geany

geany does have a save a copy as feature, it is an open file in a new tab checkbox on the save as dialog but it disables rename is awkwardly placed and notepads is much better(has actually been removed in the new version)

notepad has a highlighting function builtin/geany has a plugin for it.notepad has split window built in but geany ships with a plugin for it which is all ok

to use rectangle mode, hold alt on notepad, ctrl+alt+click on geany, geany is easier because you dont have to start the selection while holding a key, actually there is a scintilla option for this probably will be set by this plugin

geany -p should uncheck all plugins instead of hiding the plugin manager,but i could edit the config file, or remove the .so file instead

notepad messages: open will prompt if doesnt exist which seems good, it's missing savecurrentas as documented(i need a newer version of Notepad_plus_msgs.h i have the one from the template), switchtofile needs a full filepath

notepad has a multiline tab bar feature, but in true microsoft style the tab-widths are justified and if you select a second row tab the row moves, terrible design. this also causes problems with drag-n-drop.the normal tab bar is best unless you have many tabs open, then it is still better but a regular extension for a multiline tab bar would be better than scrolling

geany gtk sidebar should keep its width relative to the window edge (fixed in the new version except you can see it resizing,theres probably a layout option for that)

there are several geany function that would be useful for me to have in the api--the documentation says plugin authors can add functions but i have no idea how, if i have to recompile geany or just the api part of geany then that wouldnt make sense i would work around it or update to a new official version of geany because a plugin is meant to be separate from the official app but i dont know if that is what i would have to do anyway, could you just expose everything? also the wrappers are redundant what this uses is clearer

notepad changes tab on right click,geany and firefox don't.maybe allow right click to change cursor position if there is no selection--notepad always changes it

in notepad drag within updates the cursor position to an empty selection within the selection (i cant etect an empty drag on notepad), in the new and old geany the selection is reset to 0. the cursors used are different and i guess this is not managed by scintilla. it should not clear selection on drag and copy within should look like duplication.

notepad has 2 scintilla objects and uses document pointers for every document and attatches them to the objects like when changing tabs. geany keeps an object with document for each tab. notepad does allow creation of additional scintilla objects. im not sure which is better but can always use a document pointer not an object pointer to identify a file. the tab bar in notepad flashes sometimes to switch between documents. notepad has to keep track of buffer ids and probably stores some info with it, (like selection?) that isn't included in the scintilla document structure. geanys keeps scintilla completely contained. im not sure how much extra memory it uses.

Bugs

unknown exception in notepad when drag a file to it,also when running script sometimes scintilla gets hidden but the rest of the notepad ui is normal

crlf mode with empty lines and select only lf cr is also removed

crlf mode drag to after cr selection is off

overwrite mode is broken with insert tab,the whole selection is replaced,might be related to inserting double tabs with multiple selections which is fixed by this plugin unless the selection ends immediately before a tab and detecting only one of them.or if the selction is on multiple lines, then it is very messed up because of the multiple selections used by this plugin, because usually all the lines with any selction will be indented, this seems to be a scintilla feature but not SCI_GETTABINDENTS?

fixed--type very fast when there is a selection can insert extra characters.fixed-because character press can actually be more than one character at a time to reduce lag

geany tab width is reset sometimes

the displaying of tabs is delayed so the window width can be found, it is needed because it uses line wrapping and counts characters

a width of 1 is reserved at the end of each line for the last and imaginary tab character. this empty space is wrapped in some cases which is a bug.

fixed--geany cut menu item isnt working after disabling-uncommented fixed

the styling can get stold if in between LFCR--mostly fixed

notepad CRLF triple click a line then type a letter it messing up--bug in remove_empty, fixed for now

selecting after LF to column 0 and typing inputs a new line

crash on window width of 1 character.there is unknown exceptions in notepad-with small window_width-fixed for now

notepad sometimes clicking at zero highlights something, or delete all

notepad has a hiding vertical scrollbar that changes the window width so have to reload.

spaces to tab should backup selection...

delete at start causes sel-fixed,multiple clickson 0,reload anchor isnt only cp

note that under regular operation on both platforms, changing the line ending mode and then undoing doesn't update the mode so line endings can get mixed(changing line ending/undo also allows mixed),or through the replace dialog

breaks auto indentation and undoing of words(both platforms)

visible line ending settings are not updated in the ui

column selection mode/replace dialog multiple lines puts in extra newlines--catches error

column select mode: make a thin select and delete doesn't insert extra spaces, initially selecting half doesn't, enter does

reload doesn't remember selection on notepad,reload remembers selection but not first visible line on geany-there is a fix but it is too slow

bug mutiple replace copies one to the start or something-fixed backuptc changed target-but probably change anyway

dragging to after a CR or before LF the selection is cleared(fix especially for line)--fixed

replacin all is changin the selection(regular i guess)

if you hold the mouse down near a styled character it may blink because the selection is redrawn

CR mode select from whole line with leading not removed--fixed

no auto ins when failed drag?

dragging to beginning of line/auto ins and del both

drag whole line to end of same line broke because it does it before sc_notify so change it;in LF mode dragging the rest of a line to before the LF at the start of it messes up because auto_del should actually be done after auto_ins but its probably easier. same for CR.

auto remove got caught between CRLF

CRLF mode, copy dragging a whole line removes an LF from original line

Geany specific

disabling plugin can cause a LF character to be selected

for example if changes are made, then disabled, then undo, all the locations will be wrong--so the plugin should be in the same state before using undo------or Newline hide

can't drag to the right of selection within another length of the selection,because of scintilla version;related (LF mode)drag a line,keeping the selection on one line, to the end of itself but before the next line,it acts like it was typed before itself

for example replacing a full selection treated like drag?

dragging far right will use the clipboard in geany on linux

make it so the mouse area for dragging selected text is the same as the visible selection--currently it is off by half a character--(fixed in a newer version of geany)

old geany bug: odd behavior that if you start to drag something then press ctrl to invoke copy release the mouse to copy it but keep holding ctrl then click on the selected range, the selection will be cleared because you would be starting a rectangular selection but a copy drag symbol will still show on the mouse until you release the mouse again.

Notepad specific

notepad if you convert eol then reload scintilla line mode is not reset except if you for example switch tabs and switch back

in CRLF mode insert blank line above current menu item is broken and it doesnt update the column

the plugin doesn't work until a file is read from disk, not if only new unsaved files are open on startup

notepad word select was hidden accidentally