Monday, May 20, 2019

Re: Vim on MacOS Incorrectly Indenting

Hello Adrian,

Adrian Keister schrieb am 20.05.2019 um 18:22:
> On Monday, May 20, 2019 at 2:15:08 AM UTC-5, jott...@googlemail.com wrote:
>> Hi,
>>
>> Adrian Keister schrieb am 17.05.2019 um 19:19:
>>> I'm having difficulty with vim on Mac OS. It's indenting incorrectly. The attached txt file is the test file, and the two screenshots show how different they look on Mac versus Windows. The Windows gVim is the look I want. I've tried everything from brew install vim to re-installing MacVim, no joy. It does not appear to be a vimrc issue, because I've tried the troubleshotting page here, with no joy:
>>>
>>> https://github.com/macvim-dev/macvim/wiki/Troubleshooting
>>>
>>> Any ideas? Thanks for your time!
>>
>> your file contains tabs at the start of lines 5 to 9. On Windows the 'tabstop'
>> option is probably set to 4, while on Mac it seems to be 8 (the default).
>
> Jürgen,
>
> That could be it, but then I have two questions:
>
> 1. Why can't I navigate to the very beginning of the line where the indenting is different? This is behavior on the Mac, to be clear, not on Windows.

you have tabs at the start of line. Normally when on a tab the cursor is
put at the end of the tab. You can change this with the 'virtualedit'
option. Set it to 'all' and you can move through a tab cell by cell.

> 2. Why doesn't adding
> set tabstop=4
> in my Mac's vimrc fix the problem?

Maybe that option has been changed by a (filetype) plugin. If you
execute

:verbose set tabstop?

Vim will tell you where that option was changed last.

Regards,
Jürgen

--
--
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 on the web visit https://groups.google.com/d/msgid/vim_use/9caf0b9b-b957-12cf-0e7d-5fa08c61ad7c%40googlemail.com.
For more options, visit https://groups.google.com/d/optout.

No comments: