Git Product home page Git Product logo

slatevim's Introduction

SlateVim


๐Ÿ“– Introduction

A shared vim editor built on slate.js for the enthusiasts out there!

Collaborative tools are the need of the hour. Services like google docs work great, but developers sometimes need a quick share and an environment they are used to. Here is where SlateVim comes in.

Used making Slate.js it offers an excellent text editor along with the commands vim is famous for. It packages the power of Vim with the comfort of Google Docs into one.

โš™๏ธ Preliminaries

Installation and set up

  1. Ensure that you have node installed.
  2. Ensure that you have yarn installed.
> npm install yarn
> yarn --version
1.22.4
  1. Clone the repository.
> git clone https://github.com/ridhambhat/SlateVim.git && cd SlateVim
  1. Install required dependencies with yarn.
> yarn install
  1. Start development client.
> npm start
  1. Navigate to http://localhost:3000.

๐Ÿ‘จโ€๐Ÿ’ป Command Summary

Normal Mode

Adapted from Vim Cheat Sheet.

Switch mode

Action Command
Change to Insert Mode i

Copy, cut, paste

Action Command
Yank (copy) line yy
Yank (copy) from cursor position to start of next word yw
Yank (copy) from cursor position to end of line y$
Yank (copy) from cursor position to start of line y0
Paste after cursor p
Paste before cursor P
Delete (cut) line dd
Delete (cut) from cursor position to start of next word dw
Delete (cut) from cursor position to end of word de
Delete (cut) from cursor position backwards to start of word db
Delete (cut) from cursor position to end of line D or d$
Delete (cut) from cursor position to start of line d0
Delete (cut) single character x
Cut line and enter Insert mode cc
Cut from position to start of next word, then enters Insert Mode cw
Cut from position to end of word, then enters Insert Mode ce
Delete (cut) from cursor position backwards to start of word, then enters Insert Mode cb
Cut to end of line and enter Insert mode C

Cursor movement

Action Command
Move cursor left h
Move cursor down j
Move cursor up k
Move cursor right l
Jump forwards to start of word w
Jump forwards to end of word e
Jump backward to start of word b
Jump to start of line 0
Jump to end of line $
Jump to start of document gg
Jump to start of last line G

Indenting, dedenting

Action Command
Indent line one shiftwidth (4 spaces) >>
Dedent line one shiftwidth (4 spaces) <<

Undo, redo

Action Command
Undo u
Redo Ctrl + r

Insert Mode

Switch mode

Action Command
Change to Normal Mode Escape

๐Ÿฑโ€๐Ÿ‘ค Challenges we ran into

  • Handling change events in Slate.js to sync text across users.
  • GraphQL on AWS Amplify gave some trouble while storing the user data.

๐Ÿ† Accomplishments that we are proud of

  • A working demo at the end of the week while working with new technologies.
  • Integrating GraphQL swiftly was a great experience.

๐Ÿงญ What we learnt

  • After digging into the documentation and codebase of Slate.js, we are beginning to understand how it works from the inside.
  • Have a better understanding of AWS Amplify and serverless technology.
  • Using GraphQL firsthand introduced us to a new way of working with the backend.

๐Ÿ“œ LICENSE

Apache License

slatevim's People

Contributors

exuberant-duck avatar ridhambhat avatar zhixiangteoh avatar

Stargazers

 avatar

Watchers

 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.