Giter Site home page Giter Site logo

vy's Introduction

vy vy

A powerful modal editor written in python.

vy is a modal editor with a very modular architecture. vy is built on top of Tkinter which is one of the most productive graphical toolkits; It permits vy to have such a great programming interface for plugins. Python is such an amazing language; it turns vy such a powerful application because its plugin API is high level naturally.

In vy it is easy to create modes like it is in emacs, modes that support programming languages, provide all kind of functionalities that varies from accessing irc or email checking. The set of keys used in vy was carefully chosen to be handy although it is possible to make vy look like vim or emacs.

The syntax highlighting plugin is very minimalistic and extremely fast. It supports syntax highlighting for all languages that python-pygments supports. The source code of the syntax highlighting plugin is about 120 lines of code. It is faster than the syntax highlighting plugins of both vim and emacs. :) It is possible to easily implement new syntax highlighting themes that work for all languages because it uses python pygments styles scheme.

There is a simple and consistent terminal-like plugin in vy that turns it possible to talk to external processes. Such a feature is very handy when dealing with interpreters. One can just drop pieces of code to an interpreter then check the results.

vy implements a Python debugger plugin and auto completion that permits debugging Python code easily and in a very cool way. One can set break points, remove break points, run the code then see the cursor jumping to the line that is being executed and much more.

It is possible to open multiple vertical/horizontal panes to edit different files. Such a feature makes it possible to edit multiple files in a given tab. vy supports multiple tabs as well with a handy scheme of keys to switch focus between tabs and panes.

There is a vyrc file written in Python that is very well documented and organized to make it simple to load plugins and set stuff at startup. You can take the best out of vy with no need to learn some odd language like vimscript or Emacs Lisp; since vy is written in Python, you use Python to develop for it.

All built-in functions are well documented, which simplifies the process of plugin development as well as personalizing stuff. The plugins are documented: the documentation can be accessed from vy by dropping Python code to the interpreter.

screenshot-1

Features/Plugins

The github organization https://github.com/vyapp is meant to hold vy related projects.

Basic Install

Note: vy requires Python3 to run, python2 support is no longer available.

cd /tmp/
pip download vy
tar -zxvf vy-*
cd vy-*/
pip install -r requirements.txt
python setup.py install 

Note: As vy is in development there may occur some changes to the vyrc file format, it is important to remove your ~/.vy directory before a new installation in order to upgrade to a new version.

Documentation

The vy docs may be outdated sometimes, i struggle to do my best to keep it all fine. There also exists many features which weren't documented yet.

vy's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vy's Issues

support of langserver

Hi, it would be really amazing to support language servers as it would instantly bring rich support for almost all common languages.

Startup failure on OS X

Error Msg:

bash: cannot set terminal process group (-1): Inappropriate ioctl for device
bash: no job control in this shell

A window pops up with a red blinking bar and the label vy none. It doesn't react to vim like input.

Installed like this:

pip install untwisted
pip install pygments
pip install jedi
pip install vy
> python --version
Python 2.7.10
> uname -a
Darwin Elmars-MBP 15.0.0 Darwin Kernel Version 15.0.0: Wed Aug 26 16:57:32 PDT 2015; root:xnu-3247.1.106~1/RELEASE_X86_64 x86_64

Mac OS X support: Replacing the apostrophe bind with something else

I encountered this error when trying to run vy for the first time (after fixing idiotic dependency errors):

_tkinter.TclError: bad event type or keysym "apostrophe"

