News for hackers. Stuff that matters.
Re:Vis: A Vim-Like Text Editor by dhoe on Thursday April 07, 2016 @04:22AM (#11445618)
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 this
Re:Vis: A Vim-Like Text Editor by martanne on Thursday April 07, 2016 @05:42AM (#11446003)
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 by chris_wot on Thursday April 07, 2016 @04:42AM (#11445711)
What does :v do?
Re:Vis: A Vim-Like Text Editor by efaref on Thursday April 07, 2016 @04:53AM (#11445788)
: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".

Re:Vis: A Vim-Like Text Editor by chris_wot on Thursday April 07, 2016 @06:04AM (#11446092)
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 <vcl\/button\.hxx>/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 by creshal on Thursday April 07, 2016 @05:10AM (#11445854)
Which neatly maps to grep's -v option that does the same.
Re:Vis: A Vim-Like Text Editor by amelius on Thursday April 07, 2016 @05:39AM (#11445990)
I always thought "-v" meant "verbose" traditionally in Unix command line options.
Re:Vis: A Vim-Like Text Editor by creshal on Thursday April 07, 2016 @05:50AM (#11446036)
No tradition without exceptions.
Re:Vis: A Vim-Like Text Editor by richy_rich on Thursday April 07, 2016 @04:51AM (#11445775)
It's the same as :g!/error/d I believe