Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Shalabh Chaturvedi
@shalabhc
Jose Quesada
@quesada
awesome, thanks so much
just tweeted about Howl
I hope it gets the recognition it deserves
it could be the next mythical editor, like vim and emacs
the 6ms typing latency is really impressive
it beats all editors I've tried (on linux, no compositing)
it makes typing a real pleasure
Jose Quesada
@quesada
I'm using it to create a personal wiki, with markdown, and lots of internal linking. Is there any way to make links clickable (and open the buffer/file)?
This is a long shot, but do you plan to ever make the edit area able to show inline images? Sublime, emacs do that. Nice for my use case, probably not very interesting for the rest of humanity
Jose Quesada
@quesada
this would also be useful to go to the line of an error/warning on a traceback. For example, python (exec on terminal inside Howl) would list places where the error may be. Clicking it and opening the file, on the right line, would be awesome
Jose Quesada
@quesada
Thanks @shalabhc for answering my questions directly. This is what I got when trying to add text to a buffer "-- send date to current insertion point
howl.bindings.push f3: -> howl.command.run howl.buffer.insert('last contacted: TODO', 1)" -> attempt to get length of local 's' (a nil value)
Shalabh Chaturvedi
@shalabhc
You f
You don't need howl.command.run
Just can the API directly
Run is just for registered commands
Jose Quesada
@quesada
aha! thanks
Jose Quesada
@quesada
it didn't work tho:
-- send date to current insertion point
howl.bindings.push f6: -> howl.buffer.insert('last contacted: TODO', 1)
also, is there any way to set 'save as' to the project folder?
Jose Quesada
@quesada
Jose Quesada
@quesada
I'm thinking about tackling some of these things I need myself. But I have no clue how difficult they are. This one "Is there any way to make links clickable (and open the buffer/file)?"... would I need to edit the buffer editor itself, or is this something you can do with the API already?
Jose Quesada
@quesada
@shalabhc you mentioned on reddit that you got python autocompletion to work (like vim does). Is this anywhere in a public repo? Thanks
I think it was jedi
Shalabh Chaturvedi
@shalabhc
@quesada Here are some more tips:

I put this code in my init.moon

howl.bindings.push
  ctrl_e: 'howl-moon-eval'

Then in any buffer I can select a snippet of moonscript code and press ctrl_e to evaluate it

To get to the current buffer, you need to evaluate this expression howl.app.editor.buffer
image.png
Now you can type this expression in any buffer and eval it, you should see:
(For evaluating a single line, you don't need to select it)
Next step is to insert something at this buffer, this worked for me howl.app.editor.buffer\append('\nhello').
Shalabh Chaturvedi
@shalabhc
Of course this appends to the end of the buffer. If you want to insert at the cursor position, lets look at the Editor API
The Editor is the UI object that displays a Buffer (which represents the underlying document). The cursor and other edit controls are part of the editor. It has an insert method that inserts text at the cursor.

To get the editor you just need howl.app.editor, so this code works for me:

howl.app.editor\insert('hello')

This inserts text at the cursor position

OK, so to finally make it a command:

howl.command.register
  name: 'type-hello'
  description: 'types "hello" at cursor position'
  handler: -> howl.app.editor\insert('hello')

Note that you can just select this snippet in your editor and eval it, the command is immediately registered.

Type alt_x and press tab, start typing type-h and you should see the command. You can run it too.

Finally, let's give it a shortcut:

howl.bindings.push
  f3: 'type-hello'

Now f3 should invoke your new command. Hope this works.

Shalabh Chaturvedi
@shalabhc
To replace a registered command, just eval a new 'register' definition again with new code. Once you are happy with your snippets, move them to init.moon.
Side note: you can use the buffer API to insert text too using insert(text, pos). Since it takes the position, you need to get the cursor position howl.app.editor.cursor.pos and pass it in.
Shalabh Chaturvedi
@shalabhc
Clickability is not implemented yet but something I've wanted. You'd need to modify the Aullar View I think (which is the underlying implementation for the Editor API), but I haven't looked too much into it. Ideally it would be integrated with the marker API. Markers are segments of text in a buffer, that may be highlighted or decorated or just have hidden data attached to them. I don't think the API has docs but you can see test code examples here: https://howl.io/doc/spec/buffer_markers_spec.html
So the idea would be: have markers be clickable and let the API accept a handler function function.
(Aullar View is here lib/aullar/view.moon)
Python autocomplete is not in any repo. I have a half finished implementation of the lang server protocol which would be very useful for Python and other languages.
Thanks for the kind words on HN!
tastyminerals
@tastyminerals
Hey, I am looking into howl/bundles and see a great collection of supported languages. However, D is not there, how come? There is rust, go -- understable, even nim and zig but no D makes me sad.
Shalabh Chaturvedi
@shalabhc
See also https://github.com/howl-editor/howl/wiki/Howl-Bundles#language-bundles - but you're right - no D there either. I think rust and go were mainly community contributions, IIRC? It's just that nobody has contributed D yet. A basic D mode for syntax only would not be that hard, but I'm not that familiar with D. I wonder if we can make it super easy to get the syntax highlighting going for a new language.
Wolf480pl
@Wolf480pl
Hello. Is there a way to make Howl treat newline as a word boundary for the purpose of cursor-word-left and editor-delete-back-word?
Wolf480pl
@Wolf480pl
nvm, I just monkey-patched howl.ui.Cursor.__base.word_{left,right}, seems to do the trick
Damian Gaweda
@dgaw
There hasn't been a lot activity around Howl lately. I hope you guys are well!
For anyone looking for a "Go to definition" command: howl-ctags. I'm the author of this bundle. Let me know your thoughts if you try it out!
Shalabh Chaturvedi
@shalabhc
Hi @dgaw I'm doing well. Just busy with staying at home with kids, etc. Sorry I know there's a long pending PR - the folder search.