Commit Graph

31754 Commits (master)

Author SHA1 Message Date
John Benediktsson 440b56a9f0 misc/vim: dos2unix factor-docs.vim. 2020-06-08 11:21:09 -07:00
John Benediktsson d9210f738d editors.vim.generate-syntax: merge in factor.vim.fgen. 2020-06-08 11:21:09 -07:00
Doug Coleman b0b5c31821 build.sh: Change WORD size detection to use preprocessor. 2020-06-07 11:43:39 -05:00
Dusk 70cf73b032 fixup! [misc] vim/syntax: Fixups
(Thanks, @mrjbq7!) Now:
+ `CHAR:` literals highlight the whole next token.
+ `0b...` binary literals don't require invalid `+=0b` or `-=0b` syntax.
+ Float literals can't start with a `,` separator.
+ Float literals can have exponents with `,` separators.
+ `foo: ...` stack effects function as intended in general.
+ Syntax clusters might be a bit cleaner with `g:factor_syn_no_error`.
+ Error match priority should be cleaned up.
2020-06-07 05:35:13 +00:00
Dusk f70ce01b51 editors.vim.generate-syntax: Match new generation
Also update the vim/syntax README.
2020-06-06 20:32:17 -07:00
Dusk 35b8621306 [misc] vim/syntax: Fixups
(Thanks, @mrjbq7!) Now:
+ `CHAR:` literals highlight the whole next token.
+ `0b...` binary literals don't require invalid `+=0b` or `-=0b` syntax.
+ Float literals can't start with a `,` separator.
+ Float literals can have exponents with `,` separators.
+ `foo: ...` stack effects function as intended in general.
+ Syntax clusters might be a bit cleaner with `g:factor_syn_no_error`.
2020-06-06 20:31:59 -07:00
John Benediktsson 0a8cb5f2c1 misc: adding a syntax-test file. 2020-06-06 19:04:21 -07:00
John Benediktsson 61635500f2 vim: missed a char in 0b fix. 2020-06-06 19:02:21 -07:00
John Benediktsson ddf498d5ad vim: fix syntax highlighting of CHAR:, 0b, NAN:. 2020-06-06 19:00:41 -07:00
Dusk 14b1418f6a [misc] vim/syntax: Overhaul syntax highlighting
Also fixes comments in a lot more places than a few commits ago.

Syntax like the following is proper, and the comment highlighting fixes
from last commit make the incorrect highlighting here really stand out:

```factor
USE: ! only this line highlights
  kernel
```
2020-06-07 00:10:18 +00:00
Dusk 35799f8d2d [misc] vim/syntax: Avoid extra group captures 2020-06-07 00:10:18 +00:00
Dusk 686f707078 [misc] vim/syntax: Very magic patterns
From Vim's |pattern.txt|, |/\v| |/\V|:
> Use of "\v" means that after it, all ASCII characters except
> '0'-'9', 'a'-'z', 'A'-'Z' and '_' have special meaning: "very magic"

This mostly makes some upcoming syntax pattern refactoring cleaner,
though most patterns still get shorter here.
2020-06-07 00:10:18 +00:00
Dusk 11757d87fb [misc] vim/syntax: Proper comment precedence
Now comments, a lexer level feature, won't get beat out by rather normal
syntactic parser constructs like `STRUCT:`.
2020-06-07 00:10:18 +00:00
Dusk 710b54869a [misc] vim: Hygenic text width highlights
This lets Factor's overly long line highlighting avoid bleeding over
into documentation source buffers, or buffers of other non-Factor file
types entirely. Also, by taking `:2match` instead of `:match`,
clobbering of most user matches (or vice versa) can be avoided.

