Skip to content

Commit

Permalink
Merge branch 'master' into fix/editor/1408/wheel-smooth-scroll
Browse files Browse the repository at this point in the history
  • Loading branch information
bryphe committed Jun 1, 2021
2 parents 776cad9 + e7800a2 commit 9b1ecb0
Show file tree
Hide file tree
Showing 39 changed files with 801 additions and 245 deletions.
7 changes: 7 additions & 0 deletions CHANGES_CURRENT.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
### Features

- #3613 - Input: add Emoji & Symbols panel on macOS

### Bug Fixes

- #3597 - Registration: Trim license key before submitting
Expand All @@ -8,15 +10,20 @@
- #3604 - Editor: Fix CodeLens blocking mousewheel
- #3606 - Vim: Fix hang when using `function` in `experimental.viml`
- #3616 - OSX: Fix crash on IME switch (fixes #3614)
- #3621 - Sneak: Grab editor focus when using sneak to jump to an editor (fixes #2569)
- #3630 - Editor: Cursor / line number disappearing when deleting entire buffer (fixes #3629)
- #3637 - Extensions: Unable to enter API key for WakaTime (fixes #3619)

### Performance

### Documentation

- #3601 - Visual Mode: Add note about switching to block mode on Windows / Linux (thanks @rogererens !)
- #3620 - Building: Add steps for Docker based build.

### Refactoring

- #3595 - Dependency: OCaml -> 4.12
- #3624 - Dependency: SDL2 -> 2.0.14 (thanks @zbaylin !)

