Current Position

12 views
Skip to first unread message

Christopher

unread,
1:14 PM (4 hours ago) 1:14 PM
to vim_use
I'm trying to get this to work, first I press followed by CTRL+G although nothing happens ?

g CTRL-G 

Prints the current position of the cursor in five ways: Column, Line, Word, Character and Byte. If the number of Characters and Bytes is the same then the Character position is omitted. If there are characters in the line that take more than one position on the screen (<Tab> or special character), or characters using more than one byte per column (characters above 0x7F when 'encoding' is utf-8), both the byte column and the screen column are shown, separated by a dash.

Christian Brabandt

unread,
1:25 PM (4 hours ago) 1:25 PM
to vim...@googlegroups.com
You should see something like this:


Col 20-41 of 54-75; Line 74 of 1738; Word 434 of 11778; Byte 2860 of 73069

(I just pressed g followed by CTRL-G in a help window.)

Does it work if you start vim --clean? Perhaps some plugin is mapping
this key away?


Thanks,
Christian
--
On the subject of C program indentation:
"In My Egotistical Opinion, most people's C programs should be indented
six feet downward and covered with dirt."
-- Blair P. Houghton

Christopher

unread,
1:43 PM (4 hours ago) 1:43 PM
to vim_use
I tried vim --clean I don't see anything happen ?

Christian Brabandt

unread,
2:56 PM (2 hours ago) 2:56 PM
to vim...@googlegroups.com

On Mi, 11 Mär 2026, Christopher wrote:

> I tried vim --clean I don't see anything happen ?

Please do not top poste.

Does this work?
:exe ":norm! g\<c-g>"


Thanks,
Christian
--
District of Columbia pedestrians who leap over passing autos to escape
injury, and then strike the car as they come down, are liable for any
damage inflicted on the vehicle.

CrestChristopher

unread,
3:01 PM (2 hours ago) 3:01 PM
to vim...@googlegroups.com


On 3/11/2026 2:54 PM, Christian Brabandt wrote:
On Mi, 11 Mär 2026, Christopher wrote:

I tried vim --clean I don't see anything happen ?
Please do not top poste.

Does this work?
:exe ":norm! g\<c-g>"


Thanks,
Christian

Yes, that command works; although why not g followed by CTRL+g ?


    

Christian Brabandt

unread,
3:15 PM (2 hours ago) 3:15 PM
to vim...@googlegroups.com

On Mi, 11 Mär 2026, CrestChristopher wrote:

>
> Does this work?
> :exe ":norm! g\<c-g>"
>
> Yes, that command works; although why not g followed by CTRL+g ?

This is how Vim script expects those two keys.

So did you really press "g" followed by hitting the "CTRL" key (and keep
it down) and pressing the "g" key again?

Thanks,
Christian
--
Television is now so desperately hungry for material that it is scraping
the top of the barrel.
-- Gore Vidal
Reply all
Reply to author
Forward
0 new messages