Commit Graph

5149 Commits

Author SHA1 Message Date
Ayman Bagabas
b348e08bb7
Add support for smartRelativeLine (#5010)
Adds support for smartRelativeLine, which toggles VSCode's line numbers between absolute and relative depending on the current mode.
Fixes #3020
2020-09-15 12:19:56 -04:00
renovate[bot]
374d21c8d8
Update dependency pretty-quick to v3.0.2 (#5175)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-09-11 00:48:11 +00:00
renovate[bot]
714071ab75
Update dependency pretty-quick to v3.0.1 (#5174)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-09-10 04:36:15 +00:00
renovate[bot]
b85eb6eb48
Update dependency webpack-merge to v5.1.4 (#5172)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-09-09 08:49:34 +00:00
sql-koala
caa8b6368e
Folding: fix a few bugs & small refactor (#5169)
Fixes #5167, fixes #5168
2020-09-08 02:23:50 -04:00
renovate[bot]
4983b3a20c
chore(deps): update dependency husky to v4.3.0 (#5170)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-09-07 11:27:38 +00:00
Jason
691cb77469 Improvements to .vimrc syntax highlighting 2020-09-04 02:50:41 -04:00
Jason Fields
5b89cec1c2 vimrc: support for toggling comments 2020-09-01 16:43:23 -04:00
renovate[bot]
7275183a98
Update dependency webpack-stream to v6.1.0 (#5160)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-09-01 19:48:04 +00:00
renovate[bot]
73227d74b9
Update dependency webpack-merge to v5.1.3 (#5159)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-08-30 07:17:58 +00:00
renovate[bot]
f654eac9bb
Update dependency @types/lodash to v4.14.161 (#5157)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-08-29 02:12:58 +00:00
renovate[bot]
131bdf7a63
Update dependency mocha to v8.1.3 (#5155)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-08-28 21:53:11 +00:00
Jason Fields
523aca282c Make a handful of Loggers static
We were constructing several Loggers (each with a few transport streams) for each VimState.
I think these are relatively lightweight, but still - totally unnecessary. Should reduce memory usage a bit.
2020-08-28 13:01:53 -04:00
Jason Fields
86a97d53a9 Make EasyMotion TextEditorDecorationTypes static
No need to re-construct these every time a VimState is created
2020-08-28 01:43:18 -04:00
Jason Fields
3ceaa2f246 Refactor: make VimState.recordedMacro nullable (and rename to macro)
A macro is being recorded if VimState.macro is not undefined.
Most VimStates will never use a macro, so no sense constructing one eagerly.
2020-08-28 01:04:16 -04:00
Jason Fields
dfe5e3966c Remove VimState.registerName
This isn't used anywhere; the "active" register is held on RecordedState.
2020-08-28 00:25:41 -04:00
renovate[bot]
a8560c5f81
Update dependency webpack-stream to v6 (#5154)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-08-27 19:46:30 +00:00
Jason Fields
9cb685dc5d Put a Range instead of two Positions on ReplaceTextTransformation
This is a baby step toward #4585. Really, this Range should be a vscode.Range, but let's first bring ReplaceTextTransformation in line with other transformation types.
2020-08-27 12:22:35 -04:00
Jason Fields
1a55f891c7 Fix closing parameter hints
Tried to do this in fd3ae79d9a, but neglected that <Esc> in insert mode is handled by a different action.
2020-08-27 12:09:23 -04:00
Jason Fields
acbd84f1a6 Make SurroundState.range a vscode.Range
Refs #4585
2020-08-27 11:38:02 -04:00
Jason Fields
b982dbcef5 Typescript 4.0 adoption: fancy new assignment operators 2020-08-27 11:09:12 -04:00
Jason
fd3ae79d9a Call closeParameterHints when exiting insert mode
Occasionally the parameter hint popup would "stick" (I'm not totally sure why), but it should close when you leave insert mode, so let's make sure that's done explicitly.
2020-08-27 00:38:21 -04:00
renovate[bot]
64fb187114
Update dependency prettier to v2.1.1 (#5149)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-08-26 05:56:46 +00:00
renovate[bot]
9beac712fc
Update dependency mocha to v8.1.2 (#5148)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-08-25 20:36:12 +00:00
renovate[bot]
923b0d9cae
Update dependency @types/lodash to v4.14.160 (#5146)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-08-24 18:46:50 +00:00
renovate[bot]
bf9f406894
Update dependency prettier to v2.1.0 (#5144)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-08-24 15:11:29 +00:00
renovate[bot]
ee9a2c3cbc
Update dependency ts-loader to v8.0.3 (#5143)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-08-24 10:22:33 +00:00
renovate[bot]
eec9969c60
Update dependency @types/sinon to v9.0.5 (#5141)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-08-21 19:25:13 +00:00
Jason Fields
86d75fcd5e Surround refactor
Surround is one of the ugliest ducklings in the codebase; here's an attempt to make it a bit saner.
None of the structure has really changed (yet); most of this is just rearrangement, clean up, comments, etc.
Only real behavioral change is a reduction of the number of transformations done from 4 to 2 when deleting or changing a surrounding tag. I'm not sure why it was written as it was, and it still seems to work 🤞
2020-08-21 02:07:26 -04:00
renovate[bot]
7e2fa4731e
Update dependency pretty-quick to v3 (#5140)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-08-21 02:44:12 +00:00
renovate[bot]
eff57430e9
Update dependency pretty-quick to v2.0.2 (#5139)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-08-20 21:02:22 -04:00
renovate[bot]
f802b578a6
Update dependency typescript to v4 (#5138)
https://devblogs.microsoft.com/typescript/announcing-typescript-4-0/#whats-new
2020-08-20 13:38:11 -04:00
renovate[bot]
f103a1c0c0
Update dependency webpack-merge to v5.1.2 (#5135)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-08-18 17:46:25 +00:00
Jason Fields
41dbba15b7 Refactor: stop returning VimState from actions
We ALWAYS mutate VimState, we never make a new one in an Action, so returning the parameter back to ModeHandler is useless noise.
Refs #4698
2020-08-17 20:55:03 -04:00
renovate[bot]
066075a43b
Update dependency @types/mocha to v8.0.3 (#5132)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-08-17 21:15:37 +00:00
Jason Fields
b1f5d95ed7 Refactor: stop passing VimState around in ModeHandler
This is entirely unnecessary, as each ModeHandler only ever deals with a single VimState, and that's `this.vimState`, which is never re-assigned.
Baby step toward #4698
2020-08-17 14:58:09 -04:00
Jason Fields
c7e5ca2435 Sort registers properly in :reg[isters] command 2020-08-17 12:12:29 -04:00
Jason
605064d91a Save registers (except for macros) across sessions
Fixes #4704
2020-08-16 19:49:52 -04:00
Jason
84e3e722b3 Better error handling when a register has no value
Register.get() will now return undefined when the given register has no value, which lets us throw E353, etc.
2020-08-16 18:46:44 -04:00
berknam
91ca71f860
Overhaul remapping logic (#4735)
This is a pretty massive change; see pull request #4735 for full details

Most notably:
- Support for operator-pending mode, including remaps and a half-cursor decoration
- Correct handling of ambiguous remaps with timeout
- Correct handling of recursive special case when the RHS starts with the LHS
- Correct handling of multi-key remaps in insert mode
- Failed movements that occur partway through a remap stop & discard the rest of the remap
- Implement `unmap` and `mapclear` in .vimrc

Refs #463, refs #4908
Fixes #1261, fixes #1398, fixes #1579, fixes #1821, fixes #1835
Fixes #1870, fixes #1883, fixes #2041, fixes #2234, fixes #2466
Fixes #2897, fixes #2955, fixes #2975, fixes #3082, fixes #3086
Fixes #3171, fixes #3373, fixes #3413, fixes #3742, fixes #3768
Fixes #3988, fixes #4057, fixes #4118, fixes #4236, fixes #4353
Fixes #4464, fixes #4530, fixes #4532, fixes #4563, fixes #4674
Fixes #4756, fixes #4883, fixes #4928, fixes #4991, fixes #5016
Fixes #5057, fixes #5067, fixes #5084, fixes #5125
2020-08-16 14:22:51 -04:00
Jason
2254e8e9f6 Merge Register.get() and Register.getByKey()
Just a small refactor to simplify the register API slightly
2020-08-16 13:44:41 -04:00
J.R. Maingat
e0da682ac0
Fix :p[ut] command neovim capability and subparser (#5063)
Enables neovim capability and fixes arg parsing for the `:p[ut]` command. Apparently the put command allows no whitespace between the command name and the register name, so commands like `:put"` are perfectly valid. I've added some subparser tests to document this.

Fixes #5052
Fixes #5090
2020-08-14 23:36:48 -04:00
Jason Fields
b74ccf6244 A bit of cleanup in jump tracking logic 2020-08-13 22:35:30 -04:00
Jason Fields
ac9c405901 Remove a bunch of type assertions, enable tslint rule disallowing unnecessary type assertions 2020-08-13 19:58:05 -04:00
Jason Fields
3ed96eccf2 Make BaseAction abstract 2020-08-13 19:03:05 -04:00
Jason Fields
e2ce8865f8 Get rid of Actions class, in favor of directly exporting getRelevantAction()
Refs #4429
2020-08-13 18:55:31 -04:00
Jason Fields
7522ec79cf Make BaseOperator abstract 2020-08-13 18:03:30 -04:00
Jason Fields
c3d6e13e8c Remove BaseAction.isOperator
This seems to be an unused relic, good riddance.
2020-08-13 16:38:03 -04:00
Jason Fields
7e88c8485b A bit of cleanup to 'put' commands
I may end up writing this from scratch rather than trying to salvage the existing code, but this attempt at making it slightly more legible should be useful regardless.
2020-08-13 16:22:01 -04:00
Jason Fields
43e0912dee Add [P and ]P as aliases for [p 2020-08-13 01:19:55 -04:00