Commit graph

1873 commits

Author SHA1 Message Date
glacambre
05915d3dbb excmds.ts: Add im_kill_whole_line
im_kill_whole_line is a function meant to be used when in insert/input
mode. It should be functionnally equivalent to readline's
kill-whole-line. It removes every character of a line, including the
newline character.
2018-09-29 09:22:45 +02:00
glacambre
dbb173770f excmds.ts: Add im_backward_kill_line
im_backward_kill_line is a function meant to be used when in
insert/input mode. It should be functionnally equivalent to readline's
backward-kill-line. It removes every character from the beginning of the
line up to the cursor. If the cursor is at the beginning of the line, it
removes the newline before the cursor.
2018-09-28 22:38:50 +02:00
glacambre
90a501e802 excmds.ts: Add im_kill_line
im_kill_line is a function meant to be used when in insert/input
mode. It should be functionnally equivalent to readline's
kill-line. It deletes every character from the cursor to the end of a
line, merging lines if the character right after the cursor is a
newline.
2018-09-28 22:04:13 +02:00
glacambre
72a44e9f85 excmds.ts: Add im_{upcase,downcase,capitalize}_word
im_{upcase,downcase,capitalize}_word are functions meant to be used when
in insert/input mode. They should be equivalent to their readline
counterparts.
2018-09-28 20:23:33 +02:00
glacambre
7fcee7e3eb excmds.ts: Add im_transpose_words
im_transpose_words is a function meant to be used when in insert/input
mode. It should be functionnally equivalent to readline's
transpose-words. It transposes the word the cursor is in (or, if the
cursor is not in a word, the word before it) with the next word (or the
previous word if the word to transpose is the last word of the text).

