Author Topic: Feature enhancement: line numbers in "Export to Html"  (Read 2675 times)

dholshou

  • Community Member
  • Posts: 51
  • Hero Points: 1
Feature enhancement: line numbers in "Export to Html"
« on: August 19, 2008, 05:06:04 pm »
For my code reviews, I need to provide line numbers.
The "Export to Html" feature is powerful and welcome.
I'd like to request a feature enhancment.
Please include (or the option to include) line numbers in the html output.

I use C/C++ and must provide code in a document format, ie. html or MS Word Doc, with modifications from heritage and Change Request information highlighted for the reviewers. This includes line numbers.
« Last Edit: August 19, 2008, 05:42:57 pm by dholshou »

jimlangrunner

  • Senior Community Member
  • Posts: 350
  • Hero Points: 29
  • Jim Lang - always a student.
Re: Feature enhancement: line numbers in "Export to Html"
« Reply #1 on: August 19, 2008, 05:55:46 pm »
Would a .pdf work?  If so, printing to .pdf offers the option to include line numbers in the output. 

If not, how about Search & Replace with regex to insert line numbers?  Wait.  Won't work simply, as you'd have to count line numbers in the replace.  But a macro to do the same should work.  It's an iterative count of the line on the replace, so...  (Think-think-think).  Gotta think about it.

But .pdf is pretty nifty, and it works now.

Lee

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 987
  • Hero Points: 83
Re: Feature enhancement: line numbers in "Export to Html"
« Reply #2 on: August 19, 2008, 06:21:33 pm »
That's a good suggestion, I will add that to the feature tracker.  You can do this pretty quickly in SlickEdit by editing the HTML directly.  The source is all inside a
 tag, you can create a block selection on column 1, and use the Enumerate (Edit > Other > Enumerate...) to insert numbers on column 1.  If you want a trailing '.' or ':' you could also use Block Insert Mode (Edit > Other > Block Insert Mode) on the selection first to insert for all the lines before you do the enumerate, or quickly add some whitespace.  You may want to disable HTML formatting/wrap for this
.

jimlangrunner

  • Senior Community Member
  • Posts: 350
  • Hero Points: 29
  • Jim Lang - always a student.
Re: Feature enhancement: line numbers in "Export to Html"
« Reply #3 on: August 19, 2008, 06:50:34 pm »
Nice.  I can think of half a dozen places where the enumerate will be useful now.  Thanks!

dholshou

  • Community Member
  • Posts: 51
  • Hero Points: 1
Re: Feature enhancement: line numbers in "Export to Html"
« Reply #4 on: August 19, 2008, 08:23:49 pm »
I know this is probably a very silly question, but...
I need some help using block select.
I use vi mode and block select is done with <ctrl-v>.
In [g]vim you can hit <ctrl-v> then G to go directly to the bottom or / to search to a place and the block select will follow to your destination.
VSlick doesn't seem to extend the block select in a way I can control and I figure out how to extend the block select to the bottom.
Any help?

Ryan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 987
  • Hero Points: 77
Re: Feature enhancement: line numbers in "Export to Html"
« Reply #5 on: August 19, 2008, 09:27:32 pm »
As far as the Vim thing goes...G isn't extending your selection to the bottom of the file?  It should definitely be doing that...that's the behavior I see.  Also, "/" seems to extend the selection appropriately as well. 

Are these not working for you at all?  Have you tried replicating that issue with a clean config?

- Ryan

dholshou

  • Community Member
  • Posts: 51
  • Hero Points: 1
Re: Feature enhancement: line numbers in "Export to Html"
« Reply #6 on: September 09, 2008, 07:28:37 pm »
Ok, I tested and you are correct.
Visual select - G or gg works just fine.
I was stuck with a stale memory...mine.

Selection and search does work, but to continue a search with n, #, or * does not.
You must continue the next search by using the old school //<enter>.


« Last Edit: September 09, 2008, 07:38:24 pm by dholshou »