akashnag / ash Goto Github PK
View Code? Open in Web Editor NEWA modern terminal text editor
License: GNU General Public License v2.0
A modern terminal text editor
License: GNU General Public License v2.0
Describe the bug
Try to install Ash via sudo pip3 install ash-editor
as described in ash readme. Got big error message:
error: externally-managed-environment
× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
python3-xyz, where xyz is the package you are trying to
install.
If you wish to install a non-Debian-packaged Python package,
create a virtual environment using python3 -m venv path/to/venv.
Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
sure you have python3-full installed.
If you wish to install a non-Debian packaged Python application,
it may be easiest to use pipx install xyz, which will manage a
virtual environment for you. Make sure you have pipx installed.
See /usr/share/doc/python3.11/README.venv for more information.
note: If you believe this is a mistake, please contact your Python installation or OS distribution provider.
You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
Do I really need venv and do other things for Ash? Excuse me for such questions, I'm newbie in python.
Desktop (please complete the following information):
When I open a file and do nothing but click the mouse rapidly in different parts of the screen, it works for a while and then crashes as below with getmouse returning ERR. I am using
on Kubuntu 20.04. I will see if I can find a more accurate method for reproducing the problem....
ash movies.html
Traceback (most recent call last):
File "/usr/local/bin/ash", line 8, in <module>
sys.exit(run())
File "/usr/local/lib/python3.8/dist-packages/ash/ash_main.py", line 16, in run
app.run()
File "/usr/local/lib/python3.8/dist-packages/ash/main.py", line 112, in run
ret_code = curses.wrapper(self.app_main)
File "/usr/lib/python3.8/curses/__init__.py", line 105, in wrapper
return func(stdscr, *args, **kwds)
File "/usr/local/lib/python3.8/dist-packages/ash/main.py", line 182, in app_main
self.main_window.show(welcome_msg) # this call returns when main_window() is closed
File "/usr/local/lib/python3.8/dist-packages/ash/gui/topLevelWindow.py", line 123, in show
btn, y, x = KeyBindings.get_mouse(ch)
File "/usr/local/lib/python3.8/dist-packages/ash/utils/keyUtils.py", line 55, in get_mouse
_, x, y, _, bstate = curses.getmouse()
_curses.error: getmouse() returned ERR
Describe the change
Probably a minor thing, but it's good practice to not "clutter" the users Home directory and instead put your configs in ~/.config/ . There might be a reason not to, so this is more of a "discussion" topic, than a request.
I was on a fresh install trying to use and I run into the following error:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/git/__init__.py", line 83, in <module>
refresh()
File "/usr/local/lib/python3.7/dist-packages/git/__init__.py", line 73, in refresh
if not Git.refresh(path=path):
File "/usr/local/lib/python3.7/dist-packages/git/cmd.py", line 278, in refresh
raise ImportError(err)
ImportError: Bad git executable.
The git executable must be specified in one of the following ways:
- be included in your $PATH
- be set via $GIT_PYTHON_GIT_EXECUTABLE
- explicitly set via git.refresh()
All git commands will error until this is rectified.
This initial warning can be silenced or aggravated in the future by setting the
$GIT_PYTHON_REFRESH environment variable. Use one of the following values:
- quiet|q|silence|s|none|n|0: for no warning or exception
- warn|w|warning|1: for a printed warning
- error|e|raise|r|2: for a raised exception
Example:
export GIT_PYTHON_REFRESH=quiet
the problem went away when I installed git, so I would recommend you to add on your website for better documentation
trying to install and run ash on Debian:
sudo pip3 install ash-editor
admin:~$ ash
Traceback (most recent call last):
File "/usr/local/bin/ash", line 8, in <module>
sys.exit(run())
File "/usr/local/lib/python3.7/dist-packages/ash/ash_main.py", line 16, in run
app.run()
File "/usr/local/lib/python3.7/dist-packages/ash/main.py", line 112, in run
ret_code = curses.wrapper(self.app_main)
File "/usr/lib/python3.7/curses/__init__.py", line 94, in wrapper
return func(stdscr, *args, **kwds)
File "/usr/local/lib/python3.7/dist-packages/ash/main.py", line 153, in app_main
self.theme_manager = ThemeManager(self)
File "/usr/local/lib/python3.7/dist-packages/ash/formatting/themeManager.py", line 15, in __init__
self.init_colors()
File "/usr/local/lib/python3.7/dist-packages/ash/formatting/themeManager.py", line 45, in init_colors
set_colors(colors, element_colors)
File "/usr/local/lib/python3.7/dist-packages/ash/formatting/colors.py", line 148, in set_colors
curses.init_color(index, rgb[0], rgb[1], rgb[2])
_curses.error: init_color() returned ERR
I'm connected via Putty, and it supports colors (eg. htop is green)
Bug:
Installed successfully using pip3 (v23.0.1), but when typing ash
nothing happens to the propmpt. Pressing CTRL-C gets back to bash. After uninstalling all packages and reinstalling on different machines, the program now actually runs on one of them (WHY? nothing has changed!), but everything on the screen is black (the screen size is more than the minimum required).
Steps to Reproduce
OS:
THIS IS THE BEST TUI CUA TEXT EDITOR I HAVE EVER SEEN ON LINUX!
Ash reminds me strongly of the splendid and venerable ISPF editor:
https://www.ibm.com/docs/en/zos-basic-skills?topic=ispf-editor
One of the major features of this editor is that you could enter commands into the line numbers column, such as d5 to delete the next five lines or r4 to repeat the current line 4 times. Can I interest you in adding these useful row commands to Ash?
i
Insert a line
Enter
Press Enter without entering anything to escape insert mode
i5
Obtain five input lines
d
Delete a line
d5
Delete five lines
dd/dd
Delete a block of lines
r
Repeat a line
rr/rr
Repeat a block of lines
c
With a or b: Copy a line after or before
c5
With a or b: Copy five lines after or before
cc/cc
With a or b: Copy a block of lines after or before
m
Move lines. As with copy commands, m5, mm/mm and use with a or b are also valid commands.
x
Exclude a line
Describe the bug
When Following the "Installation" Part of the readme and installing the Prerequisites as mentioned, launching ash fails because "Python.H" is missing. This is solved by installing python3-devel
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Either ash should launch with the current installation Instructions, or they need to be updated to include the Dependency.
Log
/home/user/.pyxbld/temp.linux-x86_64-3.10/pyrex/ash/core/screen.c:6:10: schwerwiegender Fehler: Python.h: Datei oder Verzeichnis nicht gefunden
6 | #include "Python.h"
| ^~~~~~~~~~
Kompilierung beendet.
Traceback (most recent call last):
File "/usr/lib64/python3.10/distutils/unixccompiler.py", line 126, in _compile
self.spawn(compiler_so + cc_args + [src, '-o', obj] +
File "/usr/lib64/python3.10/distutils/ccompiler.py", line 910, in spawn
spawn(cmd, dry_run=self.dry_run)
File "/usr/lib64/python3.10/distutils/spawn.py", line 91, in spawn
raise DistutilsExecError(
distutils.errors.DistutilsExecError: command '/usr/bin/gcc' failed with exit code 1
Desktop (please complete the following information):
After displaying the menu bar with alt+ down I have to press alt+up twice to remove the menu bar. It would be nice if I could just push Esc to remove the menu bar (and indeed any other dialog). And if there is no dialog and no menu bar present, Esc could perhaps bring the menu back again? This sequence of actions would be familiar to many people who might be unaware of the alt+down or up sequence?
Hello. New ash user here (non-technical user)
Great project, I love it. Thanks for ash.
I've tried to find the option in order to wrap the long lines. I cant find any.
Is there an option to wrap the long lines?
Hi there,
Your repository holds a “nightly build” in the dist
directory. Could you instead just tag a release and upload it to PyPI?
I'm trying to build a package of your nice editor for the FreeBSD Ports Collection but the way you do provide nightly builds is very inconvenient for this purpose.
Describe the bug
When opening a non User writable file without sudo, ash open the file and let's you make changes. On Saving or Quitting ash crashes and Produces a Traceback. The changes are not written and the User doesn't get information on the issue.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Some options:
Log
Traceback (most recent call last):
File "/home/user/.local/bin/ash", line 33, in <module>
sys.exit(load_entry_point('ash-editor==0.1.0.dev13', 'console_scripts', 'ash')())
File "/home/user/.local/lib/python3.10/site-packages/ash/ash_main.py", line 16, in run
app.run()
File "/home/user/.local/lib/python3.10/site-packages/ash/main.py", line 128, in run
ret_code = curses.wrapper(self.app_main)
File "/usr/lib64/python3.10/curses/__init__.py", line 94, in wrapper
return func(stdscr, *args, **kwds)
File "/home/user/.local/lib/python3.10/site-packages/ash/main.py", line 197, in app_main
self.main_window.show(welcome_msg) # this call returns when main_window() is closed
File "/home/user/.local/lib/python3.10/site-packages/ash/gui/topLevelWindow.py", line 139, in show
aed.perform_action(ch)
File "/home/user/.local/lib/python3.10/site-packages/ash/gui/editor.py", line 170, in perform_action
edit_made = self.keyHandler.handle_keys(ch)
File "/home/user/.local/lib/python3.10/site-packages/ash/gui/editorKeyHandler.py", line 30, in handle_keys
self.save_and_close()
File "/home/user/.local/lib/python3.10/site-packages/ash/gui/editorKeyHandler.py", line 63, in save_and_close
self.handle_save()
File "/home/user/.local/lib/python3.10/site-packages/ash/gui/editorKeyHandler.py", line 426, in handle_save
self.ed.buffer.write_to_disk()
File "/home/user/.local/lib/python3.10/site-packages/ash/core/bufferManager.py", line 197, in write_to_disk
self.write_a_copy(self.filename, self.encoding)
File "/home/user/.local/lib/python3.10/site-packages/ash/core/bufferManager.py", line 184, in write_a_copy
textFile = codecs.open(filename, "w", encoding)
File "/usr/lib64/python3.10/codecs.py", line 905, in open
file = builtins.open(filename, mode, buffering)
Desktop (please complete the following information):
Currently, clicking anywhere at least puts the cursor to that position. ash blocks the terminals "drag to Select" implementation and only support CTRL+Movement to mark.
While i recognize that this is a terminal first editor, some support for the mouse would be appreciated, especially when almost all alternatives support it in some from or another. Some of it seems to work already. At least the help window can be dismissed by clicking on the "x". From the top of my head:
Whenever I click in the opened ash window it crashes. This seems to be caused by clicking on a not-yet-created-line. If I create 5 lines (hitting Enter), I can jump between them freely by clicking on them.
The KeyError is dependent on the row you clicked.
To Reproduce
sudo pip3 install ash-editor
Expected behavior
Not to crash
Desktop (please complete the following information):
Additional context
Using bash produces the same result
Here is the traceback. The KeyError is different every time
Traceback (most recent call last):
File "/usr/bin/ash", line 33, in <module>
sys.exit(load_entry_point('ash-editor==0.1.0.dev7', 'console_scripts', 'ash')())
File "/usr/lib/python3.9/site-packages/ash/ash_main.py", line 16, in run
app.run()
File "/usr/lib/python3.9/site-packages/ash/main.py", line 112, in run
ret_code = curses.wrapper(self.app_main)
File "/usr/lib/python3.9/curses/__init__.py", line 94, in wrapper
return func(stdscr, *args, **kwds)
File "/usr/lib/python3.9/site-packages/ash/main.py", line 182, in app_main
self.main_window.show(welcome_msg) # this call returns when main_window() is closed
File "/usr/lib/python3.9/site-packages/ash/gui/topLevelWindow.py", line 131, in show
w.on_click(ry,rx)
File "/usr/lib/python3.9/site-packages/ash/gui/editor.py", line 340, in on_click
curpos = self.screen.get_curpos_after_click(y, x, self.buffer.lines, self.width, self.tab_size, self.word_wrap, self.hard_wrap)
File "screen.pyx", line 702, in ash.core.screen.Screen.get_curpos_after_click
File "screen.pyx", line 387, in ash.core.screen.Screen.translate_rendered_curpos_to_real_curpos
KeyError: 25```
Whenever I start ash, one of the cpu threads spikes up to 100% and stays there.
To Reproduce
sudo pip3 install ash-editor
Expected behavior
Less than 100% cpu usage.
Desktop (please complete the following information):
Additional context
Using bash produces the same result
I've shared ash on reddit. Looks like the name ash is already taken and/or misleading.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.