Commit graph

732 commits

Author SHA1 Message Date
glacambre
c0bffbd4e3
commandline_frame.ts: Remove unnecessary insert_completion_or_space fn 2018-11-01 18:43:59 +01:00
Oliver Blanthorn
2119bbea3e
Merge branch 'undo-tab-window-recent' 2018-11-01 17:27:48 +00:00
glacambre
b680cc638c
Document editor functions 2018-11-01 16:39:16 +01:00
glacambre
1b6b712c2b
excmds.ts: Merge ex/insert commands
This commit merges ex and insert commands that behave the same under a
single text.* namespace. document.activeElement is used in order to
figure out if the command should move the caret in the page or in the
command line.
2018-11-01 15:54:31 +01:00
Anton Vilhelm Ásgeirsson
e0fdeeb54e Add error handling to undo excmd and remove session limit. 2018-11-01 13:32:12 +00:00
Oliver Blanthorn
b4cab5afe0
Mention that find mode is broken 2018-10-31 14:29:29 +00:00
glacambre
00c01ec6ec
Enable rebinding keys in command line
We re-use the ex-command parser in order to enable rebinding keys in
command-line mode. Command-line manipulation is re-implemented using
previously-abstracter editor commands.
2018-10-31 08:16:58 +01:00
Anton Vilhelm Ásgeirsson
7bae3e77ae Refactor undo excmd to explicitly undo tabs, windows or recent.
This addresses issue #772 and adds functionality for "basic" tab and window
undo. Supplying either tab or window to the undo excmd will explicitly restore
the most recently closed item of the specified type.

Undo now has a return value of the [tab|window]Id or -1 if no matches are made.
Currently it looks like window ids aren't being used/kept when closed so that
might be a small gotcha.

This does not address the problem of the currently default "recent" mode where
seemingly random windows are reopened when no tabs fitting the current window id
are available.

U is now bound to `undo window` to specifically reopen windows.
2018-10-30 20:06:04 +00:00
glacambre
61499fa19a
excmds.ts: Move content of im_* functions to lib/editor.ts
This commit moves the content of the im_* functions to their own file,
lib/editor.rs. This enables a bit of refactoring since the functions are
not subject to the constraints set by the macro preprocessor. This also
makes re-using the editor functions later easier.
2018-10-30 09:10:49 +01:00
Oliver Blanthorn
454a63e779
Merge pull request #1110 from WhiteAbeLincoln/master
Add Fullscreen{Change,Enter,Left} autocommand events
2018-10-29 10:53:40 +00:00
glacambre
26169efea1
excmds.ts: Fix setpref breaking user.js when value contains spaces
Before this commit, `:setpref my_pref "my value"` broke user.js by only
writing '"my' to the file. This created a syntax error and prevented
firefox from reading the rest of the file. This commit fixes that.
2018-10-27 13:20:18 +02:00
Abraham White
bcfdd1dadb Mark fullscreenhandler function as hidden from docs 2018-10-25 22:59:47 -06:00
Abraham White
2563ddd505 Rename prefixed variable to prevent future name clashes 2018-10-25 22:54:25 -06:00
Abraham White
985e20cf5c Add Fullscreen{Change,Enter,Left} autocommand events 2018-10-25 22:40:25 -06:00
glacambre
f5873ea5ca
excmds.ts: Make idFromIndex('#') default to activeTab if no prev tab
This commit makes idFromIndex("#") return the id of the currently active
tab instead of undefined when only one tab is open. This makes
Tridactyl's "#" behavior closer to vim's, but not 100% the same.

This closes https://github.com/tridactyl/tridactyl/issues/918 .
2018-10-25 07:52:17 +02:00
Oliver Blanthorn
42384cf0a7
Add reloadallbut command 2018-10-19 12:39:48 +01:00
Oliver Blanthorn
44f4714e31
Merge branch 'trigdactyl' 2018-10-17 21:05:31 +01:00
Oliver Blanthorn
aeb491f55e
Update scrollto documentation 2018-10-17 21:05:19 +01:00
Oliver Blanthorn
701ac4c4d0
Merge branch 'setpref' 2018-10-17 20:58:52 +01:00
Oliver Blanthorn
e85883b4e3
Fix broken build 2018-10-15 17:34:05 +01:00
Shou Ya
41e2462cc8
allow executing bookmarklets 2018-10-15 14:24:31 +08:00
Oliver Blanthorn
a555c6a330
Merge pull request #1072 from tridactyl/exclaim_why
[RFC] Try to make exclaim give better errors
2018-10-12 17:11:05 +01:00
glacambre
2acce706e0
Implement setpref excmd 2018-10-12 11:42:31 +02:00
Oliver Blanthorn
c4108c4ac1
Be careful what you wish for, antonva 2018-10-11 13:52:28 +01:00
Oliver Blanthorn
09063ecdf4
Merge branch 'editor_style' 2018-10-11 10:38:24 +01:00
glacambre
8ae6376081
Turn :bmarks into a proper excmd
Turning `:bmarks` into a proper excmd has several advantages: it will
show up in the `:help` pages, be available for excmd completions and
enbales adding specific arguments (such as "-t") in order to open
bookmarks in other tabs.

This time I'm directly messaging the background script in order to
trigger a tabopen rather than trying to bring tabopen to the content
script.

Closes https://github.com/tridactyl/tridactyl/issues/902.
2018-10-11 11:18:54 +02:00
glacambre
1984a66fb9
Add indication that input is being edited in external editor
This commit adds a .TridactylEditing class to input fields that are
being edited in an external editor. In the default theme, this
corresponds to just adding Tridactyl's logo to the input field.

