Giter VIP home page Giter VIP logo

python-gui's Introduction

Coverity Scan analysis Packages Debian CI Downloads

Neovim is a project that seeks to aggressively refactor Vim in order to:

See the Introduction wiki page and Roadmap for more information.

Features

See :help nvim-features for the full list, and :help news for noteworthy changes in the latest version!

Install from package

Pre-built packages for Windows, macOS, and Linux are found on the Releases page.

Managed packages are in Homebrew, Debian, Ubuntu, Fedora, Arch Linux, Void Linux, Gentoo, and more!

Install from source

See BUILD.md and supported platforms for details.

The build is CMake-based, but a Makefile is provided as a convenience. After installing the dependencies, run the following command.

make CMAKE_BUILD_TYPE=RelWithDebInfo
sudo make install

To install to a non-default location:

make CMAKE_BUILD_TYPE=RelWithDebInfo CMAKE_INSTALL_PREFIX=/full/path/
make install

CMake hints for inspecting the build:

  • cmake --build build --target help lists all build targets.
  • build/CMakeCache.txt (or cmake -LAH build/) contains the resolved values of all CMake variables.
  • build/compile_commands.json shows the full compiler invocations for each translation unit.

Transitioning from Vim

See :help nvim-from-vim for instructions.

Project layout

├─ cmake/           CMake utils
├─ cmake.config/    CMake defines
├─ cmake.deps/      subproject to fetch and build dependencies (optional)
├─ runtime/         plugins and docs
├─ src/nvim/        application source code (see src/nvim/README.md)
│  ├─ api/          API subsystem
│  ├─ eval/         Vimscript subsystem
│  ├─ event/        event-loop subsystem
│  ├─ generators/   code generation (pre-compilation)
│  ├─ lib/          generic data structures
│  ├─ lua/          Lua subsystem
│  ├─ msgpack_rpc/  RPC subsystem
│  ├─ os/           low-level platform code
│  └─ tui/          built-in UI
└─ test/            tests (see test/README.md)

License

Neovim contributions since b17d96 are licensed under the Apache 2.0 license, except for contributions copied from Vim (identified by the vim-patch token). See LICENSE for details.

Vim is Charityware.  You can use and copy it as much as you like, but you are
encouraged to make a donation for needy children in Uganda.  Please see the
kcc section of the vim docs or visit the ICCF web site, available at these URLs:

        https://iccf-holland.org/
        https://www.vim.org/iccf/
        https://www.iccf.nl/

You can also sponsor the development of Vim.  Vim sponsors can vote for
features.  The money goes to Uganda anyway.

python-gui's People

Contributors

bcho avatar benekastah avatar bfredl avatar blueyed avatar btipling avatar buztard avatar coolwanglu avatar diefans avatar elmart avatar eminence avatar equalsraf avatar ferenc- avatar frewsxcv avatar fwalch avatar henadzit avatar jightuse avatar justinmk avatar kryskool avatar llpamies avatar mause avatar maxwell-k avatar rasendubi avatar rgrinberg avatar s0undt3ch avatar tarruda avatar timeyyy avatar traverseda avatar viccuad avatar

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

Watchers

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

python-gui's Issues

Change font

I want to change the font in pynvim.
Can I change it?
pynvim uses the hardcoded font and font size (monospace 13).

unify python gui's

I see benefit for developers and coders in sharing code for the python guis.
If we build the right abstractions it would mean implementers of other toolkits could very easily:

  • test
  • documentation
  • api
  • even implementation ( see below)

The logic required for going from nvim to a gui could be abstracted away so implementers only have
to add a bunch of methods such as, delete line, insert line etc etc.

Tarruda has mentioned the idea of doing a gtk library in c. We could also implement hooks for wrapping nvim gui c libraries into python here.

Is this type of thinking feasible cross language?

ValueError: Namespace Gtk not available

running pynvim says:

~ ❯ pynvim
Traceback (most recent call last):
  File "/usr/local/bin/pynvim", line 9, in <module>
    load_entry_point('neovim-gui==0.1.3', 'console_scripts', 'pynvim')()
  File "/usr/local/lib/python2.7/site-packages/click/core.py", line 716, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/click/core.py", line 696, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/site-packages/click/core.py", line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/site-packages/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/neovim_gui/cli.py", line 63, in main
    from .gtk_ui import GtkUI
  File "/usr/local/lib/python2.7/site-packages/neovim_gui/gtk_ui.py", line 8, in <module>
    gi.require_version('Gtk', '3.0')
  File "/usr/local/lib/python2.7/site-packages/gi/__init__.py", line 118, in require_version
    raise ValueError('Namespace %s not available' % namespace)
ValueError: Namespace Gtk not available

PyGIWarning: Gdk/Gtk was imported without specifying a version first.

When running pynvim, I get those warnings:

; pynvim
/home/usr/.local/lib/python2.7/site-packages/neovim_gui/gtk_ui.py:6: PyGIWarning: Gdk was imported without specifying a version first. Use gi.require_version('Gdk', '3.0') before import to ensure that the right version gets loaded.
  from gi.repository import GLib, GObject, Gdk, Gtk, Pango, PangoCairo

