vim编写python第一个_vy:用python从零开始实现的一个vim

vy是一款基于Python和Tkinter构建的高效modal编辑器,拥有模块化架构。其强大的插件API使得vy能够轻松支持多种编程语言的语法高亮、模式创建,如Emacs。vy提供方便的快捷键,内置Python PDB调试器、自动补全、多标签和分屏编辑等功能,允许用户用Python定制vy的行为,所有内置功能都有详细文档。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

vy.png 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.jpg

Features/Plugins

Python PDB Debugger

GDB Debugger

Nodejs inspect Debugger

Fuzzy Search

Incremental Search

Tabs/Panes

Self documenting

Powerful plugin API

Syntax highlighting for 300+ languages

Handy Shortcuts

Ycmd/YouCompleteMe Auto Completion

Easily customizable (vyrc in python)

Quick Snippet Search

File Manager

Python Static Type Checker

Terminal-like

Find Function/Class Definition

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.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值