GithubHelp home page GithubHelp logo

botanjs-vim's Introduction

VimArea is a lightweight functional vim using the screen buffer approach. What I am trying to do is to achieve that smooth-vim-feeling as close as possible to the original Vim in a general terminal.

Downloads

Please head to the release section of this repo.

Dependency

All downloadable versions are standalone. For development, see the bottom of this readme.

Demo

Visit the demo over here

As of version 1.0.x

Common commands are now supported. I am now going to list the commands that is yet to be made.

Commands that are going to implement soon:
auto indent ( new line from bracket )
:'<,'>

Commands that are planning to implement in near future:
macro
code auto format "="
:set nowrap

Commands that are planning to implement in far future:
Split screen - this is possible by design

Commands that are impossible to implement:
VISUAL BLOCK - Multiple highlighting in textarea is not possible
Syntax highlighting - individual styles cannot be applied into a textarea
plugins - I am NOT going to make this

How does it work

By screen buffer, it means that the textarea is treated as a screen. You are not directly interacting with the textarea. Instead you type into the script, then the result is rendered through the textarea.

Why use a screen buffer

By treating the textarea as a screen. I could archive almost everything except for coloring. Plus it is easier to precisely track the cursor in this way.

Visit this blog entry for details.

How the source code works

This is based on a framework I wrote called BotanJS. Which is a frontend framework & Service API that is so big that I am too busy ( lazy ) to explain. If you are only interested in the Vim itself only. It is recommended to download the compiled source code provided in the demo site above.

If you are also interested in BotanJS. Please head to the project page here. Warning, it might NOT be easy to understand. ( but it should be easy to setup )

Why make another one?

Because ( at the time of this repository created ) the addon wasavi in firefox does not work. I know people are busy so fuck me I am going to make one myself, alright?

Use wasavi if you can

wasavi is so good! This is a must-have plugin in Google Chrome. If you haven't heard of that yet seriously go use it now!

I tried porting it into the browser tho. But I am too stupid to do that. But still I highly recommend using it.

How can I contribute?

First, you need to understand the framework behind it ( see "How the source code works" above ). Setup the environment and you are ready to go! Feel free to ask by opening an issue :)

botanjs-vim's People

Contributors

tgckpg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

botanjs-vim's Issues

Remapping key bindings?

First of all, this project is incredible. I'm so glad this exists, thank you for making this.

I would really like to escape into normal mode by hitting "jk" or "kj" instead of going all the way over to the key.

And Is it possible to map capital J & K to jump 5 lines down/up?

These are my favorite vim settings, and I was wondering if you can show me how to edit this project to make these work.

Thank you.

gj / gk

Reference

gj and gk move display lines down or up. If you have a long line and :set wrap then one physical line may span several lines of display.

U command

From :help U

Undo all latest changes on one line, the line where the latest change was made. U itself also counts as a change, and thus U undoes a previous U.

c-e / c-y

If I am not mistaken they act like scroll lock.
Reference

< c-e > scrolls the view window down, leaving the cursor on the same line. .... < c-y > .. do the same things but upwards.

c-d / c-u

Reference

< c-d > scrolls down, but moving the cursor (and different number of lines by default ... < c-u > do the same things but upwards

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.