The notion of word is defined by the "wordpattern" setting, which is a
regex that matches every character that a word can contain. The default
pattern is [^\s], which means a word can be any character except
whitespace. Other useful patterns could be [^\s/] or
[^\s?,.;:/!()\[\]\\{}"'`+=].
2018-09-28 17:45:39 +02:00
glacambre
f2df3b9e4e excmds.ts: Add im_transpose_chars
im_transpose_chars is a function meant to be used when in insert/input
mode. It should be functionnally equivalent to readline's
transpose-chars. It transposes the character before the cursor with the
one after it and then moves the cursor one character to the right.
2018-09-26 22:29:39 +02:00
glacambre
5138b7bf35 excmds.ts: Add im_tab_insert
im_tab_insert is a function meant to be used when in insert/input mode.
It should be functionnally equivalent to readline's tab-insert. It
behaves like the <Tab> key.
2018-09-26 22:15:34 +02:00
glacambre
1783086c13 excmds.ts: Add im_delete_backward_char
im_delete_backward__char is a function meant to be used when in
insert/input mode. It should be functionnally equivalent to readline's
delete-backward-char. It behaves like the <BackSpace> key.
2018-09-26 22:08:27 +02:00
glacambre
4b830dbaf9 excmds.ts: Add im_delete_char
im_delete_char is a function meant to be used when in insert/input mode.
It should be functionnally equivalent to readline's delete-char. It
behaves like the <Del> key.
2018-09-26 22:07:55 +02:00
Oliver Blanthorn
877b157453
Add seturl completions 2018-09-21 11:43:55 +01:00
Oliver Blanthorn
318423b1e6
Merge branch 'urlspecific_config' 2018-09-21 11:33:23 +01:00
Oliver Blanthorn
40d11e778a
Update package-lock.json 2018-09-21 11:33:15 +01:00
Oliver Blanthorn
173e47c9aa
Merge branch 'fix-search' 2018-09-21 11:18:00 +01:00
Oliver Blanthorn
5e4e1ea7d9
Change stop bind to x to prevent copy conflict 2018-09-21 11:13:44 +01:00
FrankEular
e7a4e6dcf2
Update config.ts: stop loading
I added the command ":stop" and an nmap <C-c> to this command (as in vimperator and pentadactyl).
2018-09-20 16:44:03 +02:00
Oliver Blanthorn
16cb0e5300
Fix #1018: add bind for stop 2018-09-20 13:08:55 +01:00
Oliver Blanthorn
36e99fa24f
Fix #1011: add buffer # ignoremap 2018-09-20 11:00:36 +01:00
Oliver Blanthorn
43fecb3f13
Merge pull request #1017 from notJerl/master
Possible temporary fix for #1016
2018-09-20 10:56:34 +01:00
notJerl
d8a7343a1b
Update History.ts
Fixed accidentally deleted whitespace
2018-09-20 01:07:03 -06:00
notJerl
67c11d66ff
Merge pull request #1 from notJerl/notJerl-patch-1
Update History.ts
2018-09-20 00:57:23 -06:00
notJerl
2d9d9c4d8d
Update History.ts 2018-09-20 00:56:36 -06:00
Oliver Blanthorn
576ff17df6
Merge pull request #1014 from WorldCodeCentral/master
Change :set home to :set homepages
2018-09-19 11:04:24 +01:00
WorldCodeCentral
dfc1e73499
Change home to homepages
Correct documentation of home to show "set homepages" instead of "set home" which was incorrect.
2018-09-19 00:50:45 +02:00
Ivan Solyankin
7a2889dd6c added multiple and numbered %s support for search engines
closes #987
2018-09-18 19:26:53 +03:00
Colin Caine
fe7948c0d0 Alias tabnew to tabopen. Close 2018-09-17 11:55:47 +01:00
glacambre
89cf5f1cb6
Move url-specific config from its own object to a field in global config
This commit moves url-specific config from its own object to a field in
the existing global user config, as suggested in
https://github.com/tridactyl/tridactyl/pull/999#issuecomment-420616758

This makes url-specific config play nicer with existing config
manipulation tools (e.g. :viewconfig).
2018-09-16 11:24:04 +02:00
Oliver Blanthorn
03089360db
Merge pull request #1009 from glacambre/make_editor_return_values_useful
excmds.ts: Make `editor()` return a [filepath, content] tuple
2018-09-15 10:35:20 +01:00
Oliver Blanthorn
69167a1a7e
Merge pull request #1008 from glacambre/prevent_minification
Prevent webpack from minifying source code
2018-09-15 10:33:40 +01:00
glacambre
46ca5daf64
excmds.ts: Make editor() return a [filepath, content] tuple
`editor()` didn't return anything useful. This partially fixes #1005 by
letting users create commands to automatically delete a the temporary
file after `editor()` finishes.
2018-09-15 08:17:10 +02:00
glacambre
716e2fb615
Prevent webpack from minifying source code
a0ac1a2 upgraded Tridactyl's dependencies and webpack suddenly started
minifying the files it builds. This makes debugging much harder and thus
needs to be prevented. This is done by setting "mode" to "development"
in the module.exports object in webpack.config.js.
2018-09-15 06:23:36 +02:00
Oliver Blanthorn
2f8c3fe027
Add link to troubleshooting guide from readme 2018-09-14 10:48:18 +01:00
Oliver Blanthorn
716272edb5
Fix typo 2018-09-14 10:42:40 +01:00
Oliver Blanthorn
cbebd36276
Add native troublehshooting command 2018-09-14 10:42:20 +01:00
Oliver Blanthorn
64f1422187
Remove reference to ESR since it no longer supports Vimperator 2018-09-14 10:30:26 +01:00
glacambre
601cffbab8
config.ts: Implement priority setting for site-specific settings 2018-09-12 11:12:17 +02:00
Oliver Blanthorn
a0ac1a2878
Update dependencies 2018-09-11 22:24:21 +01:00
glacambre
547065fed7
Add unseturl ex command 2018-09-11 06:34:36 +02:00
glacambre
7bd108dbff
Fix site-specific config not being loaded on page load 2018-09-11 06:14:48 +02:00
glacambre
1a1688a83f
Implement site-specific settings
This PR implements site-specific settings. It requires multiple changes
and new features.

First, I needed to create a new value in `window.tri` named
`contentLocation`. This contentLocation object is either a Location or
URL object containing the URL of the currently selected tab of the
currently selected window. This is required because config.get() is not
asynchronous and we probably want to keep it that way, thus we can't
message the content script just to get the current url.

Then, we create a new object, URLCONFIGS, in content.ts. It behaves
exactly the same as USERCONFIG, except it has a level of indirection,
matching url patterns to config objects. This requires creating new
seturl, geturl and unseturl functions which behave mostly the same as
set, get and unset.

Last, we create a `seturl` ex command in order to interact with this new
object.
2018-09-10 18:51:31 +02:00
glacambre
7bf5198e65
Turn logging levels into string in the config
Using numbers instead of strings made things complicated when dealing
with logging (:set was more complex, :get returned a number instead of a
string...). This commit fixes this.

Note that this commit removes validation for logging levels. This means
that users can now set erroneous logging levels. Fixing this will
require better type info generation in the compiler and will happen in
another commit.
2018-09-10 17:39:08 +02:00
Oliver Blanthorn
9450798006
Merge pull request #998 from glacambre/fix_tabopenpos_last
Respect the tabs.move/tabs.create API
2018-09-10 10:34:04 +01:00
glacambre
a7ddcb1b5a
Respect the tabs.move/tabs.create API
According to MDN[1], when you create a tab that should be placed at the
end of a window, you should use the number of tabs of the window as
index.
But if you use tabs.move(), you should use an index value of -1[2].

Probably fixes https://github.com/tridactyl/tridactyl/issues/990 .

1: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/tabs/create#Parameters
2: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/tabs/move#Parameters
2018-09-10 07:05:47 +02:00
Oliver Blanthorn
da0604f344
Fix build button but for real this time
Doing this on my phone was a great idea
2018-09-08 23:48:30 +01:00
Oliver Blanthorn
9a9f8406d8
Fix build button 2018-09-08 23:46:57 +01:00
Colin Caine
f35370ac76 Update package-lock.json 2018-09-08 13:00:59 +01:00
Saul Reynolds-Haertle
d25811afc1 Clean up window fetching in BufferAllCompletionSource updateOptions 2018-09-08 12:29:57 +01:00
Saul Reynolds-Haertle
8916bfcb5b Replace "for each window, get tabs" with un-filtered "get all tabs" 2018-09-08 12:29:57 +01:00
Saul Reynolds-Haertle
fabd1b5679 Parallelize async in browserBg.allWindowTabs + BufferAll completion
Didn't bring the average down too much, but I think I killed a
long-tail. I'll have to do more extensive profiling.

Before:
78                  #####
117.78571428571429  ###############################
157.57142857142858  #######################################
197.35714285714286  ############################################################
237.14285714285714  ####################################
276.92857142857144  ##
316.7142857142857   #####
356.5               #######
396.2857142857143
436.07142857142856  #####
475.85714285714283  #####
515.6428571428571   ##
555.4285714285714   #####
595.2142857142857   ##
635                 #####

After:
74                  ###
101.85714285714286  #########################################
129.71428571428572  ######
157.57142857142858  ###########
185.42857142857142  ############################################################
213.28571428571428  ##########
241.14285714285714  ##################
269                 ################
296.85714285714283  ##########
324.7142857142857   ########
352.57142857142856  ######
380.42857142857144  ######
408.2857142857143   ###
436.14285714285717  ######
464                 #####
2018-09-08 12:29:57 +01:00
Oliver Blanthorn
af2b3ca2c9
Merge branch 'clean-hints-before-resolving-callback' 2018-09-07 22:34:00 +01:00
Saul Reynolds-Haertle
98b4faa086 Clean up hint elements and classes before resolving hint callbacks
This fixes the pop-in of the un-selected hints after one is selected,
since on completion we're removing all hints instead of just clearing
the filter. It also fixes hints remaining present on SPAs like github,
see #981.
2018-09-07 00:48:29 -07:00