| Age | Commit message (Collapse) | Author | Files | Lines |
|
The idea is to work more like a finite state machine. Every
function gets an additional argument keys which holds the
already read keyboard input. The return value of the functions
should point to the first not consumed key. A return value
of NULL indicates that more input is needed. The function will
be called again from the editor core when more input is available.
These changes are mostly mechanical and in many cases not
optimal, they will be cleaned up in further commits.
|
|
Key bindings are now specified as symbolic key strings, this
will eventually allow run time configurable key mappings.
This introduces a bulid time dependency on libtermkey which
can be found at:
http://www.leonerd.org.uk/code/libtermkey/
|
|
It now correctly re-edits the file (i.e reloads it from disk).
|
|
|
|
Closes #65
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
I and A creates a new cursor at start/end of every selected line.
|
|
They try to match C-like function definitions. The inner variant
only contains the function body.
|
|
They behave not like in vim, but instead try to find the
start/end of C-like function definitions.
The first character stands for the direction [ for backwards,
] for forwards. The second character denotes the start [ or
end ] respectively.
|
|
|
|
|
|
Also text objects in visual mode should now work better.
|
|
With the current code this will never cause a NULL dereference
since it is checked at the call site. However it makes sense
to check it anyway.
|
|
|
|
Only skip last line break if range comes from linewise visual mode.
|
|
|
|
|
|
This commits introduces the following keybindings, in normal mode:
CTRL-N select word the cursor is currently over, switch to visual mode
CTRL-P remove least recently added cursor
ESC if a selection is active, clear it.
Otherwise dispose all but the primary cursor.
In visual mode:
CTRL-N create new cursor and select next word matching current selection
CTRL-X clear (skip) current selection, but select next matching word
CTRL-P remove least recently added cursor
|
|
|
|
|
|
|
|
|
|
|
|
The operator creates a new cursor at the start of every line covered
by the given range.
It is currently only available as CTRL+O in visual mode.
|
|
|
|
This cleans up the existing selection handling code and adds the
necessary bits to eventually support multiple cursors/selections.
The cursor position is kept track of using marks, which means
retrieving the cursor position is no longer a constant time operation.
Furthermore the terminal cursor is no longer used, instead the whole
window is redrawn after every cursor movement.
|
|
By now ui-curses.[hc] are the only files dealing directly with
curses related functions. Integration of a proper mainloop is
still pending.
|
|
Recognized formats are:
CTRL-V nnn decimal value nnn
CTRL-V onnn or CTRL-V Onnn octal value nnn
CTRL-V xnn or CTRL-V Xnn hex value nn
CTRL-V unnnn Unicode codepoint nnnn
CTRL-V Unnnnnnnn Unicode codepoint nnnnnnnn
Leading zeros can be omitted, any illegal character for the given
format will be ignored and terminates the numerical code.
|
|
If we use the file / virtual memory system as cache (using mmap(2))
and another process truncates the file we are editing, we have a
problem. All we can do is catch the resulting SIGBUS, close the
corresponding window and print a warning message.
To test this use:
$ dd if=/dev/zero of=TEST bs=8M count=1
$ vis TEST
:! echo TRUNCATE > TEST
|
|
Closes #60
|
|
For this to work make sure you have vis-open and slmenu or dmenu
somewhere in $PATH.
For now the file dialog is shown for :open, :split and :vsplit
when the argument is either . (a dot) or looks like a file pattern.
For example
:open *.[ch]
will show a listing of all C source and header files in the current
directory. Use a fuzzy search to make your choice.
|
|
|
|
|
|
|
|
dd on the last line now moves the cursor to the start of the
preceding line.
|
|
|
|
This allows to feed keyboard input from a file as in:
cat keyboard-input | vis input-file
which will be used for testing purposes.
|
|
|
|
|
|
Also apply syntax rules every time the file name changes.
|
|
These movements always keep the cursor on the same line and do
not move over newlines.
|
|
Enable/disable by setting to 0/1 respectively:
:set show spaces=0 tabs=0 newlines=1
|
|
Using FD_ISSET on negative file descriptors results in breakage.
Closes #55.
|
|
While it is slower, it allows to move to characters which are
currently not visible. This will be handy when experimenting
with multiple cursors.
|