Commit graph

79 commits

Author SHA1 Message Date
Saul Reynolds-Haertle
987bf32976 move src/styling.ts into src/content 2018-09-29 18:03:36 -07:00
Saul Reynolds-Haertle
3100dca4a3 move src/number.clamp.ts to src/lib 2018-09-29 18:03:36 -07:00
Saul Reynolds-Haertle
3160137c57 move src/messaging.ts to src/lib/ 2018-09-29 18:03:36 -07:00
Saul Reynolds-Haertle
c531aa5481 Move src/config.ts to src/lib/ 2018-09-29 18:03:36 -07:00
Saul Reynolds-Haertle
10248f4cee Move src/logging.ts to src/lib/ 2018-09-29 18:03:36 -07:00
Oliver Blanthorn
ede3936b82
Add rudimentary settings completion
Obvious enhancements: allow for setting.key.subkey completion; add docstrings; add all options for settings.
2018-08-21 20:06:13 +01:00
glacambre
e6639ceb85
Fix aliases breaking excmd completion
As mentioned in https://github.com/cmcaine/tridactyl/issues/912, there
was a problem with aliases preventing some excmd completion options from
being displayed. For example, `b` would be expanded to `buffer` in the
command line completion mechanism and thus prevent `back` from being
displayed.

This commit fixes that by treating aliases as "real" excmds when
building completion sources. Basically, we check for aliases to the
prefixes given as CompletionSource parameter and add them to the list of
prefixes that can trigger the completion source.

We use this opportunity to remove the constraint of having to add a
space to each prefix, they're instead automatically added by the
CompletionSource constructor.
2018-08-17 23:09:17 +02:00
glacambre
35466971b7
Implement basic excmd completion
This implements excmd completion. We're using the typescript compiler
API in order to get the documentation and the type of every function of
Tridactyl and generate a file named "src/metadata.ts" which contains
this information. Since this file is dependency-less it can be imported
from every source file.

We then write a regular completion source which just uses the data
contained in metadata.ts in order to generate its completions.
2018-08-05 17:12:49 +02:00
Oliver Blanthorn
756c29673a
Fix #850: Dodgy yy
I don't quite understand how it worked at all without focusing the commandline first.

Peppered code with some more awaits as part of debugging and couldn't be bothered to test which were necessary.
2018-07-26 10:17:46 +01:00
glacambre
cb06d3b9d5
Fix fillcmdline_tmp not closing the cmdline when changing tabs 2018-07-05 19:50:32 +02:00
glacambre
8211a435e4
fillcmdline_tmp: Don't close the cmdline if its content changed 2018-07-01 18:17:35 +02:00
glacambre
bcc13786dc
Make fillcmdline replace cmdline content on empty string 2018-07-01 17:30:10 +02:00
glacambre
52f8cd7060
Implement notification mechanism that does not steal focus 2018-06-30 16:59:10 +02:00
glacambre
9e225db2d4
Split completions in multiple files, move them to src/completions 2018-06-19 07:59:39 +02:00
glacambre
575693a65e
Implement :bufferall 2018-06-17 06:21:10 +02:00
Bruno Oliveira
0feaa3d2ca
Improve Tridactyl theming capabilities 2018-05-20 16:22:46 +01:00
Oliver Blanthorn
c948658e56
Fix #446: you can now edit completions you select with space 2018-04-27 16:45:50 +01:00
Colin Caine
8e05cd2918 Don't record empty strings or src/controller.tss. Don't send them to exstr parser either. 2018-04-25 22:30:57 +01:00
glacambre
8f70717f18
commandline_frame.ts: Make <Space> put selected completion in cmdline 2018-04-14 10:41:16 +02:00
Oliver Blanthorn
095ce771ea
Formatting: run all typescript through prettier 2018-04-13 19:28:03 +01:00
Fabian Furger
7ceaf84358 Apply theme to command line
Use dark theme from
https://gist.github.com/KrazyCavin/cebb807e961a4a32bb04aa0c1757bab8
Relates to #230.
2018-03-08 21:57:21 +00:00
Colin Caine
8a500bbf92 Blur iframe after clipboard actions 2018-02-19 00:15:44 +00:00
Colin Caine
0693cdc45d Merge remote-tracking branch 'origin/master' into HEAD 2018-01-28 15:04:47 +00:00
Isaac Khor
1203dbd86b
Make let/const consistent 2018-01-09 17:33:52 +08:00
Isaac Khor
1a20a646b5 Extract core aliasing functionality into separate file and change to recursively expand aliases 2018-01-09 00:15:06 +08:00
Koushien
dbf3ad8414
Support Emacs-style C-(a|e|k|u) in cmdline
By default, C-c in Vimperator copies selection if
present. We reimplement this.
2018-01-05 21:36:12 -08:00
Isaac Khor
2441fba8c0 Merge branch 'master' into i236-common-ex-aliases 2017-12-31 16:57:57 +08:00
Isaac Khor
29d58cd571 Change from 'alias' to 'command' and access config options differently 2017-12-31 16:53:35 +08:00
Isaac Khor
6a27bae92f Implement suggestions - don't use vars where unnecessary 2017-12-31 16:00:00 +08:00
Colin Caine
53e51497e7 logging: rewrite in OOP style 2017-12-30 00:46:26 +00:00
Colin Caine
f398895dce logging: introduce convenience functions 2017-12-29 23:58:23 +00:00
John Beard
baefd09973 Allow levelled logging for debug
This is useful for suppressing spew, but still allowing easy debugging
when needed, without rebuilding.

