| Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
|
|
|
|
|
|
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.
|
|
View should only display the file content, but not modify it.
|
|
This is a bit of a hack, since now the callers range
is modified. The various cmd_* functions should probably
take a const Filerange pointer as argument and modify
a local Filerange variable if needed.
|
|
|
|
Currently the following arguments are accepted:
{count} Go to older text state {count} times.
{N}s Go to older text state about {N} seconds before.
{N}m Go to older text state about {N} minutes before.
{N}h Go to older text state about {N} hours before.
{N}d Go to older text state about {N} days before
|
|
|
|
|
|
|
|
If no range is given then stdin is passed through which allows
interactive usage as in
:!ls -1 *.c | slmenu
For this to work the command needs to use stderr for its user
interface and write any data for vis to stdout.
|