displaying line count of highlighted lines

34 views
Skip to first unread message

jose isaias cabrera

unread,
Jul 4, 2022, 12:17:07 PM7/4/22
to vim_use

Hi.
I just installed a term-only Ubuntu server with vim, and I would like to show the highlighted lines count like my gvim one does in another system. For example, when I highlight 12 lines on the gvim instance in another server, at the bottom of the gvim screen I get,

-- VISUAL --                                                                       12                                1251, 16              37%

but, when I do the same on the ssh'ed xterm, I get,

".vimrc" 93L, 2275C                                                                         1,1           Top

I know is problem some type of setting on the .vimrc, and perhaps someone can help with this. Any help would be greatly appreciated. Thanks.

josé

BPJ

unread,
Jul 5, 2022, 5:46:42 AM7/5/22
to vim_use
I don't know how you show it in the status line but g<C-g> will show it in a message. I guess you could write a function to capture the message, parse it with a regex and display it in the status line whenever you make a selection, but there probably is an easier way.



josé

--
--
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+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/c3745799-08c6-461a-ac96-8b3cb1f539d1n%40googlegroups.com.

Christian Brabandt

unread,
Jul 5, 2022, 2:00:28 PM7/5/22
to vim_use
Try

:set showcmd


Best,
Christian
--
Zum Fortsetzen drücken sie eine beliebe Taste, zum Abbrechen eine
andere Taste.

jose isaias cabrera

unread,
Jul 5, 2022, 2:05:43 PM7/5/22
to vim_use

Hmmmm... Maybe that is what the other one has. Let me see if I can see if the vimrc has anything there. Thanks.

jose isaias cabrera

unread,
Jul 13, 2022, 1:57:01 PM7/13/22
to vim_use

Yep, have that on the .vimrc set, but no tabacco:

:set
--- Options ---
  autoindent          hidden              shiftwidth=2        ttyfast
  diffexpr=MyDiff()   hlsearch            showcmd             ttymouse=xterm
  expandtab           ruler               showmatch           window=59
  filetype=python     scroll=29           softtabstop=2       winheight=50
  helplang=en         scrolloff=10        syntax=python       wrapmargin=4
  backspace=indent,eol,start
  clipboard=autoselect
  fileencoding=utf-8
  fileencodings=ucs-bom,utf-8,default,latin1
  statusline=%#warningmsg#%{SyntasticStatuslineFlag()}%*
  suffixes=.bak,~,.swp,.o,.info,.aux,.log,.dvi,.bbl,.blg,.brf,.cb,.ind,.idx,.ilg
,.inx,.out,.toc
Press ENTER or type command to continue
Reply all
Reply to author
Forward
0 new messages