Live data from Hacker News

Vis: A Vim-Like Text Editor

github.com

21–30 of 166 posts

Re: Vis: A Vim-Like Text Editor

#21
post #3

Looks promising, and support for huge files is a weak point in vim, so I gave it a try. My usual workflow with big logfiles is to zoom into certain types of messages with e.g. :v/error/d and back out with u, and alternatively jump from one occurrence of a string to the next with *. That doesn't seem to work, so for the moment it's not the right 80% for me. But I do think it's a worthy project, so I'll keep an eye on…

Everything involving searching is currently probably very slow for large files, this is especially true for backward searches. The reason being that we currently rely on the regexp engine of libc and thus have to copy the underlying text to a contiguous memory area.

Navigating large files with motions like 50%, 70% should however be instantaneous. Navigating by line number is again somewhat slower, because the file actually needs to be read in this case.

Aside from that :v/ has a different meaning in vis.

Re: Vis: A Vim-Like Text Editor

#22

How would you compare this to the NeoVim project? https://github.com/neovim/neovim

Reposting an answer from a related thread.

The main difference is that vis is written from scratch while neovim inherited an old and hard to maintain code base. This allows vis to experiment with various ideas:

- native multiple cursors/selection support

- structural regular expression support

- different core data structure resulting in efficient large file support

- LPeg based syntax highlighting

- Lua as an in process extension language

- client/server design (not yet implemented)

without having to care about backward compatibility and legacy systems. Of course this has also some drawbacks for example there is no existing plugin ecosystem etc

Re: Vis: A Vim-Like Text Editor

#24
post #15

Sounds similar to Kakoune ( http://kakoune.org/ ) but with Sam expressions

Yes from a design philosophy standpoint vis is closer to kakoune than {neo,}vim. The implementation is quite different though (no C++, no boost, no home grown scripting/extension/syntax highlighting language).

Re: Vis: A Vim-Like Text Editor

#25

How would you compare this to the NeoVim project? https://github.com/neovim/neovim

Reposting an answer from a related thread. The main difference is that vis is written from scratch while neovim inherited an old and hard to maintain code base. This allows vis to experiment with various ideas: - native multiple cursors/selection support - structural regular expression support - different core data structure resulting in efficient large file support - LPeg based syntax highlighting - Lua as an in pro…

Great! I remember last time I looked at Vis it wasn't so far along (it had no Lua integration AFAIK).

When I started submitting code to Neovim my biggest desires for it were (1) Lua extensibility (2) A clean codebase (3) Compatibility with (most) Vim plugins.

Perhaps ZyX-l's Vim to Lua project (for Neovim) could help with (3) at some point, if that's desired.

An LPeg based syntax highlighting was also something in the back of my mind, though way down the priority list. Fantastic to see it implemented, it truly is the right choice (Neovim uses Corsix's C99 LPeg parser for its testing framework, automatically exposing headers in a way LuaJIT's FFI groks).

Does it build with LuaJIT? (Sorry for the perhaps stupid question, I've just glanced at your comments here and the terminal "video".

Keep up the good work.

Re: Vis: A Vim-Like Text Editor

#26
post #12

Earlier quoted context omitted.

What does :v do?

:help :v will tell you: :[range]v[global]/{pattern}/[cmd] Same as :g!. Where: :[range]g[lobal]!/{pattern}/[cmd] Execute the Ex command [cmd] (default ":p") on the lines within [range] where {pattern} does NOT match. So :v/error/d will delete all lines that don't contain the string "error".

Oh! I've been messing about with a bit of splitting up of C++ classes into seperate headers as a bit of a test and I recently did a:

  sed -i "/#include /d" $(git grep -l "vcl\/button\.hxx" *.hxx | grep -v precompiled)
Knowing about a :v might have been helpful...

Re: Vis: A Vim-Like Text Editor

#27
post #19

Looks very good. Definitely going to give it a try. Currently I'm using Neovim and I like a lot the embedded terminal feature. I wonder how easily this can be recreated using a Lua plugin.

> I wonder how easily this can be recreated using a Lua plugin.

It's probably a better idea to use tmux/screen/dtvm for terminals rather than embedding a terminal in a minimal editor.

The TODO list mentions asynchronous event loops, that's necessary to do any plugins with external processes neatly.

Re: Vis: A Vim-Like Text Editor

#28
post #9
post #4

But what does it got that vim doesn't?

Sam expressions for manipulating text. This is a blub thing - if you haven't seen them you might not realise what you're missing out on. Try to imagine an editor where the core idea is a better-sed-than-sed. Two well-known editors to come from the ed tradition: vi and sam. Vi is an obvious evolution - make it 2d. Sam did this as well, but its main focus was developing the expression language. For example, so you can…

If you have libtermkey.so.1 somewhere, you could export LD_LIBRARY_PATH to point to the directory containing it.

More notes on what to do if a build system for a project doesn't link in libraries, and you can't simply install the relevant -dev package through apt-get: http://homepages.inf.ed.ac.uk/imurray2/compnotes/library_lin...

Re: Vis: A Vim-Like Text Editor

#29
Excellent. The more vim the better. I would like to see many of the core vim patterns replicated in other editors:

  - modal over chords
  - text objects
  - the vim "language" which ties it together
  - all the other good stuff, did I mention text objects ?
There is a reason vim has more users today then ever before: once you learn the deceptively simple language you can have deep conversations with your editor.
Post reply on HN