| Age | Commit message (Collapse) | Author | Files | Lines |
|
Close #429
|
|
This should fix isses with `crontab -e` editing.
|
|
|
|
|
|
Specifies how the current file should be saved, `atomic` which uses
rename(2) to atomically replace the file, `inplace` which truncates the
file and then rewrites it or `auto` which tries the former before falling
back to the latter. The rename method fails for symlinks, hardlinks,
in case of insufficient directory permissions or when either the file
owner, group, POSIX ACL or SELinux labels can not be restored.
The option defaults to `auto`.
|
|
There are cases where it is useful to specify how the file should be saved.
|
|
The simple method lpeg uses to create a shared library does not seem
to work in Cygwin.
|
|
This fixes a warning when displaying the manual page on macOS systems.
|
|
These are used by `make standalone` but are not really appropriate
for normal usage and just cause confusion as demonstrated by #373.
|
|
|
|
If lpeg is built statically, this allows for a completely static vis
binary that still supports syntax highlighting.
|
|
Fixes CID 139067.
|
|
Expose text_object_word as an example.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Previously we would also interpret a missing return value `nil` as
is the case when no pre save event handler is subscribed as failure.
|
|
|
|
|
|
|
|
The init event is emitted immediately after `visrc.lua` has been sourced, but
before any other events have occured, in particular the command line arguments
have not yet been processed.
Close #422
|
|
The editor core calls into the functions registered in the `vis.events`
table which then multiplex the events to all registered event handlers.
The first handler which returns a non `nil` value terminates event
propagation.
|
|
The following structure is adapted:
* visrc.lua entry point for all Lua code
* vis.lua only implements the Lua part of the core API
* vis-std.lua registers standard event handlers (e.g. syntax highlighting,
statusbar handling, theme changes etc). It is sourced from vis.lua.
* plugins/* non essential editor functionality, needs to be explicitly
enabled by loading it from visrc.lua
|
|
Close #424
|
|
Also remove the lexers sub directory from the Lua search path.
As a result we attempt to open fewer files during startup:
$ strace -e open -o log ./vis +q config.h && wc -l log
In order to avoid having to modifiy all lexers which `require('lexer')`
we instead place a symlink in the top level directory.
$ ./configure --disable-lua
$ rm -rf lua
Should result in a source tree with most lua specifc functionality
removed.
|
|
Reference external manual page and Lua API documentation.
This is still work in progress the piece table documentation should
probably also be moved somewhere else.
|
|
|
|
A new Makefile target `luadoc` has been added which generates
HTML documentation in the doc subfolder using ldoc(1) from
https://stevedonovan.github.io/ldoc/
There are still a few problems to resovle, for example the links (e.g.
in parameter lists) to our custom types seem to be broken.
At this point only the C part of the Lua API is covered and even
that is not yet complete.
|
|
Reject invalid cursor positions.
|
|
|
|
File type detection works as follows:
1) strip off suffixes to be ignored and test against a
set of known file extensions
2) run `file -bL --mime-type` and check against a set
of known mime types
3) read out the first few bytes of the file and pass
them to custom Lua file type detection functions
For now the configured file extensions are literal strings
which are matched against the end of the file name. Maybe
we should use Lua patterns instead.
We will need to add more mime types to our mapping table.
For now only the `bash` file type was associated with the
text/x-shellscript mime type.
|
|
This avoids warnings like: "_FORTIFY_SOURCE requires
compiling with optimization".
|
|
Only accept numbers in range [0, INT_MAX]. Reject trailing garbage,
where before something like `:set cc 50NaN` worked it will now cause
an error.
Close #418
|
|
The version substitution does not seem to work with BSD make
because ${VERSION} is expanded to an empty string.
|
|
Uses mandoc(1) to generate manual pages in HTML format.
|
|
|
|
They now pass `mandoc -Tlint` (the BSD manpage renderer) and `man
--warnings=w` (the GNU one).
|
|
|
|
Conflicts:
vis.1
|
|
macOS might also have $DISPLAY defined but neither of xclip
nor xsel available. Keep trying different methods until
we succeeded or ran out of options.
Fix #417
|
|
Using the installation date might be misleading and harms
reproducible builds. Omitting the dates completely might
be dangerous because it seems to be a required field:
The only firm requirement of the mdoc prologue is that
the Dd macro comes first: many formatting systems will
read up to the first macro to determine the formatting
language. If Dd is not encountered first, the mdoc format
may not be recognised.
http://manpages.bsd.lv/mdoc.html
|
|
When a file is opened in multiple windows we could end up in an
inconsistent state by doing:
$ vis some-file
:spl
:e
At this point the two windows were referencing different file objects
thus changes in one would not affect the other although they have
the same path.
Another option would be to reload all windows currently displaying
the file being reloaded. We opt for the simpler fix for now.
|
|
|
|
|
|
|
|
|