It looks like it is impossible to reference Tridactyl's logo in CSS and
have it work on non-privileged pages so instead of doing that we add a
step to the build process which turns one of Tridactyl's logo into its
base64 representation and embeds it in the default.css theme file.
2018-10-10 18:54:09 +02:00
Oliver Blanthorn
5c0647242c
Merge branch 'improve_docs2' 2018-10-10 17:53:06 +01:00
Oliver Blanthorn
8327d25c07
Merge pull request #1077 from antonva/zoom-features
Extend zoom excmd keybindings and improve documentation.
2018-10-10 16:16:02 +01:00
Anton Vilhelm Ásgeirsson
8ccb3378e6 Fix erroneous dot in zoom documentation. 2018-10-10 15:13:24 +00:00
Anton Vilhelm Ásgeirsson
2f362b055f Extend zoom excmd keybindings and improve documentation.
This patch improves upon the existing zoom excmd and adds some features present
in Vimperator and Pentadactyl. `zI` and `zO` are now bound to the maximum and
minimum zoom levels respectively. `zM` (read zoom more) zooms in on increments
of 50pp and `zR` (read zoom reduce) zooms out on increments of 50pp.

In addition, overshooting the zoom level while using relative adjustments is now
handled by setting the level to it's max/min zoom level.

An error is thrown if an absolute value is given that is out of bounds of the
allowed zoom range.
2018-10-10 15:01:02 +00:00
glacambre
5a837397f2
excmds.ts: s/cursor/caret/g 2018-10-10 09:28:44 +02:00
Oliver Blanthorn
1123554970
Merge pull request #1073 from joaomsa/feature/control-filename-position-in-editorcmd
Allow control over filename position in editorcmd
2018-10-09 17:24:17 +01:00
Joao Sa
9f39b6fb53 use %f instead of {} for editorcmd 2018-10-09 15:56:02 +00:00
glacambre
e9aabaa865
Slightly improve documentation
This commit removes unnecessary documentation, tries to make the
introduction shorter and fleshes out the documentation of a few
under-documented functions.
2018-10-09 15:57:36 +02:00
glacambre
884b8fbe6d
Make :help configoption work
This commits makes getting to the help page of a configuration option
easier.
2018-10-09 15:57:10 +02:00
glacambre
7375f8b7db
Fix default config doc path
3ec27fd broke the path to the default config documentation when moving
directories around. This commits fixes that.
2018-10-09 15:01:49 +02:00
Joao Sa
fe62ebe96b Allow control over filename position in editorcmd 2018-10-08 23:56:35 +00:00
Oliver Blanthorn
d5de3bf91c
Revert "Turn :bmarks into a proper excmd"
This reverts commit ad5e9db562.

Fixes broken `tabopen -c [container] [url]`.
2018-10-08 22:01:15 +01:00
Oliver Blanthorn
af405af883
Try to make exclaim give better errors 2018-10-08 18:25:37 +01:00
glacambre
771ce6f983
excmds.ts: Fix loadtheme breaking when loading some themes
When trying to load a theme named `test.css`, `loadtheme()` would
attempt to store it in the config as `test.css`. But the config stored
it as an object named `test` which contained a key named `css` and this
broked everything. This is fixed by making sure that users do not
specify the `.css` part of the theme themselves, instead it will be
automatically added when trying to load the file.

Documentation has been updated accordingly.
2018-10-08 14:47:31 +02:00
glacambre
9788600d5d
colourschemes: Add various small improvements
- Update the readme to mention `colors $theme` rather than `set theme
  $theme` because `colors` is more powerful than `set theme`.
- Update the doc
- Version bump native messenger and nativegate check
2018-10-08 14:47:27 +02:00
glacambre
113fd9ef80
Implement loading themes from disk.
This fixes https://github.com/cmcaine/tridactyl/issues/491.
2018-10-08 14:47:06 +02:00
glacambre
ad5e9db562
Turn :bmarks into a proper excmd
Turning `:bmarks` into a proper excmd has several advantages: it will
show up in the `:help` pages, be available for excmd completions and
enbales adding specific arguments (such as "-t") in order to open
bookmarks in other tabs.

Doing this required moving tabopen and some of its dependencies to the
content script.

Closes https://github.com/tridactyl/tridactyl/issues/902.
2018-10-08 09:53:20 +02:00
glacambre
42908799ae
Fix :set noiframeon
`:set noiframeon` has been broken since at least 1a1588a8 because of the
use of target.concat instead of target.push. This caused subsequent
config.set() calls to interpret every url except the last as being part
of the keys that needed to be set in the config rather that as urls that
should be saved in the noiframeon setting.
2018-10-07 13:52:48 +02:00
glacambre
e48951ca3c
excmds.ts: Display error messages when setclip/getclip fails
This commit makes {set,get}clip display error messages when they fail to
interact with the X selection. Somehow exceptions are lost somewhere so
we use fillcmdline manually. This problem will disappear once these
functions are moved to the content script.

Fixes https://github.com/tridactyl/tridactyl/issues/959
2018-10-05 10:36:37 +02:00
WorldCodeCentral
38d83ed323
Correct * href to a href 2018-10-04 19:37:39 +02:00
glacambre
f937a29e8a
Update metadata names
3ec27fd broke the commandline by moving config.ts while
metadata-generation/using code relied on its path. This commit updates
the path. A proper fix is to stop using paths and use names instead.
2018-10-04 17:57:44 +02:00
Oliver Blanthorn
3ec27fd40c
Merge branch 'reorganize-directories' 2018-10-04 13:59:19 +01:00
Oliver Blanthorn
2a05a2ffc7
Merge branch 'performance-counters' 2018-10-04 13:25:11 +01:00