| Age | Commit message (Collapse) | Author |
|
|
|
Avoid intermediate shell.
|
|
:e without any argument can be used to reload the file from
disk whereas before a "Filename expected" error would be
displayed.
|
|
Close #387
|
|
We use an adapted variant of sam's structural regular expression
based command language. The initial implementation was partially
based upon the following functions from sam / acme:
* parse.h / edit.h (struct definitions)
* cmd.c / edit.c (functions parsecmd, simpleaddr, compoundaddr)
* xec.c / ecmd.c (cmdexec)
* address.c / addr.c (address)
It turns out the relevant code can be traced back to the initial
X11 port of sam which is distributed under an ISC-like license
instead of the Lucent Public License Version 1.02 used for Plan 9,
plan9port and 9base.
http://www.netlib.org/research/
http://www.netlib.org/research/sam.shar
Hence we switch to the simpler license variant.
Close #238
|
|
The help formatting could probably be improved, short
single line help texts are still missing. Patches welcome.
Close #283
|
|
|
|
|
|
Fixes #364
|
|
Handling of unbalanced quotes could probably still be improved.
Closes #344
|
|
|
|
Try to display a shorthand version in the status bar, this currently
only works for files below the current working directory of the editor
process.
|
|
Previously the interactive mode was implicitly enabled by passing
an invalid range. However for some use cases (e.g. completion) we
need to be able to pipe a given text range to an external process
without also redirecting stderr (which is used to draw the slmenu
interface on top of vis).
|
|
This fixes the argument parsing for the :{un,}map-window commands.
|
|
This has the effect that multiple filter commands can be undone together.
|
|
This is needed to make the vis.event.start Lua callback useful,
setting global options should be possible even if no windows exist
yet.
The :set command options should probably be cleaned up further,
some of them apply only to the currently active window while others
have a global effect.
|
|
|
|
The built in commands should always be available.
|
|
|
|
Also in visual mode, warn if :w is not forced by ! because the file
will be reduced to the active selection.
|
|
There are some nasty differences between the meaning of ^ in
Plan 9's regexp library and POSIX when using REG_NEWLINE.
The former only matches at the beginning of a line wheras the
latter matches the zero-length string immediately after a
newline character \n. As a result this also matches after the
very last newline at the end of the file.
This is undesired behavior for a command like :x/^/c/#/
Hence we try to filter out this last match.
Close #264
|
|
Close #263
|
|
Signed-off-by: Steven Noonan <steven@uplinklabs.net>
|
|
If no address is provided these commands no longer apply to the whole
line, but instead will insert the output of the external program
at the current cursor location.
|
|
Close #220
|
|
|
|
|
|
|
|
|
|
|
|
This should fix a segfault when using :q while multiple selections
are active.
|
|
The end range should still be respected, previously it would continue
looping for all lines until the end of file.
|
|
|
|
|
|
If only line numbers are given (either in absolute or relative form)
we treat it as motion instead of a range specifier. That is :nn moves
to line nn, but does not select it.
This should however not affect other range specifiers such as :n,m
|
|
For commands like :q the view might already have been freed
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The following vi commands have been dropped:
- saveas
- xit
- !
The following commands are only recognized in their short form:
- e (edit)
- q (quit)
- s (substitute)
- w (write)
- r (read)
|
|
|
|
Eventually this should be rewritten as an internal command.
|
|
|
|
The following should now work:
:sam x/^static/ .,+/^\}/ { i/<</ a/>>/ }
|
|
These commands can be followed by an address which changes the
range to which the sub command applies. The looping construct
should then continue at the position of the last change within
the original range.
A previously problemeatic example:
:sam x/^static/ .,+/^\}/ c/replaced
|
|
|
|
It replaces current range with the file content. However in the common
case the range is actually defaults to the whole file which is probably
not what is expected.
|