To use, use excmd:

     setlogginglevel <prefix> <level>

Where the level is one of:

    - never:  never log
    - error
    - warning
    - info
    - debug:  most verbose

Output is directed to console methods "error", "warn", "log", "debug".
2017-12-29 18:57:16 +00:00
Isaac Khor
eb57556e09 Comment alias autocomplete implementation 2017-12-28 18:49:20 +08:00
Isaac Khor
92cdb3a5f4 Implement autocompletion 2017-12-28 17:58:52 +08:00
Colin Caine
51f488463a commandline: Fix #170
The whole commandline is a mess that needs to be rewritten :(

Should change size with a mutation observer on the body element,
probably.
2017-12-01 12:12:56 +00:00
Oliver Blanthorn
9fc0e9c0cf
Fix #167: Add bmarks command for searching through bookmarks 2017-11-30 17:02:31 +00:00
Oliver Blanthorn
11155e82ba
Add fish-style history search, fix clamp bug, improve variable names 2017-11-26 14:06:13 +00:00
Oliver Blanthorn
347c1f5d7a
Prevent focus from leaving the command line 2017-11-25 23:15:45 +00:00
Oliver Blanthorn
86662e1dbc
Prevent Firefox from giving focus to omnibar from cmdline 2017-11-25 15:16:08 +00:00
Oliver Blanthorn
88298b7bc9
Move ^j,^m nearer to enter, fix tabs 2017-11-25 15:12:40 +00:00
Arkadiusz Drabczyk
d5eb22e4a8 Add C-j and C-m keybindings 2017-11-25 16:03:53 +01:00
Oliver Blanthorn
ef3bb11654
Add shift-tab bind for completion 2017-11-24 19:17:51 +00:00
Oliver Blanthorn
a04c693e68
Start next/prev functions for completions 2017-11-23 21:48:48 +00:00
Oliver Blanthorn
7a747312ee
Start work on history completions 2017-11-23 19:55:46 +00:00
Colin Caine
2611f4fe79 cmdline: clear input faster 2017-11-22 23:01:34 +00:00
Colin Caine
8a44732227 completions:
Done:
	Working completion for buffers
	Substitute values into command line
	Prepare for non-buffers completions
	Wrote too many classes and helper functions

Todo:
	Learn inferno and hopefully simplify
	If not, simplify the main functions so that people can actually
	build for it.
	Define an interface for tabbing through options
	Allow more than one CompletionSource per command
2017-11-22 21:43:29 +00:00
Colin Caine
8d771e578c completions 1 2017-11-22 21:30:37 +00:00
Koushien
f982233a49 completions: initial implementation
This commit squashes a load of work by @Koushien, a dozen hours from
@cmcaine and some CSS by @bovine3dom.

@cmcaine is writing this commit message, but the work was mostly by
Koushien so the author is set to them. Thanks Koushien!

The following issues need to be fixed:

 - The interface is over complicated (my fault)
 - commandline_frame is hard-coded to use BufferCompletionSource. This
   needs to be made more general
 - BufferCompletionSource should be generalised
 - completions.ts calls helper functions in commandline_frame. Should
   just use browser proxy. If that's too slow can define a
   completions_background.ts

After that's done, this should be fixed:

 - Completion hiding/unhiding is currently too messy.
2017-11-22 21:30:37 +00:00
Oliver Blanthorn
85d6eba2b5
Revert "Merge branch 'Koushien-completions'"
This reverts commit 0aa14bb754, reversing
changes made to eae9cd0dab.
2017-11-21 20:28:48 +00:00
Koushien
cf620959ec Do not merge: quick WIP
In case I get hit by a bus or something.
Reminder to myself to rebase next commit on
previous patch for some coherency.
2017-11-21 05:15:52 +00:00