You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With the current code box we do not have the option to add line numbers.
New Feature/Solution
Having the ability to add line numbers to a code box would be very helpful, especially for long snippets of code.
Alternative Solutions
The only real alternative solution is to either manually add the numbers yourself, or use text-to-table and then add numbers yourself, or use an alternative plugin such as NoteHighlight2016.
Additional Context
I think this feature would be most useful if we could additionally have an option to go with it that allows the user to specify whether to have one line of code per row in the underlying table, or have all code in one row in the table (and have line numbers in the same row in a column to the left, one line per number) (assuming that a table would be the method used to implement this). The reason for this option is because if we do one line number and one line of code per table row, then the code text wraps flawlessly if it needs to. If we put all code in a single row, and all line numbers in the same row one column to the left (one line per number), then what happens if the code text wraps is that the numbering will get messed up (this is currently an issue in the NoteHighlight2016 implementation of this feature).
The downside of enabling the one-row-per-line option is that copying the code text out of the table and into another application becomes more difficult - doing it w/ the native copy/paste will produce an extra newline between each line of code (although this is fairly easily remedied in apps like N++ using the "remove blank lines" option). However it seems the "copy as markdown" feature which is already implemented in OneMore has solved this problem, as I noticed - if I use "text to table" option currently to convert my code to a table with one line per row, and add line numbers in a column to the left, and then copy the code text out of the table using "copy as markdown" and paste into another app - it works flawlessly - no extra newlines, everything looks great.
So I think adding the line number feature with the option for the user to choose how to utilize it (single row or one-line-per-row) would be an excellent addition to the OneMore plugin and would be complemented well by its existing "copy as markdown" option. This would give us a numbered code box solution that handles line wrapping well and allows copying into external apps without issue - which is something that I don't think any other single OneNote plugin today can provide (today this can only be accomplished with a multitude of tools and some manual processes).
Let me end this by saying you have an amazing plugin here, and thank you very much in advance for considering this request!
The text was updated successfully, but these errors were encountered:
dwillis77
changed the title
Add Line Numbers to Code Box
Feature Request - Add Line Numbers to Code Box
Feb 21, 2024
Problem to Solve
With the current code box we do not have the option to add line numbers.
New Feature/Solution
Having the ability to add line numbers to a code box would be very helpful, especially for long snippets of code.
Alternative Solutions
The only real alternative solution is to either manually add the numbers yourself, or use text-to-table and then add numbers yourself, or use an alternative plugin such as NoteHighlight2016.
Additional Context
I think this feature would be most useful if we could additionally have an option to go with it that allows the user to specify whether to have one line of code per row in the underlying table, or have all code in one row in the table (and have line numbers in the same row in a column to the left, one line per number) (assuming that a table would be the method used to implement this). The reason for this option is because if we do one line number and one line of code per table row, then the code text wraps flawlessly if it needs to. If we put all code in a single row, and all line numbers in the same row one column to the left (one line per number), then what happens if the code text wraps is that the numbering will get messed up (this is currently an issue in the NoteHighlight2016 implementation of this feature).
The downside of enabling the one-row-per-line option is that copying the code text out of the table and into another application becomes more difficult - doing it w/ the native copy/paste will produce an extra newline between each line of code (although this is fairly easily remedied in apps like N++ using the "remove blank lines" option). However it seems the "copy as markdown" feature which is already implemented in OneMore has solved this problem, as I noticed - if I use "text to table" option currently to convert my code to a table with one line per row, and add line numbers in a column to the left, and then copy the code text out of the table using "copy as markdown" and paste into another app - it works flawlessly - no extra newlines, everything looks great.
So I think adding the line number feature with the option for the user to choose how to utilize it (single row or one-line-per-row) would be an excellent addition to the OneMore plugin and would be complemented well by its existing "copy as markdown" option. This would give us a numbered code box solution that handles line wrapping well and allows copying into external apps without issue - which is something that I don't think any other single OneNote plugin today can provide (today this can only be accomplished with a multitude of tools and some manual processes).
Let me end this by saying you have an amazing plugin here, and thank you very much in advance for considering this request!
The text was updated successfully, but these errors were encountered: