Coder Social home page Coder Social logo

eo-vim's Introduction

logo

EO principles respected here

Lines of code Hits-of-Code CI License

This plugin makes Vim highlight syntax in EO progams.

The simplest way to install is by adding it to the standard Vim runtime path:

git clone https://github.com/objectionary/eo-vim.git ~/.vim/pack/plugins/start/eo-vim

However, you can also use some popular package managers:

  • Vim 8 packages
    • git clone https://github.com/objectionary/eo-vim.git ~/.vim/pack/plugins/start/eo-vim
  • Neovim packages
    • git clone https://github.com/objectionary/eo-vim.git ~/.local/share/nvim/site/pack/plugins/start/eo-vim
  • Pathogen
    • git clone https://github.com/objectionary/eo-vim.git ~/.vim/bundle/eo-vim
  • Vundle
    • git clone https://github.com/objectionary/eo-vim.git ~/.vim/bundle/eo-vim
    • add Plugin 'eo-vim' to your ~/.vimrc and run PluginInstall.

Configuration

If you use tabs in Vim, it is necessary to set the 'expandtab' option: :set expandtab due to compiler specifics. Also, the following line will be useful if you don't want to set this every time you start the Vim:

autocmd BufEnter *.eo set ai ts=2 st=2 expandtab

You can add it to your $HOME/.vimrc configuration file. This will work only with .eo files.

Arguments ts and st set number of space characters that will be inserted when the tab key is pressed. You can change it as you wish.

More information by:

  • :help 'tabstop'
  • :help 'shiftwidth'
  • :help 'expandtab'
  • :help 'softtabstop'

If you want to change colors in vim as you wish, you can see the list of highlight groups here.

Highlight setting

You can change colors in syntax highlighting on your own by using highlight command in vim, for example:

:highlight Comment term=bold ctermfg=Cyan guifg=#80a0ff gui=bold

Here is the list of highlight groups and examples in code:

Group          | Example
-------------- | ---------------
Keyword        | @, &, $, ^
Comment        | #Here is comment
Number         | Ints and floats
String         | "Hello, world"
Boolean        | TRUE, FALSE and bytes literals
Todo           | TODO FIXME NOTE
DotName        | .plus .write .smth etc.
ObjectName     | All objects except abstract and dot-notation
AbstractName   | Abstact objects
Define         | alias package rt etc.
Statement      | +rt jvm org.eolang...

More information by :highlight and :help 'highlight'

How to Contribute

For testing eo-vim plugin we use a testing framework for Vim script, so you can add some tests for your new features with this soft. It will be run by CI.

All PRs are welcome. If you are planning to contribute a large patch or to integrate a new tool or some features, please create an issue first to get any upfront questions or design decisions out of the way first. Then, you may fork repository, make changes and send us a pull request.

eo-vim's People

Contributors

ivan-egorov42 avatar renovate[bot] avatar yegor256 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

ivan-egorov42

eo-vim's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/main.yml
  • actions/checkout v3
  • rhysd/action-setup-vim v1.2.13
  • actions/checkout v3
  • rhysd/action-setup-vim v1

  • Check this box to trigger a request for Renovate to run again on this repository

Tests

@ivan-egorov42
As I see, there are no syntax highlighting tests. There is a good testing tool tvim that can help you in this case.

why two installation steps?

README says that I need to do mkdir -p first and then cd to this dir.

Just one step will be enough. Just mkdir -p will ensure that the directory is present.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.