| Age | Commit message (Collapse) | Author | Files | Lines |
|
This keeps the existing testing infrastructure, which pipes newline
separated commands to stdin, working.
|
|
|
|
At the command prompt, commands were not recognized properly when the
cursor was placed on a delimiting character (:, ?, /) while pressing
enter.
Fix #653
|
|
|
|
Conflicts:
view.c
view.h
|
|
|
|
|
|
|
|
|
|
|
|
This unifies cursors and selections. The cursor are now represendted
as singleton selections.
|
|
|
|
At some point it should probably be possible to add command prompt
bindings from within Lua. Currently there is no easy/realiable way
to detect the prompt window.
Should improve #526.
|
|
|
|
<Enter> now searches for lines starting with command delimiters to
find the command boundaries.
To actually enter a literal new line use <Ctrl-v><Enter> in insert
mode or `o` / `O` in normal mode.
Also remove the special <Backspace> mapping, does not seem esential
use <Escape> to close the prompt window.
|
|
This is a not yet successful attempt to reduce terminal flickering
when resizing windows as is for example the case when entering
command mode.
UI related debug output can be enabled with:
$ make CFLAGS=-DDEBUG_UI=1
$ ./vis > log
|
|
|
|
This means no event handlers are run for it, hence there is no chance
for recursive errors.
|
|
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)
|
|
For those not familiar with sam(1) more information can be found at
http://sam.cat-v.org/
For now sam commands can be entered from the vis prompt via :sam <cmd>
A command behaves differently depending on the mode in which it is issued:
- in visual mode it behaves as if an implicit extract x command
matching the current selection(s) would be preceding it. That is
the command is executed once for each selection.
- in normal mode:
* if an address for the command was provided it is evaluated starting
from the current cursor position(s) i.e. dot is set to the current
cursor position.
* if no address was supplied to the command then:
+ if multiple cursors exist, the command is executed once for every
cursor with dot set to the current line of the cursor
+ otherwise if there is only 1 cursor then the command is executed
with dot set to the whole file
The command syntax was slightly tweaked to accpet more terse commands.
- When specifiying text or regular expressions the trailing delimiter can
be elided if the meaning is unambigious.
- If only an address is provided the print command will be executed.
- The print command creates a selection matching its range.
- In text entry \t inserts a literal tab character (sam only recognizes \n).
Hence the sam command ,x/pattern/ can be abbreviated to x/pattern
If a command is successful vis switches to normal mode (and hence removes
any selections), otherwise the editor is kept in visual mode. The print
command "fails" by definition.
|
|
|
|
|
|
|
|
The currently visible display port is always adjusted
in a way that the primary cursor is visible.
|
|
This should actually make the search history functionality work.
The :-commands already worked because of commit e745b5ef.
Removing all trailing white spaces would be the wrong thing
to do for the search, because they might be part of the
desired search string.
|
|
Make replace mode a child of insert mode and visual line a
child of visual mode. This means any key binding for the
former is automatically available in the latter. Also keys
can not be unmapped solely from the child modes.
|
|
Display Lua errors in a dedicated window/file. A typo or missing
dependency (e.g. lpeg) in visrc.lua will no longer silently fail
without any indication.
The Lua integration in view.h is not yet converted.
|
|
|
|
Close #70
|
|
|