Coder Social home page Coder Social logo

uvim's Introduction

Concept

uvim - stands for 'ultra vim', is a configuration project that aims to support both vim and neovim. It consists of shared core config written in Lua, wrapped into Vim and Neovim specific shell.

End vision

File structure

.
├── neovim/
│   ├── lua -> ../shared/lua/
│   └── init.lua              # Entry point for Neovim
├── shared/
│   └── lua/                  # Shared Lua config folder
│       └── aj/
│           └── config.lua
└── vim/
    ├── lua -> ../shared/lua/
    └── vimrc                 # Entry point for Vim

Quality attributes

  • Compatibility: Vim 8.2+, Neovim latest stable (0.7) and dev (0.8)
  • Performance: startup time under from 100ms (desired) to 200ms (acceptable)

Benchmarking

In order to track startup time, there is useful script at test/bench.sh.

The script relies on:

  • bash
  • awk
  • vim-startuptime (install with go install github.com/rhysd/vim-startuptime@latest)

When you run the bench.sh, it will write smth like this:

bench: Running vim-startuptime...
bench: Total avg time: 167.449200ms
bench: error: Total avg time exceeds 100ms

The line bench: error: ... is printed only in case of exceeding 100ms limit and puts exit code to 1.

Git hook for 'pre-push'

The bench.sh was designed to be used as 'pre-push' Git hook. Just create a symlink like:

ln -s ../../test/bench.sh .git/hooks/pre-push

Quality test cases (WIP)

Key Description
QA1 Works with Vim 8.2+
QA2 Works with latest stable of Neovim (currently 0.7)
QA3 Works with latest dev version of Neovim (currently 0.8)
QA4 Startup time doesn't exceed 100ms on main machine (MacBook Pro)

TODO

  • Implement basic Vim version, by moving existing config to Lua
    • options
    • key mappings
    • automatic Lua config reload on save
    • plugins
    • auto commands
    • logic around 'has_guicolors'
    • colorscheme
    • syntax/filetype instructions
    • global varibles
    • functions
    • handle termcap options just for Vim
  • Implement basic Neovim version
    • options
    • key mappings
    • automatic Lua config reload on save
    • automatic PlugInstall
    • plugins
    • auto commands
    • logic around 'has_guicolors'
    • colorscheme
    • syntax/filetype instructions
    • global varibles
    • functions
    • add hooks (for example, after plugins are installed)
  • Custom commands
  • Define interface of 'aj.config' Lua module
  • Find out how to write logs during configuration
  • Implement robust LSP support
    • key mappings should be defined only in LSP enabled buffers
  • Fix ALE's errors highlights (they are not colored correctly)

uvim's People

Contributors

ajukraine avatar

Watchers

 avatar  avatar

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.