Unfortunately, the highlighting effects all windows in a multi-buffer
split setup, but since we can't reasonably make this a `:syntax match`
group, it'll have to do. (And this behavior isn't new.)
2020-06-07 00:10:18 +00:00
John Benediktsson 35681032d9 ui.tools.listener: change previous/next line to multiline-editor. 2020-06-06 16:47:30 -07:00
John Benediktsson 02386eebcc ui.tools.listener: document emacs-style keybindings for now. 2020-06-06 16:28:40 -07:00
John Benediktsson 4f51adf8bf Revert "ui: better support for Emacs-style key bindings."
This reverts commit 928b4c6abc.
2020-06-06 16:20:21 -07:00
John Benediktsson e446f34280 Revert "ui.gadgets.editors: adding Ctrl-u support."
This reverts commit 046d128c97.
2020-06-06 16:19:51 -07:00
John Benediktsson 5c04baf757 Revert "ui.gadgets.editors: make Ctrl-A select-all if at column 0."
This reverts commit 9287b05d57.
2020-06-06 16:19:50 -07:00
John Benediktsson 43c2ffead2 Revert "ui.tools: change Alt- to Ctrl-Shift- for tools."
This reverts commit 9c3908e003.
2020-06-06 16:19:43 -07:00
John Benediktsson a9ad206edc ui.backend.gtk: don't let input-methods steal key-presses. 2020-06-06 16:09:15 -07:00
John Benediktsson 9c3908e003 ui.tools: change Alt- to Ctrl-Shift- for tools. 2020-05-29 14:59:45 -07:00
John Benediktsson 9287b05d57 ui.gadgets.editors: make Ctrl-A select-all if at column 0. 2020-05-29 14:56:58 -07:00
John Benediktsson 09c867f747 images.pbm: use not. 2020-05-28 09:13:51 -07:00
John Benediktsson 6e23222187 logic: use not. 2020-05-28 09:13:44 -07:00
John Benediktsson 046d128c97 ui.gadgets.editors: adding Ctrl-u support. 2020-05-27 20:01:33 -07:00
John Benediktsson 928b4c6abc ui: better support for Emacs-style key bindings.
This changes a bunch of things like Ctrl-E for edit becomes Alt-E
(Cmd-E on macOS).  I think that's overall nicer, but let's play with it.
2020-05-27 19:49:30 -07:00
John Benediktsson 32fa577368 ui.gadgets.editors: can just use preedit-start>> as boolean. 2020-05-27 12:52:45 -07:00
John Benediktsson 258d7e05d6 models: cleanup docs for $slots. 2020-05-27 12:51:31 -07:00
John Benediktsson 82a34fe4b8 ui.gadgets.editors: fix off-by-one. 2020-05-27 11:50:04 -07:00
John Benediktsson c781933d6b ui.gadgets.editors: fix page-up/page-down behavior. 2020-05-27 11:43:29 -07:00
John Benediktsson f2189a32f4 ui.gadgets.editors: cleanup docs for $slots. 2020-05-27 11:43:12 -07:00
John Benediktsson c8afb239a0 ui.gestures: clean docs for $slots. 2020-05-27 11:18:20 -07:00
John Benediktsson d0a694a7fe ui.gadgets.tables: change hook>> to be called on all row-actions.
Not just when a selected-row was available and action>> was called.
Also, call the hook after the action, not before.
2020-05-27 09:59:42 -07:00
John Benediktsson 75d5a8a8f9 ui.gadgets.tables: cleanup docs for $slots. 2020-05-27 09:59:42 -07:00
John Benediktsson 3ee93ee68d lexer: cleanup docs for $slots. 2020-05-27 09:59:42 -07:00
John Benediktsson 10e19a3944 threads: cleanup docs for $slots. 2020-05-27 09:59:42 -07:00
Doug Coleman 0fb44180c0 db.sqlite.ffi: Update the sqlite3 bindings a bit. 2020-05-26 21:16:11 -05:00
John Benediktsson 130c1d8dd6 ui.gadgets.editors: fix page-up/page-down with one line. 2020-05-26 10:53:16 -07:00
John Benediktsson 8f3ce6f49a punycode: adding basic support for Punycode (RFC 3492). 2020-05-26 10:05:43 -07:00
Doug Coleman b1f29dc497 ui.backend.x11.keys: Enable numpad navigation keys for when numlock is off.
I recently got a Model F keyboard and the arrow keys weren't mapped.

To see the keycodes on Linux:

```
IN: ui.backend.x11.keys
: code>sym ( code -- name/code/f action? )
    dup . flush
    dup codes at* [ nip dup t and ] when ;
```

Also try ``USE: gesture-logger``
2020-05-22 18:18:31 -05:00
Doug Coleman 131c91b786 gesture-logger: Add as a demo! 2020-05-22 18:18:31 -05:00
John Benediktsson 02dd86a37d help.html: better tests, don't just drop the result. 2020-05-22 16:01:25 -07:00
John Benediktsson 0db8b2d012 help: some test fixes for recent behavior changes. 2020-05-22 14:41:00 -07:00
John Benediktsson ad1e4dcd11 help: change the "help" word-prop to store the actual documentation.
Change word-help to massage the $inputs and $outputs when requested.

Revert the help.lint.coverage checks to still look for $values.
2020-05-22 10:48:34 -07:00
John Benediktsson 409ce057f3 Revert "help.lint.coverage: change $values to $inputs and $outputs."
This reverts commit 61102548f4.
2020-05-22 10:47:27 -07:00
John Benediktsson 150c6a6554 help.html: adding back the link to factorcode.org.
It should probably be a cool logo or something...
2020-05-22 10:14:55 -07:00
timor 655f54af19 shell.nix: supply `wrapFactor` helper to make standalone factor binary
This adds the shell function `wrapFactor`.  This function is intended to wrap
the result of calling `build.sh` in the shell environment so it can be executed
outside of the nix shell.

Example:

```
$ nix-shell
[nix-shell] $ ./build.sh bootstrap
...build factor vm and image...
[nix-shell] $ wrapFactor .
exit
$ ./factor
```

`wrapFactor` takes the path to the factor root dir as argument, and expects the
binary `factor` and the image file `factor.image` there and uses Nixpkgs'
`makeWrapper` to wrap the `factor` executable in-place with the correct
`LD_LIBRARY_PATH`.  Afterwards, the factor executable can be called outside of
the nix-shell environment.
2020-05-22 17:11:26 +00:00
John Benediktsson 802bb073b0 help.html: better navbar on iPhone. 2020-05-22 10:03:39 -07:00
John Benediktsson e2fa0a6392 ui.backend.cocoa.views: fix jittery resize.
This could still be improved since this current approach pauses Factor
execution when the window is being resized, and it could instead
maybe detect inLiveResize or something and be smoother.
2020-05-22 08:23:20 -07:00