Skip to content

[Optinal] Configuration for Oni

ashfinal edited this page Mar 15, 2018 · 3 revisions

Copy those lines to your ~/.oni/config.tsx and fire Oni up!

Reference: https://github.com/onivim/oni/wiki/Configuration

import * as React from "/Applications/Oni.app/Contents/Resources/app/node_modules/react"
import * as Oni from "/Applications/Oni.app/Contents/Resources/app/node_modules/oni-api"

export const activate = (oni: Oni.Plugin.Api) => {
    console.log("config activated")

    oni.input.unbind("<c-g>") // make C-g work as expected in vim
    oni.input.bind("<s-c-g>", () => oni.commands.executeCommand("sneak.show")) // You can rebind Oni's behaviour to a new keybinding
    oni.input.unbind("<c-p>") // Disable Fuzzy Finder in Oni because it conflicts with yankring plugin

}

export const deactivate = (oni: Oni.Plugin.Api) => {
    console.log("config deactivated")
}

export const configuration = {
    activate,
    "oni.hideMenu": true, // Hide default menu, can be opened with <alt>
    "oni.loadInitVim": true, // Load user's init.vim
    "oni.useDefaultConfig": false, // Do not load Oni's init.vim
    "autoClosingPairs.enabled": false, // disable autoclosing pairs
    'commandline.mode': false, // Do not override commandline UI
    'wildmenu.mode': false, // Do not override wildmenu UI

    "statusbar.enabled": false,
    "sidebar.enabled": false,

    "tabs.mode": "buffers",
    "environment.additionalPaths": ['/usr/bin', '/usr/local/bin', '/Library/TeX/texbin'],

    "ui.animations.enabled": true,
    "ui.fontSmoothing": "auto",
    "ui.colorscheme": "onedark",
    "editor.fontSize": "12px",
    // "editor.fontFamily": "Monaco",

    // "oni.bookmarks": ["~/Documents"],
    "editor.completions.mode": "oni",

    // Customize UI colors
    // "colors.menu.highlight": "#eeeeee",
}
Clone this wiki locally