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
--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/vim_use/abG%2ByEEDqJLM7sLm%40256bit.org.
Wednesday, March 11, 2026
Re: Current Position
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 ?
Re: Current Position
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.
--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/vim_use/abG6bJWM9dT00%2BcU%40256bit.org.
> 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.
--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/vim_use/abG6bJWM9dT00%2BcU%40256bit.org.
Re: Current Position
I tried vim --clean I don't see anything happen ?
--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/vim_use/0e4968c8-02d2-482e-9174-b3586cd7a931n%40googlegroups.com.
On Wednesday, March 11, 2026 at 1:25:47 PM UTC-4 Christian Brabandt wrote:
On Mi, 11 Mär 2026, Christopher wrote:
> I'm trying to get this to work, first I press g 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.
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
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/vim_use/0e4968c8-02d2-482e-9174-b3586cd7a931n%40googlegroups.com.
Re: Current Position
On Mi, 11 Mär 2026, Christopher wrote:
> I'm trying to get this to work, first I press g 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.
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
--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/vim_use/abGlHCNXHL7QxbWF%40256bit.org.
> I'm trying to get this to work, first I press g 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.
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
--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/vim_use/abGlHCNXHL7QxbWF%40256bit.org.
Current Position
I'm trying to get this to work, first I press g 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.
-- --
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/vim_use/bd97dae7-4af4-47a4-835b-8d18138db841n%40googlegroups.com.
Monday, March 9, 2026
Re: Backup Directory
On Mo, 09 Mär 2026, CrestChristopher wrote:
> When I create a file in Vim, save it; a backup should be created after the
> save or after I've saved and added more to the document. In either case none
> of these two are working ?
So I tried this out:
#v+
~/tmp/$ mkdir ~/vim-backup
~/tmp/$ cat backup.vim
set nocp
set backupdir=~/vim-backup//
set backup
~/tmp/$ vim --clean -u backup.vim
:e ~/.vim/vimrc
:w
:q
~/tmp/$ ls -l ~/vim-backup/
-rw-r--r-- 1 chrisbra chrisbra 12481 Jan 20 2025 %home%chrisbra%.vim%vimrc~
#v-
Works as expected.
Thanks,
Christian
--
Death is God's way of telling you not to be such a wise guy.
--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/vim_use/aa7R3tRl7Zr/fA%2BT%40256bit.org.
> When I create a file in Vim, save it; a backup should be created after the
> save or after I've saved and added more to the document. In either case none
> of these two are working ?
So I tried this out:
#v+
~/tmp/$ mkdir ~/vim-backup
~/tmp/$ cat backup.vim
set nocp
set backupdir=~/vim-backup//
set backup
~/tmp/$ vim --clean -u backup.vim
:e ~/.vim/vimrc
:w
:q
~/tmp/$ ls -l ~/vim-backup/
-rw-r--r-- 1 chrisbra chrisbra 12481 Jan 20 2025 %home%chrisbra%.vim%vimrc~
#v-
Works as expected.
Thanks,
Christian
--
Death is God's way of telling you not to be such a wise guy.
--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/vim_use/aa7R3tRl7Zr/fA%2BT%40256bit.org.
Subscribe to:
Comments (Atom)