** (pynvim:3081): WARNING **: Couldn't register with accessibility bus: Did not
receive a reply. Possible causes include: the remote application did not send a
reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
/home/usr/.local/lib/python2.7/site-packages/neovim_gui/gtk_ui.py:6: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version('Gtk', '3.0') before import to ensure that the right version gets loaded.
  from gi.repository import GLib, GObject, Gdk, Gtk, Pango, PangoCairo
/home/usr/.local/lib/python2.7/site-packages/neovim_gui/gtk_ui.py:6: PyGIWarning: PangoCairo was imported without specifying a version first. Use gi.require_version('PangoCairo', '1.0') before import to ensure that the right version gets loaded.
  from gi.repository import GLib, GObject, Gdk, Gtk, Pango, PangoCairo

2 mouse clicks instead of one

Hello,

When i'm lazy i sometimes prefer using the mouse over vim movements ( 👎 )... like clicking on files in nerdtree or to select some text.

In pynvim, it looks like doing one mouse click automatically does 2 mouse clicks, since i only need to do one click instead of two to open a file or directory in nerdtree (which is pretty annoying if i misclicked), and it takes only one click to expand region in visual mode (which is annoying if i want to select only 2 words for example).

As far as i can tell, this is not the default behavior in neovim, i tried this in neovim-qt and it also seems to be ok.

Is there anyway to configure this in pynvim ?

Cheers,

Mathiasb17

`pip install --user neovim-gui` show me such error

Downloading/unpacking neovim-gui
  Downloading neovim_gui-0.1.1.tar.gz
  Running setup.py (path:/tmp/pip-build-hzjN6T/neovim-gui/setup.py) egg_info for package neovim-gui

Downloading/unpacking neovim>=0.1.3 (from neovim-gui)
  Downloading neovim-0.1.3.tar.gz
  Running setup.py (path:/tmp/pip-build-hzjN6T/neovim/setup.py) egg_info for package neovim

Downloading/unpacking click>=3.0 (from neovim-gui)
  Downloading click-6.3-py2.py3-none-any.whl (70kB): 70kB downloaded
Downloading/unpacking pygobject (from neovim-gui)
  Downloading pygobject-2.28.3.tar.bz2 (889kB): 889kB downloaded
  Running setup.py (path:/tmp/pip-build-hzjN6T/pygobject/setup.py) egg_info for package pygobject
    ********************************************************************
    * Building PyGObject using distutils is only supported on windows. *
    * To build PyGObject in a supported way, read the INSTALL file.    *
    ********************************************************************
    Complete output from command python setup.py egg_info:
    ********************************************************************

* Building PyGObject using distutils is only supported on windows. *

* To build PyGObject in a supported way, read the INSTALL file.    *

********************************************************************

----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /tmp/pip-build-hzjN6T/pygobject
Storing debug log for failure in /home/wsdjeg/.pip/pip.log

pynvim crashes on startup

Hi.

Tested on both Debian unstable and stable, on i3wm and openbox. I have neovim installed (tried both 0.1.2 releases and current HEAD: 8991b4b095c9b4817eb88e003201292e11e05fae)

I have installed neovim and neovim-gui through pip, also tried installing them both from their git master branches. I get the same error on both python2 and python3.

Here's the error(s) I'm getting: https://gist.github.com/jpleau/f76eee22fd1cbdd64fe1

Any ideas what the problem might be ? Deleteing my vim/nvim config files also do not solve this issue.

Thanks

Support resizing PyNvim window

I haven't been able to resize pynvim window, with neovim 0.1.2, python-client 0.1.2 and python-gui 0.1.1 (I haven't tried with neovim's master and python-client >= 0.1.3).

Unable to use numpad math operation keys

