3

Following docs:

Visual g CTRL-G Similar to g CTRL-G, but Word, Character, Line, and Byte counts for the visually selected region are displayed. In Blockwise mode, Column count is also shown.

I frequently made use of g Ctrl-G shortcut to get count of words and characters within selection while in Visual mode. On example of the document containing:

Sample document with some text

This provides the desired result and prints the number of characters 30 + 1 correctly. My problem is that, the information disappears fairly quickly as for my taste. This is shown below:

number of characters in visual mode

I would like to either:

  • Increase the time during which the count information is available
  • Disable auto-hide permanently and keep the details visible unless explicitly instructed to hide
Konrad
  • 17,740
  • 16
  • 106
  • 167
  • I don't see how this is a programming question. It's just "how do I configure vim?". – melpomene Jul 01 '18 at 18:58
  • @melpomene Correct, and this is consistent with what is usually asked under the [tag:vim] tag. Like [this](https://stackoverflow.com/questions/6787734/strange-behavior-of-vim-color-inside-screen-with-256-colors), [this](https://stackoverflow.com/questions/657447/vim-clear-last-search-highlighting) or [this](https://stackoverflow.com/q/234564/1655567) all highly rated and, clearly, helpful questions. – Konrad Jul 01 '18 at 18:59
  • Thanks, I've added my vote to close them as off-topic. – melpomene Jul 01 '18 at 19:02
  • I'm voting to close this question as off-topic because it should be migrated to https://vi.stackexchange.com – phd Jul 01 '18 at 20:05
  • @phd I had this discussion before, IMHO SO has wider audience than *vi.stacks*, the question is consistent with what is usually being asked under [tag:vim]. – Konrad Jul 01 '18 at 20:09
  • @phd If the questions about [tag:vim] should be concerned with VimL only there should be tag for that. In my view this merits wider discussion on meta as folk it's not uncommon for people to ask about vim config having, vim tag. I'm aware of *vi.stacks* but it's in its infancy and SO is much bigger. – Konrad Jul 01 '18 at 20:20
  • *the question is consistent with what is usually being asked at SO* If it's true t's a problem IMNSHO and it should be fixed. Tag [vim] is for questions about programming in Vim Script and about using vim for programming. See https://stackoverflow.com/tags/vim/info: If your question is not about programming, consider posting Vim related questions at the dedicated Vim Stack Exchange site. – phd Jul 01 '18 at 20:21

1 Answers1

3

You could set the option:

set noshowmode

This will prevent printing mode messages like -- INSERT -- or -- VISUAL LINE --. Therefore the information printed by g_ctrl-G will remain in the last line until a new command-line command is entered.

builder-7000
  • 7,131
  • 3
  • 19
  • 43
  • Thanks that makes perfect sense. I use vim airline so so, which takes care of the mode change info so I do not need `-- INSERT ---` or visual notification. Out of curiosity, it would be good to know if it's possible to control for how long this text shows... – Konrad Jul 01 '18 at 19:59
  • So you want to toggle the `showmode` option after a certain amount of time? As far as I know there is no built-in function that provides this functionality. – builder-7000 Jul 01 '18 at 20:55