Skip to main content

No project description provided

Project description

VimQuestCLI

This is a vim implementation in python that tries to implement game using the vim shortcuts.

Why python ?

I love python. Maybe one day it's going to be converted in Rust (for easy webassembly and faster execution). But for now it's python 3.8.

Choice when doing executions

Executor :

  • local (the python vim implementation)
  • vim (calling vim to execute stuff, for compatibility tests)

Terminal handling :

  • Curses wrapper : the way it's usually done in python. It allows for curses to catch the input.
  • "manual" curses : Without using the full curses capabilities.

Execution loop :

  • One method to start the whole loop.
  • One method that have the input as argument and returns what to print.

The python version doesn't have just vim capabilities, but allows to expand for allowing for hooks and data attached to the cells.

Todo

  • Separate presentation layer

  • Add a vim executor (to be able to compare tests).

  • Have a context that is not a copy but modify itself (for speed).

  • Have a bunch of hooks, and use them to have game modes.

  • Have a command to choose between game modes.

  • See how neovim is made so I can use the same architecture.

  • Syntax highlighting for python.

  • Maybe have syntax highliting for game modes too ?

  • Solve the ANSI speed.

  • Activate the UTF-8, see how I can activate it.

  • Create docker images for website and terminal.

  • Add git hook for cleaning python before commit.

  • Use unicode characters (not necesseraly emojii) with colors for differents things happening.

BUG CORRECTION :

  • Clean codebase.
  • ANSI is blinking.
  • Image location is not working.
  • Size of the terminal is not used.
  • Unicode block behavior is inconsistent.
    • Maybe having replacement for unicode that include colors.

References

Now vim implementationthat I could use for corectness :

ncurses implementation : https://github.com/mscdex/node-ncurses Maybe this implementation would be easier to understand than the c ncurses one.

Next steps to cover

  • hjkl x
  • [number]command
  • i
  • aA
  • dd
  • wbe
  • v, Shift-v
  • ypP
  • "ci"

Next step.

Vim core. That execute the commands and return a status. From a Contains the screen size and

Vim window. That take that buffer and return a screen. (matrix of data points with metadata).

Attachable are game modes.

Then there is terminal that push characters and returns a

Use an alternate screen : https://stackoverflow.com/questions/11023929/using-the-alternate-screen-in-a-bash-script

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vim_quest_cli-0.1.7.tar.gz (27.7 kB view details)

Uploaded Source

Built Distribution

vim_quest_cli-0.1.7-py3-none-any.whl (37.7 kB view details)

Uploaded Python 3

File details

Details for the file vim_quest_cli-0.1.7.tar.gz.

File metadata

  • Download URL: vim_quest_cli-0.1.7.tar.gz
  • Upload date:
  • Size: 27.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.2 CPython/3.8.10 Linux/5.4.72-microsoft-standard-WSL2

File hashes

Hashes for vim_quest_cli-0.1.7.tar.gz
Algorithm Hash digest
SHA256 aff9f4e59e21f2198252e71b5b1baf744d880818778503c2245c2ac54bf7dbc1
MD5 918cbdc0e59d712ae6eb54f288a6cc7f
BLAKE2b-256 752f51b8e9be787288fbaa61ea711acf45b3298e4b27e72e5ad71480ded7cba8

See more details on using hashes here.

Provenance

File details

Details for the file vim_quest_cli-0.1.7-py3-none-any.whl.

File metadata

  • Download URL: vim_quest_cli-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 37.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.2 CPython/3.8.10 Linux/5.4.72-microsoft-standard-WSL2

File hashes

Hashes for vim_quest_cli-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 ee8b371871a34d8e5767dd9ae3ca9e12741724b1c4a62c7373f40ac4cdc0b372
MD5 fb0578ad5e491e67520a0c6e8b11f6cd
BLAKE2b-256 3469f522a9a34250ec73ef0e4835f80b61ccfe3166f23dbf363252f5fd5c15b7

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page