Coder Social home page Coder Social logo

pabled's Introduction

pabled

Pablo's own Editor

A small ncurses based console text editor with vi keybindings written in Python

This is a small editor I did with the intention of using it, it lacks vi POSIX compatibility and lacks a lot of commands, but it is easier to extend than others (at least for me)

Featuring:

  • Somehow vi-alike keybindings
  • Full UTF-8 support
  • Syntax highlighting using pygments for a whole lot of languages
  • A cool game (2048)
  • Hellfire!!

2048

hellfire

Requirements

Requires Python 3.5, setuptools and pygments. To install on Debian Wheezy:

    apt-get install python3-pygments python3-setuptools

You will need also a terminal emulator and locale that support UTF-8, and a font that can display Unicode graphic characters. As a reference, i use 'Bitstream Vera Sans Mono' in an xterm (xterm -fs 12 -fa 'Bitstream Vera Sans Mono')

If you have a terminal that supports 256 colors, they will be used. But only if you set the $TERM environment variable correctly. I do export TERM=xterm-256color in xterm and TERM=screen-256color in tmux to get 256 colors.

Installation

Install system-wide, with executable in /usr/local/bin/hellfire:

    sudo python3 ./setup.py install

Supported vi commands

Command mode:

  • Motion commands:
  • k, j, h, l, +, -, cursor keys
  • Avpag, Repag, Control+f, Control+b
  • Home, End, 0 and $
  • Insertion:
  • a, i
  • Deletion:
  • x, X, Supr, Backspace, J, D, dd
  • Visual line selection:
  • V (start selection/end selection)
  • Copying:
  • (range)y or y over visual selection

Insert mode:

  • Motion commands
  • cursor keys, Home, End, Avpag

Ex (:) mode:

  • Substitution
  • s[ubstitute], using python regular expressions
  • Writing
  • w[rite] [file]

Unsupported vi features

There is no horizontal scroll...

You can not prefix a command with a repetition number (i.e. 10j)

Delete to end of line or to end of world (d$, dw) is not implemented

There is no undo (yet)

Games and other nuisances

  • Type :game2048 (or just :g) to play the popular game

  • Yup, type :hellfire to become the god of hellfire!

pabled's People

Contributors

odkq avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

pabled's Issues

LICENSE

Cool urwid + pygments example! Can you release this under MIT instead of gplv3?

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.