howl-editor / howl Goto Github PK
View Code? Open in Web Editor NEWThe Howl Editor
Home Page: http://howl.io
License: Other
The Howl Editor
Home Page: http://howl.io
License: Other
Steps:
Observed: The list of completions scrolls to the left (off view) as the readline path grows. This makes it impossible to make selections. Going back by hitting backspace repeatedly does not fully scroll completions back into view either.
Expected: List of completions stays in view. The readline prompt or text can be truncated from left.
I'm not sure how this can be fixed. This might require returning the first match position along with the matched items list.
Pressing the DEL key should delete the character to the right of the cursor, or the selection if present. It does nothing.
This is something that's kind of weird. If you have only one view open, saving the file gets rid of the auto-complete box. But, if there's more than one view, saving the file does nothing.
Just kind of odd.
If I type @@abc
, only the second @
is red, but both should be.
I'm really impressed with your work on this editor, and I'm definitely going to invest some time in learning to use it. I've already got a basic set of emacs keybindings ported, but as I was looking at the view-splitting commands, I ran into a segfault. I finally got a chance to dig into it, and it seems that there's an assertion that fails before it crashes:
Gtk-CRITICAL **: gtk_widget_event: assertion 'WIDGET_REALIZED_FOR_EVENT (widget, event)' failed
I then ran it like this: G_DEBUG="fatal_warnings" gdb ./howl
I got a stack trace that looked interesting:
#0 0x00007ffff56be289 in g_logv () from /usr/lib/libglib-2.0.so.0
#1 0x00007ffff56be3d2 in g_log () from /usr/lib/libglib-2.0.so.0
#2 0x00007ffff749516a in gtk_widget_event () from /usr/lib/libgtk-3.so.0
#3 0x00007ffff74b222b in gtk_window_propagate_key_event ()
from /usr/lib/libgtk-3.so.0
#4 0x00007ffff74b2261 in ?? () from /usr/lib/libgtk-3.so.0
#5 0x00007ffff736c5ee in ?? () from /usr/lib/libgtk-3.so.0
#6 0x00007ffff5b838d7 in ?? () from /usr/lib/libgobject-2.0.so.0
#7 0x00007ffff5b9c3a2 in g_signal_emit_valist ()
from /usr/lib/libgobject-2.0.so.0
#8 0x00007ffff5b9d002 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#9 0x00007ffff7494e7c in ?? () from /usr/lib/libgtk-3.so.0
#10 0x00007ffff736aabf in ?? () from /usr/lib/libgtk-3.so.0
#11 0x00007ffff736c1ca in gtk_main_do_event () from /usr/lib/libgtk-3.so.0
#12 0x00007ffff6f67162 in ?? () from /usr/lib/libgdk-3.so.0
#13 0x00007ffff56b7296 in g_main_context_dispatch ()
from /usr/lib/libglib-2.0.so.0
#14 0x00007ffff56b75e8 in ?? () from /usr/lib/libglib-2.0.so.0
#15 0x00007ffff56b768c in g_main_context_iteration ()
from /usr/lib/libglib-2.0.so.0
#16 0x00007ffff60910ac in g_application_run () from /usr/lib/libgio-2.0.so.0
#17 0x0000000000445aa2 in lj_vm_ffi_call ()
#18 0x0000000000466a26 in lj_ccall_func ()
---Type <return> to continue, or q <return> to quit---
#19 0x00000000004417b6 in lj_cf_ffi_meta___call ()
#20 0x00000000004438fe in lj_BC_FUNCC ()
#21 0x00000000004337e0 in lua_pcall ()
#22 0x00000000004282a3 in lua_run (L=0x40000378,
app_root=0x6fbf80 "/home/levi/howl", argv=<optimized out>, argc=1)
at main.c:31
#23 main (argc=1, argv=0x7fffffffe208) at main.c:84
I also determined that the crash was happening in lib/howl/ui/window.moon
in the add_view
method, specifically in the gobject/show_all!
call.
After a bit of searching, it seemed it might be related to the editor widget getting keyboard focus before being displayed. Following the hunch, I made the following changes, which seemed to fix the problem:
diff --git a/lib/howl/application.moon b/lib/howl/application.moon
index d4545fd..ef985a7 100644
--- a/lib/howl/application.moon
+++ b/lib/howl/application.moon
@@ -77,7 +77,7 @@ class Application extends PropertyObject
editor = Editor opts.buffer or @next_buffer
(opts.window or @window)\add_view editor, opts.placement or 'right_of'
append @_editors, editor
- --editor\grab_focus!
+ editor\grab_focus!
editor
new_buffer: (buffer_mode) =>
diff --git a/lib/howl/commands/ui_commands.moon b/lib/howl/commands/ui_commands.moon
index 107dede..2e0d161 100644
--- a/lib/howl/commands/ui_commands.moon
+++ b/lib/howl/commands/ui_commands.moon
@@ -97,8 +97,7 @@ for cmd in *{
if target
target\grab_focus!
else
- newEditor = howl.app\new_editor :placement
- newEditor\grab_focus!
+ howl.app\new_editor :placement
command.register
name: "new-view-#{placement\gsub '_', '-'}",
I guess this must be due to a different version of gtk or something, because I can't imagine you wouldn't have run across it if it existed on your system. I'm running Arch on this machine, so things tend to be bleeding-edge.
I'm running the latest version of Howl from Git. When I try to open a .hpp
file, I get this:
howl: /build/buildd/cairo-1.10.2/src/cairo-surface.c:385: _cairo_surface_begin_modification: Assertion `! surface->finished' failed.
Aborted (core dumped)
All other files(including .cpp
files and .h
files) are perfectly file.
Steps:
Observed:
'a' and ')' are highlighted.
Expected:
'(' and ')' are highlighted.
If I open this file in Howl and navigate to the end of the file, this appears:
[string "../lib/howl/buffer_lines.moon"]:168: Character offset '6' out of bounds (length = 4)
Invoking buffer-grep on a large buffer (>5k lines) is very slow. It takes 10+ seconds for the readline popup to show. Matching itself is fast enough.
Steps:
Expected: matches are updated as if pasted text was typed in.
Observed: no change to list of matches.
This is highlighted correctly:
a:visited { color: blue }
but this strips the color from a
, visited
, and color
:
a:visited { color: blue; }
Sometimes, entering the first character in an auto pair correctly adds the other one afterwards. Other times, it simply doesn't work.
I know that's not much info, but I don't know what other info would be wanted, so I decided to post this first.
Steps to reproduce:
ctrl_f
.enter
.Result:
../lib/howl/buffer.moon:77: Character offset '24' out of bounds (length = 0)
If, once the red error appears, I press ctrl
once and then close Howl, this sometimes gets dumped to my terminal:
(howl:12868): Gtk-CRITICAL **: gtk_widget_get_parent: assertion 'GTK_IS_WIDGET (widget)' failed
(howl:12868): GLib-GObject-CRITICAL **: g_object_ref: assertion 'G_IS_OBJECT (object)' failed
(howl:12868): GLib-GObject-CRITICAL **: g_object_freeze_notify: assertion 'G_IS_OBJECT (object)' failed
(howl:12868): Gtk-CRITICAL **: gtk_widget_has_default: assertion 'GTK_IS_WIDGET (widget)' failed
(howl:12868): Gtk-CRITICAL **: gtk_widget_get_receives_default: assertion 'GTK_IS_WIDGET (widget)' failed
(howl:12868): GLib-GObject-CRITICAL **: g_object_ref: assertion 'G_IS_OBJECT (object)' failed
(howl:12868): Gtk-CRITICAL **: gtk_widget_get_display: assertion 'GTK_IS_WIDGET (widget)' failed
(howl:12868): Gdk-CRITICAL **: gdk_display_get_device_manager: assertion 'GDK_IS_DISPLAY (display)' failed
(howl:12868): Gdk-CRITICAL **: gdk_device_manager_list_devices: assertion 'GDK_IS_DEVICE_MANAGER (device_manager)' failed
(howl:12868): Gdk-CRITICAL **: gdk_device_manager_list_devices: assertion 'GDK_IS_DEVICE_MANAGER (device_manager)' failed
(howl:12868): Gdk-CRITICAL **: gdk_device_manager_list_devices: assertion 'GDK_IS_DEVICE_MANAGER (device_manager)' failed
(howl:12868): GLib-GObject-CRITICAL **: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
(howl:12868): GLib-GObject-CRITICAL **: g_object_notify: assertion 'G_IS_OBJECT (object)' failed
(howl:12868): Gtk-CRITICAL **: gtk_widget_has_default: assertion 'GTK_IS_WIDGET (widget)' failed
(howl:12868): GLib-GObject-CRITICAL **: g_object_thaw_notify: assertion 'G_IS_OBJECT (object)' failed
(howl:12868): GLib-GObject-CRITICAL **: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
In this code:
<script></script>
the closing </script>
is not bolded like all other tags. If I but a line break in between the tags, it works.
These two map to the same keystroke name 'ctrl_alt_l':
Perhaps (1) could be 'ctrl_alt_left'.
Other ambiguous keystrokes are 'alt_r' and 'alt_l'.
I just tried the aullar
branch. It looks great, but there are two weird selection issues:
I also noticed that there's no horizontal scrollbar OR word wrapping (even though I have it the line wrapping setting on word
), so it's hard to see the rest of the line, and the cursor is the normal pointer instead of the I-style thing that it should be while over a text entry. The space between characters also seems to be much more, so that fewer characters fit on a line (around 78-ish vs. 83).
Other than that, everything works! :D
When documenting C++ and Python code, the auto-completion can get in the way easily by trying to complete things typed in the documentation. Usually, when typing normal words, that can be painful. In addition, Howl also reads the content of comments/strings. Say I put an example in the C++ comments for Doxygen to pick up. Howl will also parse it, so now that name is added to the auto-complete list. This can also be very aggravating. Could this be fixed? Maybe it could be a config option to avoid causing trouble for people for whom that behavior is desirable.
So far, there is only one file that I can reproduce this with: Retina.csproj
. Basically, you open the file, start playing around with the cursor, and I get messages like this in the bottom of the window:
../lib/howl/ui/cursor.moon:370: Offset '45' out of bounds (size = 43)
and this gets dumped to my terminal over and over again:
(howl:22629): Pango-CRITICAL **: pango_layout_move_cursor_visually: assertion 'old_index >= 0 && old_index <= layout->length' failed
Whenever do the following:
howl myfile
)I get this:
(howl:26496): Gtk-CRITICAL **: gtk_widget_get_parent: assertion 'GTK_IS_WIDGET (widget)' failed
(howl:26496): GLib-GObject-CRITICAL **: g_object_ref: assertion 'G_IS_OBJECT (object)' failed
(howl:26496): GLib-GObject-CRITICAL **: g_object_freeze_notify: assertion 'G_IS_OBJECT (object)' failed
(howl:26496): Gtk-CRITICAL **: gtk_widget_has_default: assertion 'GTK_IS_WIDGET (widget)' failed
(howl:26496): Gtk-CRITICAL **: gtk_widget_get_receives_default: assertion 'GTK_IS_WIDGET (widget)' failed
(howl:26496): GLib-GObject-CRITICAL **: g_object_ref: assertion 'G_IS_OBJECT (object)' failed
(howl:26496): Gtk-CRITICAL **: gtk_widget_get_display: assertion 'GTK_IS_WIDGET (widget)' failed
(howl:26496): Gdk-CRITICAL **: gdk_display_get_device_manager: assertion 'GDK_IS_DISPLAY (display)' failed
(howl:26496): Gdk-CRITICAL **: gdk_device_manager_list_devices: assertion 'GDK_IS_DEVICE_MANAGER (device_manager)' failed
(howl:26496): Gdk-CRITICAL **: gdk_device_manager_list_devices: assertion 'GDK_IS_DEVICE_MANAGER (device_manager)' failed
(howl:26496): Gdk-CRITICAL **: gdk_device_manager_list_devices: assertion 'GDK_IS_DEVICE_MANAGER (device_manager)' failed
(howl:26496): GLib-GObject-CRITICAL **: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
(howl:26496): GLib-GObject-CRITICAL **: g_object_notify: assertion 'G_IS_OBJECT (object)' failed
(howl:26496): Gtk-CRITICAL **: gtk_widget_has_default: assertion 'GTK_IS_WIDGET (widget)' failed
(howl:26496): GLib-GObject-CRITICAL **: g_object_thaw_notify: assertion 'G_IS_OBJECT (object)' failed
(howl:26496): GLib-GObject-CRITICAL **: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
If I re-open the file and do the same things again, no warnings appear. It's pretty weird.
When I try to build:
(master) ~/source/howl/src > make
tools/download: line 9: tempfile: command not found
Downloading http://prdownloads.sourceforge.net/scintilla/scintilla337.tgz?download..
wget: missing URL
Usage: wget [OPTION]... [URL]...
Try `wget --help' for more options.
Makefile:61: recipe for target 'deps/scintilla337' failed
make: *** [deps/scintilla337] Error 1
I just stubbed it out to write to another file but I'm sure other people will have this problem when building. I'm on ArchLinux, from what I read online tempfile's availability isn't guaranteed on linux.
This is kind of a big feature request, but it's a cool one.
I was recently toying with the acme text editor. I'm not rather fond of the move-the-mouse-like-crazy design concept, but there is one feature that's pretty neat.
Right now in Howl, you can run commands with exec
. Acme lets you do that, too, albeit in a different way. Both open the command's output in a new buffer/view.
However, acme has one key feature here. Say the C compiler outputs this text:
tst.c:1: error: you did something stupid
If you right-click on the part that says tst.c:1
, acme will open that file and jump to the given line number. This can be really handy with long C/C++ programs. I was thinking that maybe Howl could have this in the form of a key sequence. For instance, I'd click somewhere inside the tst.c:1
part and press something like ctrl_shift_j
.
Thoughts?
This is kind of weird...
Go here.
Copy the line with \t/
, making sure to include the space at the end. This is a Unicode non-breaking space.
Paste it into Howl.
Click around the end of the line. This will come up in the terminal:
(howl:24664): Pango-WARNING **: Invalid UTF-8 string passed to pango_layout_set_text()
If you copy the text from within Howl before closing it, this will also appear:
(howl:24664): Gtk-WARNING **: Error converting from UTF-8 to ASCII: Partial character sequence at end of input
This leaves my views in a strange state because the readline is visible but I cannot use the keyboard to go back to the readline (neither Ctrl-tab nor Alt-x work). I have to click in the readline and press escape. To continue where I left off in the readline, I have to click in the readline at the correct cursor position.
Any of the following alternatives is reasonable:
For instance:
[xyz [
; Howl put indents based on the [ in the last line (up to this semicolon)
[a b]
[c d]
; Howl *still* indents based on the [, even though *every other line following it used a different indentation*
]]
This can get really annoying with Hy's defclass
:
(defclass x [] [
; I got indented a lot
[--init-- (fn [] ...)]
; ...and got indented more than I wanted...again...
[precedence ["A" "B" "C"]]
; ...indented...again...
[a 1]
; ARGH!!!!!!!!!!!!!!!! @!#$
])
Feature Request:
When I use the set-* commands to set a config variable, I would like the setting to be saved permanently, and prefer not to have to edit init.moon for that. Transient settings are seldom required and more often users want to save the new settings.
Allowing manual editing of config variables via ~/howl/system/config.lua is reasonable.
Steps:
Expected buffer content:
hello
'hel'
Observed buffer content:
hello
'hel'hello
Details:
The ending quote char does not cancel the auto complete list and 'hello' remains selected in it, so typing ENTER inserts it into the buffer.
Ok...I'm sure there's a simple answer, and this might not be a bug...
BUT I HAVE NO CLUE WHAT'S WRONG!!!!
I'm trying to write my own lexer. I have this for my mode:
{
lexer: bundle_load 'felix/lexer'
comment_syntax: { '/*', '*/' }
auto_pairs: {
'(': ')'
'[': ']'
'{': '}'
'"': '"'
"'": "'"
'"""': '"""'
"'''": "'''"
},
indentation: {
more_after: '^%s*({|do)%s*$'
less_for: '^%s+(}|done)%s*$'
}
}
The problem is that the opening curly brace ({
) doesn't open a new indent. The do
keyword works. I don't know why.
Please help me!
As mentioned in #72, the standard pointer cursor is currently used within the aullar editing widget, where a text editing pointer would be expected.
Would an option to save without stripping whitespace be possible? Right now (literally, like 2 minutes ago), I had to redo a PR for pconfigure because Howl stripped whitespace.
I personally don't mind, but this isn't the first project where I've had to open gedit to add back spaces for my PR to get merged...
ryan@DevPC-LX:~/langtest$ howl x.inc
[string "/usr/local/share/howl/lib/ext/scintillua/lexer.lua"]:998: Lexer hypertext does not exist
** (howl:26989): CRITICAL **: Failed to run script: /usr/local/share/howl/lib/howl/init.lua:142: [string "/usr/local/share/howl/lib/ext/scintillua/lexer.lua"]:998: Lexer hypertext does not exist
ryan@DevPC-LX:~/langtest$
I'm running on an OSX and during the make process, this error pops up. I've installed glib via Homebrew and still it calls that error. Anyone know what I can do to fix this?
Steps:
Expected:
buffer-reload should prompt that reloading will lose buffer changes and reload should work.
Example:
abc//def
In Howl, the //def
isn't highlighted as a comment. Same thing for abc/*def*/
. This GitHub lexer does it correctly.
Steps to reproduce:
x.c
).In the Scintilla-based Howl, this would delete the auto-inserted right parenthesis. In aullar, it doesn't.
I have a feeling I'm going to get kicked out of the howl-editor organization if I keep on opening aullar-related issues. :)
Basically:
class
. The line will look normal.The website says that ctrl_p
opens a project. But, later, on, it says that ctrl_p
switches buffers. It's actually ctrl_b.
I'm not quite sure if this is an issue with the curly_mode
bundle or an issue in the handling of code blocks. Basically, try entering this:
if (1) {
} else if (1) {
After you enter the second left curly brace, hit Enter. Instead of auto-indenting, it just goes to the next line.
I'm guessing this might be a bug in the code block handling because of this line in modes/basic_modes.moon
:
{ '{%s*$', '^%s*}', '}'}
and this in editing/formatting.moon
:
if prev_line\umatch(block_end_p) and ends_previous_block(prev_line, block_start_p)
return false
I'm pretty sure this causes the example to not auto-indent.
A warning here would be useful, so I can cancel and reload the buffer.
Hello! I downloaded 0.1 version and it compiled cleanly. However, when I try to run it, I get
$ ./howl
(howl:11195): GLib-GObject-WARNING **: g_object_set_valist: object class `GtkLabel' has no property named `xRд\xf5\xff\xff\xff`\xea\xed\xb4\xf7\xff\xff\xffH\u001fݴ\xf5\xff\xff\xff\xe8\u001eݴ\xf5\xff\xff\xff\xa0\xc1'
Segmentation fault(core dumped)
The strange property name is different every time I run howl.
I'm using Ubuntu 12.04 32bit. I installed GTK+ with apt-get install libgtk-3-dev
. My compiler is gcc 4.6.3.
I just start up Howl, and this comes up:
Failed to find application icon
I thought I had just screwed up my system somehow, until @bunster got a similar error:
Failed to load application icon: ../lib/ljglibs/gtk/window.moon:96: Couldn't recognise the image file format for file '/Users/boonie/Projects/howl/share/icons/hicolor/scalable/apps/howl.svg' (code: 3)
Steps:
E.g.
replace
always replaces globally, even if selection activehowl-moon-eval
evaluates the line, even if selection activeHowever binding a shortcut to howl-moon-eval
and then invoking they shortcut works correctly (i.e. evals selection, not line)
I noticed the docs say "and this if sadly enough". I think you meant "and this is sadly enough". Just saying...
The new clipboard is great. However, it can be frustrating because nothing copied leaves Howl's clipboard. Therefore, if I want to paste something anywhere else, I have to use GEdit. My idea is to edit Howl's clipboard AND the system clipboard. If that won't work, another idea is a ctrl+shift+c command that modifies both clipboards.
Also, could editor-paste be modified to paste from the system clipboard if Howl's is empty? Again, not being able to paste from external sources can be really frustrating at times.
Invoking replace (Alt-X replace ENTER) runs the command but the first prompt is
:replace 'replace' with |
I don't get a chance to enter the target text.
I unintentionally overwrote an unimportant file in /tmp because I typed 'save-as /tmp/x' and hit ENTER. The overwritten file was not called 'x' but happened to be the first match in the completion list for 'x'.
I'm not sure what it is. All I know is that, since some recent update, I can't to to the next search match. If I press Ctrl-F
to search, search something, and press Ctrl-F
to go to the next occurrence, nothing happens. Same thing for Ctrl-R
to go to the previous match.
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.