[kwlug-disc] Syntax and indenting in vim 8.0 driving me crazy ...

Khalid Baheyeldin kb at 2bits.com
Tue Feb 20 11:09:31 EST 2018


An update ...

Thanks to Paul Nijjar, I now have a solution (of sorts).

By having this line in my .vimrc, the syntax highlighting is restored.

:syntax on

Autoindents are disabled, but that is better than frustratingly wrong
autointendation.


On Mon, Feb 19, 2018 at 6:27 PM, Khalid Baheyeldin <kb at 2bits.com> wrote:

> For an editor, I have been using vi (then vim) for 31 years.
>
> For a long time I had my own customizations in .vimrc, or under .vim
> directory.
> But some time ago I discovered that I don't need these customization,
> since the default syntax, tab width, ..etc. all worked well.
>
> On my Ubuntu 16.04 boxes (this laptop, servers, ...etc.), I have vim 7.4,
> and all is good.
>
> When I got the new Raspberry Pi 3, I installed the latest Raspian on it,
> and that happened to be version 9. It came with vim 8.0.
>
> The packages I have installed are: vim, vim-common, vim-runtime and
> vim-tiny. /usr/bin/vi symlinks to /usr/bin/vim.basic.
>
> On the Ubuntu machines, with vim 7.4, it all works well. Syntax and
> indenting work correctly for the files I used on a daily basis, such as
> config files, .yaml, python, c, and php. I don't have a .vimrc file anymore.
>
> However, on Raspian 9's vim 8.0, syntax highlighting is correct, but
> indentation is wrong and it forces wrong indents when I add lines, ...etc.
>
> So, I thought that I would override indentation on the RPi using a .vimrc
> file. The problem is: once I have a .vimrc or .vim directory, all syntax
> highlighting goes away completely, even if the .vimrc file is empty! That
> is not the behaviour on Ubuntu: a .vimrc does not cause syntax highlighting
> to be disabled.
>
> One way to solve this is to copy all the syntax stuff from
> /usr/share/vim80/* into my .vimrc directory, and edit it to remove the
> offending indentation. But that would be duplication, and not the proper
> way of doing this.
>
> So:
>
> Anyone encounter this issue?
>
> What are good ways to solve it, other than the duplicating above?
>
> --
> Khalid M. Baheyeldin
> 2bits.com, Inc.
> Fast Reliable Drupal
> Drupal optimization, development, customization and consulting.
> Simplicity is prerequisite for reliability. --  Edsger W.Dijkstra
> Simplicity is the ultimate sophistication. --   Leonardo da Vinci
> For every complex problem, there is an answer that is clear, simple, and
> wrong." -- H.L. Mencken
>



-- 
Khalid M. Baheyeldin
2bits.com, Inc.
Fast Reliable Drupal
Drupal optimization, development, customization and consulting.
Simplicity is prerequisite for reliability. --  Edsger W.Dijkstra
Simplicity is the ultimate sophistication. --   Leonardo da Vinci
For every complex problem, there is an answer that is clear, simple, and
wrong." -- H.L. Mencken
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://kwlug.org/pipermail/kwlug-disc_kwlug.org/attachments/20180220/3e5cfa9f/attachment.htm>


More information about the kwlug-disc mailing list