inaka / erlang_guidelines

Inaka's Erlang Coding Guidelines
Apache License 2.0
623 stars 121 forks source link

vim syntax plugin? #69

Closed benoitc closed 6 years ago

benoitc commented 7 years ago

do you know any vim syntax plugin that handle all the guidelines? or how to configure vim-erlang?

elbrujohalcon commented 7 years ago

I don't, but maybe @igaray (a vim user) knows?

igaray commented 7 years ago

I previously used vimerl (defunct and now superceded by https://github.com/vim-erlang) and Csaba's plugin (can't find it, maybe @elbrujohalcon can ask), but guideline enforcement was manual, except for setting indentation to 2 spaces for most projects.

elbrujohalcon commented 7 years ago

I can't find @hcs42's plugin, but I found @hcs42 :P

igaray commented 7 years ago

@benoitc in any case, if it's of any interest to you at all, here is my vim config, but it's not erlang nor erlang-guideline specific.

benoitc commented 7 years ago

@igaray ok thanks. looking at it

cloud8421 commented 7 years ago

@benoitc I'm using a few plugins to have syntax, some generators and inline syntax checks, see here for their names (they're all well documented - @elbrujohalcon they're the ones from @hcs42 )

hcs42 commented 7 years ago

The vim-erlang-runtime repository contains the syntax highlight and indentation plugins for Vim. These plugins have been included in Vim since 2013 and haven't changed much since late 2014, so you don't need to install them if you have a reasonably recent Vim.

The syntax highlight plugin doesn't have much to do with coding conventions. It tries its best to highlight any Erlang source file; it won't highlight possible problems or instances of breaking the guideline.

The indentation follows the Emacs indentation style (with a few notable exceptions), which is a convention in itself. The Inaka guidelines mention only two things regarding indentation ("Spaces over tabs, 2 space indentation"). These are both configurable on the Vim level, and any indentation plugin will respect that.

In short, there is no Vim plugin in vim-erlang related to these guidelines.