### Infrastructure
27 changes: 27 additions & 0 deletions ThirdPartyLicenses.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ This project incorporates components from the projects listed below. The origina
31. vscode-codicons (https://github.com/microsoft/vscode-codicons)
32. openssl (https://github.com/openssl/openssl)
33. fzy (https://github.com/jhawthorn/fzy)
34. Feather Icons (https://feathericons.com)

%% JetBrainsMono NOTICES AND INFORMATION BEGIN HERE
==============================================
Expand Down Expand Up @@ -3953,3 +3954,29 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
==============================================
END of fzy NOTICES AND INFORMATION

%% Feather Icons NOTICES AND INFORMATION BEGIN HERE
==============================================
The MIT License (MIT)

Copyright (c) 2013-2017 Cole Bemis

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
==============================================
%END of Feather Icons NOTICES AND INFORMATION
24 changes: 12 additions & 12 deletions bench.esy.lock/index.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

63 changes: 61 additions & 2 deletions docs/docs/for-developers/building.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,29 @@ sidebar_label: Building from Source

# Building the Editor

Oni2 can be built from source using the following setup and steps!

This takes around 30-40 mins on an "average" machine, as we need to setup a brand new
set of tooling for both OCaml and Skia, which are both fairly large. Repeat builds
should take only a few seconds, as build artifacts are cached by `esy`.

## Prerequisites

When performing a non-Docker based install, you'll need the following dependencies on
all platforms. There are additional platform specific dependencies linked below.

- Install [Git](https://git-scm.com/)
- Install [Node](https://nodejs.org/en)
- Install [Esy](https://esy.sh) (__0.6.10__ or above is required, but the latest version is recommended: `npm install -g esy@latest`)
> __NOTE:__ **Linux-only**: if you need to install using `sudo npm install -g esy@latest` then your NPM installation **might be broken** follow [the instruction here to fix it](https://docs.npmjs.com/resolving-eacces-permissions-errors-when-installing-packages-globally) this is related to this issue [esy/esy#1099.](https://github.com/esy/esy/issues/1099)
- Check the Revery dependencies for your platform: https://github.com/revery-ui/revery/wiki/Building-&-Installing.
- __Windows-only__: Run `npm install -g windows-build-tools` (this installs some build tools that aren't included by default on Windows)
- Install any other system packages required by Oni2 dependencies, as outlined below.

## Dependencies

All platforms require `git`, `node` and `esy`, and the ones outlined in the `revery` docs:
All platforms require `git`, `node` and `esy`, and anything outlined in the `revery` docs:
https://github.com/revery-ui/revery/wiki/Building-&-Installing.

### Windows
Expand All @@ -37,8 +47,57 @@ Some Linux distributions may need other packages:
- Fedora/CentOS : `libXt-devel`, `libSM-devel`, `libICE-devel`, `libacl-devel` and `ncurses-devel ` for `libvim`
- Xorg related libraries: `libglu1-mesa-dev`, `libxxf86vm-dev` and `libxkbfile-dev`.

## Docker build (Linux)

The docker build path is the most contained path, and as such may be the easiest way on
some Linux distributions. We include a Dockerfile in `scripts/docker/centos` that we use
for all our CI builds, so it should be up-to-date! This will produce an AppImage and
`tar.gz` both suitable for Linux. Containers are not provided for other distributions
(we only need this one), but should serve as a good base if specific changes are needed.

The steps to use it are as follows:

```sh
# Clone the Oni2 repo
git clone https://github.com/onivim/oni2
cd oni2

# Use our included script to setup a docker container
docker build --network=host -t centos scripts/docker/centos

# Now use that container to actually build an Oni2 AppImage.
# Bind the Oni2 folder to the volume so that it can access the source.
# We also bind ~/.esy such that the build steps are cached locally.
# This means subsequent builds are fast.
# You can clean that folder out to save space at the cost of build time for future
# builds.
docker container run --rm \
--name centos \
--network=host \
--volume `pwd`:/oni2 \
--volume ~/.esy:/esy/store \
--cap-add SYS_ADMIN \
--device /dev/fuse \
--security-opt apparmor:unconfined \
centos \
/bin/bash -c 'cd oni2 && ./scripts/docker-build.sh'

# Wait 30-40 minutes on an average machine...
# This takes up to about an hour on CI though, so may be worth
# leaving for a bit!
# During the initial esy steps, there isn't much output, so you
# may end up waiting on `info fetching: done`. It will eventually
# finish the initial install and move on to building, which has output.

# Done!
# This should drop an AppImage binary off in _release in the Oni2
# folder.

# You can run a health check if you would like...
_release/Onivim2.AppDir/usr/bin/Oni2 -f --no-log-colors --checkhealth
```

## Build and Run
## Build and Run from Source

### Clone repository

Expand Down
138 changes: 69 additions & 69 deletions docs/website/pages/en/tips-and-tricks.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,72 +9,72 @@ const React = require('react');

function Key(props) {
return <li>
<kbd>{props.name}</kbd> {" - " + props.description}</li>;
<kbd>{props.name}</kbd> {" - " + props.description}</li>;
};

const tips = [
{
title: "Scroll relative to cursor",
description: "Use zz, zb, and zt to scroll the buffer, relative to cursor position",
keys: [
<Key name="zz" description="Center cursor line in viewport" />,
<Key name="zt" description="Move viewport such that cursor line is at the top" />,
<Key name="zb" description="Move viewport such that cursor line is at the bottom" />,
],
videoFile: "RodY2O1xFfI"
},
{
title: "Move up and down a buffer",
description: "Use gg and G to quickly move up and down the buffer.",
keys: [
<Key name="gg" description="move to first line in buffer" />,
<Key name="G" description="move to last line in buffer" />,
<Key name="50G" description="move to line 50 in buffer" />,
],
videoFile: "xh4TTWy-okQ"
},
{
title: "Working with window splits",
description: "It's easy to create and navigate window splits in Onivim, without touching the mouse.",
keys: [
<Key name="Control+w v" description="Create new vertical split" />,
<Key name="Control+w s" description="Create new horizontal split" />,
<Key name="Control+w h" description="Move a split left" />,
<Key name="Control+w j" description="Move a split down" />,
<Key name="Control+w l" description="Move a split right" />,
<Key name="Control+w l" description="Move a split up" />,
],
videoFile: "Xpfb2pMmeVg",
},
{
title: "Edit strings like a Ninja",
description: "The change operator, combined with the in-string motion, is a powerful combo - letting you strike and edit strings from afar.",
keys: [
<Key name="c" description="Change operator" />,
<Key name={`i"`} description="In string motion" />,
],
videoFile: "DMgNUMfGAQ4",
}
//{
// title: "Jump around with G",
// description: <div>
// <ul>
// <li><kbd>gg</kbd> - move to top of buffer</li>
// <li><kbd>G</kbd> - move to bottom of buffer</li>
// <li><kbd>50G</kbd> - move to line 50</li>
// </ul>
// </div>,
// videoFile: "demo-gg"
//},
//{
// title: "Edit Strings like a Ninja",
// description: <div>
// <ul>
// <li><kbd>ci"</kbd> - change inside string</li>
// </ul>
// </div>,
// videoFile: "TODO"
//}
{
title: "Scroll relative to cursor",
description: "Use zz, zb, and zt to scroll the buffer, relative to cursor position",
keys: [
<Key name="zz" description="Center cursor line in viewport" />,
<Key name="zt" description="Move viewport such that cursor line is at the top" />,
<Key name="zb" description="Move viewport such that cursor line is at the bottom" />,
],
videoFile: "RodY2O1xFfI"
},
{
title: "Move up and down a buffer",
description: "Use gg and G to quickly move up and down the buffer.",
keys: [
<Key name="gg" description="move to first line in buffer" />,
<Key name="G" description="move to last line in buffer" />,
<Key name="50G" description="move to line 50 in buffer" />,
],
videoFile: "xh4TTWy-okQ"
},
{
title: "Working with window splits",
description: "It's easy to create and navigate window splits in Onivim, without touching the mouse.",
keys: [
<Key name="Control+w v" description="Create new vertical split" />,
<Key name="Control+w s" description="Create new horizontal split" />,
<Key name="Control+w h" description="Focus window to the left of the current one" />,
<Key name="Control+w j" description="Focus window below the current one" />,
<Key name="Control+w l" description="Focus window to the right of the current one" />,
<Key name="Control+w k" description="Focus window above the current one" />,
],
videoFile: "Xpfb2pMmeVg",
},
{
title: "Edit strings like a Ninja",
description: "The change operator, combined with the in-string motion, is a powerful combo - letting you strike and edit strings from afar.",
keys: [
<Key name="c" description="Change operator" />,
<Key name={`i"`} description="In string motion" />,
],
videoFile: "DMgNUMfGAQ4",
}
//{
// title: "Jump around with G",
// description: <div>
// <ul>
// <li><kbd>gg</kbd> - move to top of buffer</li>
// <li><kbd>G</kbd> - move to bottom of buffer</li>
// <li><kbd>50G</kbd> - move to line 50</li>
// </ul>
// </div>,
// videoFile: "demo-gg"
//},
//{
// title: "Edit Strings like a Ninja",
// description: <div>
// <ul>
// <li><kbd>ci"</kbd> - change inside string</li>
// </ul>
// </div>,
// videoFile: "TODO"
//}
];

function Tip(props) {
Expand All @@ -90,10 +90,10 @@ function Tip(props) {
</div>
<div className="tip-video">
<iframe
width="480"
height="270"
src={"https://www.youtube.com/embed/" + props.videoFile + "?&autoplay=1&controls=0&modestbranding=1&loop=1&playlist=" + props.videoFile}
frameBorder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowFullScreen>
width="480"
height="270"
src={"https://www.youtube.com/embed/" + props.videoFile + "?&autoplay=1&controls=0&modestbranding=1&loop=1&playlist=" + props.videoFile}
frameBorder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowFullScreen>
</iframe>
</div>
</div>
Expand All @@ -105,10 +105,10 @@ function TipContainer(_props) {
//const {config: siteConfig, language = ''} = props;

const result = tips.map((tip) => <Tip title={tip.title}
description={tip.description} keys={tip.keys} videoFile={tip.videoFile} />);
description={tip.description} keys={tip.keys} videoFile={tip.videoFile} />);

return <div className="tips">
{result}
{result}
</div>
}

Expand Down
Loading

0 comments on commit 9b1ecb0

Please sign in to comment.