Skip to content

BaksiLi/Onesimus

Repository files navigation

Onesimos Vim

GitHub GitHub release (latest SemVer including pre-releases) GitHub repo size Platform Contribute

Onesimos ('helpful', Latinized Onesimus) is a Vim configuration.

It aims to provide a vim-style experience for both the daily uses and academic production.

General configuration has taken account of sensible.vim which is probably the highest common factor of many configurations. Other configurations, e.g. keymaps, are following the principle of Convention over configuration.

Any concerns related to this repository can be issued.

Installation

Install & Update Script

wget https://raw.githubusercontent.com/BaksiLi/Onesimos/master/install.sh && bash ./install.sh

Use git pull origin master to update. conflict

Goals

  • Project

    • Register Onesimos as a Plugin; Write a doc
    • Implement something like emacs' list-packages. The first time installation will pop up a checklist of what language to support, and puts those in the custom plugin file
    • Full compatibility with Linux (See Compatibility Milestone)
  • Functionality

    • Utilize Asynchronous technology in CompileRun and LSP
    • Word Processing Mode for Markdown and other plain text format
    • Built-in Literate Programming (+ REPL)
      • OpenREPL
      • Interactive Kernel
      • Haskell, Python, Wolfram Language

Keymaps

The default leader key is \.

Dotfile

  • <leader>ed to edit the dotfile while in vim;
  • <leader>sd to reload dotfile.
  • <leader>h to view help document.

Editing

  • lkj (insert mode) to change to normal mode.

  • <space> to fold manually.

  • <C-e> to expand snippets.

  • <leader>tr to toggle enable relative numbering.

  • <leader>tp to toggle rainbow parenthesis.

  • <leader>ti to toggle indent lines.

  • ]a/[a to go to the next/previous lint position.

  • ]b/[b to go to the next/previous buffer position.

  • gd to go to the current function definition.

  • gs/gS to search symbol in the workspace.

  • <leader>rn to refactor current cursor function.

IDE Features

  • <leader>ff to open fuzzy finder for the current working directory (LeaderF).

  • <leader>fl to open fuzzy finder for the current file.

  • <leader>fb to open fuzzy finder for buffers.

  • <leader>ft to open fuzzy finder for tags.

  • <F2> to Toggle Tagbar.

  • <F3> to Toggle File Tree (NERDTree).

  • <F4> to Open a terminal window REPL for the specific language of the file (Visual Mode will be supported soon).

  • <F5> to Run or Compile the current file.

    • Preview Markdown, Compile LaTeX, Run Python Script, Load Vim Settings and so on.
  • <F6> to Format the current file.

Explained

I have divided the traditional .vimrc into several files and folders in order to improve its scalability with more configurations and compatibility with multiple platforms.

File Structure
.
├── **customs**
├── **snippets**
├── **functions**
├── **plugconf**
├── init.vim
├── README.md
└── automated.vim

where there are (currently) three folders of differenciated functions and a few config file named init.vim (main) and automated.vim.

init.vim

This is the main config file, which was inherited from the old vimrc. As you could read from the above, it is acting as the outline of all other .vims.

automated.vim

This is where the system test and install prerequisites to support normal functions of plugins.

./custom

This is where to store custom configurations. plugins.vim is the Plugin configuration file.

./plugconf

The configurations of plugins could be found here with their name as the title followed by '.vim'.

./functions

The folder where customised functions are stored.

./snippets

The default folder for storing snippet rules for UltiSnips. The folder under ~/.vim should be of limited use.

Notice that these folders and files are auto-loaded even for the first time your .vimrc is sourced. Adding of any new functionalities will not need manual loading as placing them in their corresponding folder should suffice.

Acknowledgements

Unless otherwise specified, the repository is Copyright BaksiLi, and are licenced under the MIT Licence.

Copyright (c) 2020 BaksiLi