The root of the problem (as stated in this Hacker News post's top comment, the first result in a google search) is that apparently OSX's Tkinter doesn't have a key bind for apostrophe. Replacing it with something unused like plus as in this commit fixes that issue. Worthwhile looking into or finding a cross-platform solution?

vy doesn't display correctly when screen resolution is changed

I tested it on a Ubuntu 17.10 VM on Virtual Box.
The change in screen resolution will not affect the current instance of vy window but any new instance thereafter.
Current Solution: The problem is corrected when the windows system is restarted or when you relogin on to the system.

Normal:
virtualbox_ubuntu_13_02_2018_21_57_55

After changing screen resolution:
virtualbox_ubuntu_13_02_2018_21_32_47

Crash on windows

C:\Python27\Scripts>C:\Python27\python.exe vy.py
Traceback (most recent call last):
File "vy.py", line 16, in
root = App()
File "C:\Python27\lib\site-packages\vyapp\app.py", line 41, in init
execfile(rc, ENV)
File "C:\Users\bogdan.vy\vyrc", line 141, in
import vyapp.plugins.pdb.debug
File "C:\Python27\lib\site-packages\vyapp\plugins\pdb\debug.py", line 15, in
from untwisted.network import core, cmap, READ, Device
File "C:\Python27\lib\site-packages\untwisted\network.py", line 29, in
from os import O_NONBLOCK
ImportError: cannot import name O_NONBLOCK

fsniff window sizing/pattern matching

fsniff has difficulties recognizing directory names with periods "." in them when pattern matching.

When fsniff matches a long file path, it resizes the window width. This does not size back to the original width when out of focus.

It just hangs on my Macbook

$ vy -v

At this point it just sits there so I hit ctrl-C

^CTraceback (most recent call last):
File "/usr/local/bin/vy", line 7, in
root.mainloop()
File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk/Tkinter.py", line 1125, in mainloop
self.tk.mainloop(n)
File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk/Tkinter.py", line 1531, in call
def call(self, *args):
KeyboardInterrupt

"No module named 'base'" error message while trying to run for the first time

Greetings! This is the second time I issue an issue at Github, so I apologize in advance if I do something wrong.

I'm relatively new to Python, so I couldn't figure out if it is a missing library problem on my environment side.

My environment:
Arch Linux with python3.6 and python2.7 with some modules, (among them jedi and pigments, all installed with pacman package manager)

I tried both with my global environment and with Python's virtualenv and both produced the same error message. To simplify things, I'll put virtualenv's terminal output below to avoid misunderstandings:

$ git clone https://github.com/iogf/vy
Cloning into 'vy'...
remote: Counting objects: 3499, done.
remote: Compressing objects: 100% (82/82), done.
remote: Total 3499 (delta 15), reused 0 (delta 0), pack-reused 3417
Receiving objects: 100% (3499/3499), 6.30 MiB | 2.66 MiB/s, done.
Resolving deltas: 100% (2476/2476), done.

$ mv vy vy-ee
$ python -m venv vy
$ mv vy-ee/* vy/
$ mv vy-ee/.git vy/
$ rm -r vy-ee
$ cd vy
$ source bin/activate
$ pip install -r requirements.txt
Collecting jedi (from -r requirements.txt (line 1))
  Downloading jedi-0.10.1-py2.py3-none-any.whl (179kB)
    100% |████████████████████████████████| 184kB 723kB/s 
Collecting pygments (from -r requirements.txt (line 2))
  Downloading Pygments-2.2.0-py2.py3-none-any.whl (841kB)
    100% |████████████████████████████████| 849kB 910kB/s 
Collecting untwisted (from -r requirements.txt (line 3))
  Using cached untwisted-1.0.1.tar.gz
Installing collected packages: jedi, pygments, untwisted
  Running setup.py install for untwisted ... done
Successfully installed jedi-0.10.1 pygments-2.2.0 untwisted-1.0.1

$ pip list --format=columns
Package    Version
---------- -------
jedi       0.10.1 
pip        9.0.1  
Pygments   2.2.0  
setuptools 28.8.0 
untwisted  1.0.1

$ ./vy          
Traceback (most recent call last):
  File "./vy", line 3, in <module>
    import vyapp.app
  File "/home/archie/github/vy/vyapp/app.py", line 6, in <module>
    from base import App, Debug
ModuleNotFoundError: No module named 'base'
$

Thanks since now.

Request for a plugin to strip empty spaces from lines.

When doing some work for a web project and playing with html, i thought it may be interesting to have a keycommand that automatically removes spaces from the beginning of the selected lines. It may be interesting to be implemented as a command plugin
that offers a function/command like: strip or stp for simplicity.

License for BOOK.md

I was checking this package for inclusion in the Free Software Directory and while the documentation is very robust it wasn't clear what license BOOK.md is distributed under. Thank you for clarifying the situation on the document, and let me know when you get to it so I can approve the entry in the directory.

Plugin for integration with tidy.

It would be interesting to have integration with tidy(for checking broken html).
Once a keycommand is issued, the html in the areavi is parsed and the lines
with the errors are higlighed. When the cursor is placed over that line
a message about the error is outputed in the statusbar.

Bug with set output target.

After creating an AreaVi instance and setting it as output target and destroying that areavi, it is throwing exception when it occurs setting as output target a new AreaVi instance. It seems i forgot to unregister the areavi instances which were set as target once them get destroyed.

it seems it is much better to have the scheme of output target being handled off vy core(like it was initially defined) since other schemes of output may arise and them can be used instead of the standard one.

Bug with vyirc and whocall plugin.

When it is changed nick, whocall plugin stops notifying you when someone mentions your nick. it is needed to update the nick string in the IrcMode class whenever a change nick event happens.

Addition of virtual events.

It may be better to implement custom keymaps for plugins
to use virtual events like:

class ExampleEvent(object):
    def __init__(self, area):
        self.area = area
        area.install(('BETA', '<<ExampleEvent.OutputData>>', self.output_data))
        area.event_add('<<ExampleEvent.OutputData>>', '<Key-h>')

    def output_data(self, e):
        self.area.insert('end', 'This is nice')

install = ExampleEvent

or it could be.

"""
Overview
========

Just a test to demonstrate virtual events.

Keycommands
===========

Mode: BETA
Event: <<ExampleEvent.OutputData>>, <Key-h>
Description: insert the text 'This is nice' on the focused
areavi.
"""

class ExampleEvent(object):
    def __init__(self, area):
        self.area = area
        area.install(('BETA', ('<<ExampleEvent.OutputData>>', '<Key-h>', ...), self.output_data))
        # area.event_add('<<ExampleEvent.OutputData>>', '<Key-h>')

    def output_data(self, e):
        self.area.insert('end', 'This is nice')

install = ExampleEvent

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.