0

As I am moving from Windows to Linux for my development machine, I have noticed a difference in vim between the Windows version and the Linux version. The windows will show you the number of highlighted columns at the bottom of the screen where the Linux version does not (or at least how I have it configured). I have looked at the differences between the two settings, and nothing sticks out. What am I missing?

Thanks

2
  • What is "number of highlighted columns"? Do you think the position of the cursor in the bottom right? – peterh Jun 19 '18 at 5:07
  • You are missing a :set showcmd setting – Christian Brabandt Jun 19 '18 at 5:25
0

After opening vim, execute this:

:set showcmd

Or, add this to your vimrc for permanent solution:

set showcmd

From the help docs, :h showcmd:

'showcmd' 'sc'      boolean (Vim default: on, Vi default: off)
            global
Show (partial) command in the last line of the screen.  Set this
option off if your terminal is slow.
In Visual mode the size of the selected area is shown:
- When selecting characters within a line, the number of characters.
  If the number of bytes is different it is also displayed: "2-6"
  means two characters and six bytes.
- When selecting more than one line, the number of lines.
- When selecting a block, the size in screen characters:
  {lines}x{columns}.
1
  • If the answer is correct, then consider marking it correct for future references. – klaus Jun 20 '18 at 13:25
0

By the way, Windows has a default vimrc file called _vimrc. Most GNU/Linux distros do not have a default vimrc file. Look into the _vimrc file on Windows to change any options you want.

2
  • I looked over the default _vimrc on my Windows machine, and there is no reference to the showcmd at all plus when I perform the :set command again no reference so guessing this is compile option that is enabled on the Windows builds. – Dekernel Jun 21 '18 at 17:31
  • What do you mean most GNU/Linux distros don't have a default vimrc? Of course there is a default vimrc. Look at your ~/.vimrc – klaus Jun 22 '18 at 3:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.