1

Re: Line Numbering - Really like when doing regex/range operations :a,by*

:se nu
:se nonu

smile

I have had a search and a look, and I am sorry, but I have not found any info on this feature, apart from that it does not work.

In the meantime I am calculating offsets, but I have to admit that I find this tougher.

All the best Ronald

2

Re: Line Numbering - Really like when doing regex/range operations :a,by*

PS  This is more of an issue with word and outlook, because I have line no turned on in visual studio.  Though it would be nice to use the vi commands to toggle.

3

Re: Line Numbering - Really like when doing regex/range operations :a,by*

Hello Ronald,

Indeed, there is no way to show line numbers in Word&Outlook. I've tried to modify the display, but the Word extensibility model is very poor and slow in anything related to screen rendering. Unfortunately, there is no way to overcome this (unless MS starts addressing the glaring issues in Word extensibility in future versions).

On the other hand, given you are missing this, I take it you are more of a vi user than a vim user. I would suggest you invest a few minutes in learning about vim's visual mode, which ViEmu emulatest, and which will allow you to get rid of using line numbers for the type of tasks they were used in vi.

Basically, if you type V, you will enter visual mode: you can move around with standard motions, and there will a be visual selection showing the selected line range (using 'v' in lowercase it will be a character range instead). When you have selected the desired range, you can type an operator directly to act on it ('d' to delete, 'y' to yank, etc...). You can even type a semicolon, after which the status line will show this:

  :'<,'>

The '< and '> marks are built-in marks signifying the last visual range. Thus, if you type any ex command, it will act on that range.

I'm also aware that long-time vi users use marks (set them with ma, mb, etc...) to mark the range, and then type the ex command directly, for example this:

  :'a,'bd

This will delete everything from the 'a' mark to the 'b' mark (previously set with ma and mb respectively).

Hope this is useful.

  -- Jon

4

Re: Line Numbering - Really like when doing regex/range operations :a,by*

Thanks,

I knew about V mode, however I was in the habit of using the line nos.

I now use V/wordOnLineIWant  which is much faster.

All the best Ronald

5

Re: Line Numbering - Really like when doing regex/range operations :a,by*

Thanks Ronald, that sounds indeed very efficient. I just thought I'd mention v and V, as most people who ask about :'a,'bd and :100,200d types of operations are more accustomed to vi than to vim!

Thanks,

  -- Jon