I'm using the debian experimental package of python-gui.
All keys seem to work for now, but /*-+ on the numpad. Other numpad keys are working fine (I can input numbers and use enter), but those ones.

Installation of module using Python 3 fails on `pygobject` dependency

$ pip3 install neovim-gui
Collecting neovim-gui
  Using cached neovim_gui-0.1.3.tar.gz
Requirement already satisfied (use --upgrade to upgrade): neovim>=0.1.3 in ./.venv/lib/python3.4/site-packages (from neovim-gui)
Collecting click>=3.0 (from neovim-gui)
  Using cached click-6.6.tar.gz
Collecting pygobject (from neovim-gui)
  Using cached pygobject-2.28.3.tar.bz2
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-rysp8tff/pygobject/setup.py", line 272
        raise SystemExit, 'ERROR: Nothing to do, gio could not be found and is essential.'
                        ^
    SyntaxError: invalid syntax

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-rysp8tff/pygobject/
$ python3 -V
Python 3.4.3
$ pip3 -V
pip 8.1.2 from /home/unclechu/nvim-attach/.venv/lib64/python3.4/site-packages (python 3.4)
$ uname -a
Linux unclefarm23 4.7.5-100.fc23.x86_64 #1 SMP Mon Sep 26 19:29:03 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
$ cat /etc/fedora-release
Fedora release 23 (Twenty Three)

Ship .desktop and icon

Right now, python-gui is not doing anything with them. We should either:

  • install them correctly using package_data or data_files metadata. After a quick search I have not found a PyPi module that does this so far, and it would need to cater to different OSes.
  • just add them to the sdist by adding them to MANIFEST.in and let downstreams tackle it.

Unable to install using pip in windows

when I tried to install using pip in windows 7 X64 it throws me the following error

ERROR: Could not find pkg-config: Please check your PATH environment variable.

embeddable gtk widget

Hello,

recently I switched from Emacs to Vim and use it as external editor in Claws-mail by having the following line in Preferences:

gvim '+set filetype=mail' -f --socketid %w %s

Now, I'd like to switch to Neovim and after having some chat in #neovim, was advised to ask here if Neovim could be embedded into Claws via python-gui?

Support powerline fonts

Right now PyNvim doesn't support chars from powerline fonts (yet supports utf chars).

Expected: (nvim running inside gnome-terminal)

nvim

Obtained: (pynvim)

pynvim

pynvim alias

  • OS: ubuntu 15.04
  • Python3: installs, pynvim script available; doesn't work (I assume it's intended and works only with 2.x branch)
  • Python 2.7 - installs; pynvim script is absent

  • Should install script to be updated to setup pynvim alias for python 2.7? (or is it my local setup issue; in that case - what troubleshooting information should I provide if any .. )
  • Should install script fail with python 3.x and provide some sort of message e.g. 'Please use python 2.7 to install neovim-gui' etc..

Unable to use mouse after startup

ArchLinux with Gnome3.20.3

➜  ~ nvim -v    
NVIM v0.1.5-611-gdcbd1c7
Build type: Dev
Compilation: /usr/bin/cc -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -g -fvar-tracking-assignments -Wconversion -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wvla -fstack-protector-strong -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -DHAVE_CONFIG_H -D_GNU_SOURCE -I/tmp/yaourt-tmp-lz/aur-neovim-git/src/neovim-git/build/config -I/tmp/yaourt-tmp-lz/aur-neovim-git/src/neovim-git/src -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/tmp/yaourt-tmp-lz/aur-neovim-git/src/neovim-git/build/src/nvim/auto -I/tmp/yaourt-tmp-lz/aur-neovim-git/src/neovim-git/build/include
编译者 lz@lzPC

Optional features included (+) or not (-): +acl   +iconv    +jemalloc +tui      
For differences from Vim, see :help vim-differences
➜  ~  ~/.local/bin/pynvim  --prog 'nvim --embed -u NONE /home/lz/code/test.cpp'

All mouse-related functions such as scrolling, clicking don't work. However after I press : and then <esc>, this problem will certainly disappear.

Spelling errors not visible

Regardless of theme, :set spell does not visually mark spelling mistakes in any way, while it does correctly in terminal neovim for the same themes.

Mappings related to spelling, like ]s, still work though.

python-gui raises exception on launch

I am using Ubuntu-16.04 Gnome3.
Python-GUI installed using 'pip install neovim-gui'

Getting following exception on running command pynvim

root@dnyaneshg-Lenovo-ideapad-Y700-15ISK:~/Projects/stunpp# pynvim
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/neovim_gui/gtk_ui.py", line 138, in wrapper
self._flush()
File "/usr/local/lib/python2.7/dist-packages/neovim_gui/gtk_ui.py", line 457, in _flush
self._pending[0] = self._screen.row
AttributeError: 'NoneType' object has no attribute 'row'
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/neovim_gui/gtk_ui.py", line 138, in wrapper
self._flush()
File "/usr/local/lib/python2.7/dist-packages/neovim_gui/gtk_ui.py", line 457, in _flush
self._pending[0] = self._screen.row
AttributeError: 'NoneType' object has no attribute 'row'
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/neovim_gui/gtk_ui.py", line 138, in wrapper
self._flush()
File "/usr/local/lib/python2.7/dist-packages/neovim_gui/gtk_ui.py", line 457, in _flush
self._pending[0] = self._screen.row
AttributeError: 'NoneType' object has no attribute 'row'
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/neovim_gui/ui_bridge.py", line 97, in apply_updates
handler(*args)
File "/usr/local/lib/python2.7/dist-packages/neovim_gui/gtk_ui.py", line 184, in _nvim_cursor_goto
self._screen.cursor_goto(row, col)
AttributeError: 'NoneType' object has no attribute 'cursor_goto'

Remove unused imports (from `$ pyflake3 .`)

$ pyflake3 . 
./setup.py:1: 'platform' imported but unused
./setup.py:2: 'sys' imported but unused
./neovim_gui/screen.py:9: undefined name 'xrange'
./neovim_gui/cli.py:8: 'IS_PYTHON3' imported but unused

'Nvim' object has no attribute 'run_loop'

tom@desktop:~$ pynvim&
[1] 7140
tom@desktop:~$ Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 763, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/local/lib/python2.7/dist-packages/neovim_gui/ui_bridge.py", line 104, in _nvim_event_loop
    self._nvim.run_loop(on_request, on_notification, on_setup)
AttributeError: 'Nvim' object has no attribute 'run_loop'

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.