mirror of
https://github.com/VSCodeVim/Vim.git
synced 2024-09-11 12:25:59 +03:00
fix: prettier fixes
This commit is contained in:
parent
72985b983b
commit
3c60b6635b
14
CHANGELOG.md
14
CHANGELOG.md
@ -378,11 +378,11 @@
|
||||
|
||||
**Fixed Bugs:**
|
||||
|
||||
- :$ requires additional enter to go to end of buffer [\#2858](https://github.com/VSCodeVim/Vim/issues/2858)
|
||||
- :\$ requires additional enter to go to end of buffer [\#2858](https://github.com/VSCodeVim/Vim/issues/2858)
|
||||
|
||||
**Merged pull requests:**
|
||||
|
||||
- Fixes $ and % commands [\#2860](https://github.com/VSCodeVim/Vim/pull/2860) ([xconverge](https://github.com/xconverge))
|
||||
- Fixes \$ and % commands [\#2860](https://github.com/VSCodeVim/Vim/pull/2860) ([xconverge](https://github.com/xconverge))
|
||||
- fixed buggy interactive substitute replacements [\#2857](https://github.com/VSCodeVim/Vim/pull/2857) ([kevintighe](https://github.com/kevintighe))
|
||||
|
||||
## [v0.15.2](https://github.com/vscodevim/vim/tree/v0.15.2) (2018-07-19)
|
||||
@ -815,7 +815,7 @@
|
||||
- refactor\(modehandler-updateview\): use map and remove unused context [\#2197](https://github.com/VSCodeVim/Vim/pull/2197) ([jpoon](https://github.com/jpoon))
|
||||
- Integrate TravisBuddy [\#2191](https://github.com/VSCodeVim/Vim/pull/2191) ([bluzi](https://github.com/bluzi))
|
||||
- Fix \#2168: Surround offset [\#2171](https://github.com/VSCodeVim/Vim/pull/2171) ([westim](https://github.com/westim))
|
||||
- Fix \#1945 $ in VisualBlock works on ragged lines [\#2096](https://github.com/VSCodeVim/Vim/pull/2096) ([Strafos](https://github.com/Strafos))
|
||||
- Fix \#1945 \$ in VisualBlock works on ragged lines [\#2096](https://github.com/VSCodeVim/Vim/pull/2096) ([Strafos](https://github.com/Strafos))
|
||||
|
||||
## [v0.10.5](https://github.com/vscodevim/vim/tree/v0.10.5) (2017-11-21)
|
||||
|
||||
@ -841,7 +841,7 @@
|
||||
- Code Cleanup [\#2138](https://github.com/VSCodeVim/Vim/pull/2138) ([jpoon](https://github.com/jpoon))
|
||||
- Fixed typo in README [\#2137](https://github.com/VSCodeVim/Vim/pull/2137) ([Nonoctis](https://github.com/Nonoctis))
|
||||
- fix\(travis\): use lts/carbon \(v8.9.1\) for travis [\#2129](https://github.com/VSCodeVim/Vim/pull/2129) ([jpoon](https://github.com/jpoon))
|
||||
- Fix ^, $, add case sensitivity override in search [\#2123](https://github.com/VSCodeVim/Vim/pull/2123) ([parkovski](https://github.com/parkovski))
|
||||
- Fix ^, \$, add case sensitivity override in search [\#2123](https://github.com/VSCodeVim/Vim/pull/2123) ([parkovski](https://github.com/parkovski))
|
||||
- fix vscode launch/tasks [\#2121](https://github.com/VSCodeVim/Vim/pull/2121) ([jpoon](https://github.com/jpoon))
|
||||
- Fix remapping keys to actions with "mustBeFirstKey", fixes \#2216 [\#2117](https://github.com/VSCodeVim/Vim/pull/2117) ([ohjames](https://github.com/ohjames))
|
||||
- Fixes \#2113: Start in Disabled mode configuration. [\#2115](https://github.com/VSCodeVim/Vim/pull/2115) ([westim](https://github.com/westim))
|
||||
@ -900,7 +900,7 @@
|
||||
- Easymotion new features [\#1967](https://github.com/VSCodeVim/Vim/pull/1967) ([MaxfieldWalker](https://github.com/MaxfieldWalker))
|
||||
- Trying to fix the travis issues with neovim [\#1958](https://github.com/VSCodeVim/Vim/pull/1958) ([Chillee](https://github.com/Chillee))
|
||||
- Fixes \#1941: Action repetition with Ctrl-\[ [\#1953](https://github.com/VSCodeVim/Vim/pull/1953) ([tagniam](https://github.com/tagniam))
|
||||
- Fixes \#1950: counter for $ [\#1952](https://github.com/VSCodeVim/Vim/pull/1952) ([tagniam](https://github.com/tagniam))
|
||||
- Fixes \#1950: counter for \$ [\#1952](https://github.com/VSCodeVim/Vim/pull/1952) ([tagniam](https://github.com/tagniam))
|
||||
- Makes all tests pass on Windows [\#1939](https://github.com/VSCodeVim/Vim/pull/1939) ([philipmat](https://github.com/philipmat))
|
||||
- Update tests due to VSCode PR 28238 [\#1926](https://github.com/VSCodeVim/Vim/pull/1926) ([philipmat](https://github.com/philipmat))
|
||||
- fix `z O` unfoldRecursively [\#1924](https://github.com/VSCodeVim/Vim/pull/1924) ([VincentBel](https://github.com/VincentBel))
|
||||
@ -1937,8 +1937,8 @@
|
||||
- Fix PR builds [\#75](https://github.com/VSCodeVim/Vim/pull/75) ([jpoon](https://github.com/jpoon))
|
||||
- Tests [\#74](https://github.com/VSCodeVim/Vim/pull/74) ([jpoon](https://github.com/jpoon))
|
||||
- Add commands support for 'gg' and 'G' [\#71](https://github.com/VSCodeVim/Vim/pull/71) ([liushuping](https://github.com/liushuping))
|
||||
- fix line end determination for a, A, $ [\#68](https://github.com/VSCodeVim/Vim/pull/68) ([kimitake](https://github.com/kimitake))
|
||||
- '$' and '^' for Moving to beginning and end of line [\#66](https://github.com/VSCodeVim/Vim/pull/66) ([josephliccini](https://github.com/josephliccini))
|
||||
- fix line end determination for a, A, \$ [\#68](https://github.com/VSCodeVim/Vim/pull/68) ([kimitake](https://github.com/kimitake))
|
||||
- '\$' and '^' for Moving to beginning and end of line [\#66](https://github.com/VSCodeVim/Vim/pull/66) ([josephliccini](https://github.com/josephliccini))
|
||||
- support x command [\#65](https://github.com/VSCodeVim/Vim/pull/65) ([kimitake](https://github.com/kimitake))
|
||||
- Update README.md [\#63](https://github.com/VSCodeVim/Vim/pull/63) ([markrendle](https://github.com/markrendle))
|
||||
- map keys from US keyboard to other layouts [\#61](https://github.com/VSCodeVim/Vim/pull/61) ([guillermooo](https://github.com/guillermooo))
|
||||
|
@ -436,7 +436,7 @@ You can customize the appearance of easymotion markers (the boxes with letters)
|
||||
| `vim.easymotionMarkerFontWeight` | The font weight used for the marker text. |
|
||||
| `vim.easymotionMarkerYOffset` | The distance between the top of the marker and the text (will typically need some adjusting if height or font size have been changed). |
|
||||
| `vim.easymotionKeys` | The characters used for jump marker name |
|
||||
| `vim.easymotionJumpToAnywhereRegex` | Custom regex to match for JumpToAnywhere motion (analogous to `Easymotion_re_anywhere`). Example setting (which also matches start & end of line, as well as Javascript comments in addition to the regular behavior (note the double escaping required): ^\\s\*. | \\b[A-Za-z0-9] | [A-Za-z0-9]\\b | \_. | \\#. | [a-z][a-z] | // | .$" |
|
||||
| `vim.easymotionJumpToAnywhereRegex` | Custom regex to match for JumpToAnywhere motion (analogous to `Easymotion_re_anywhere`). Example setting (which also matches start & end of line, as well as Javascript comments in addition to the regular behavior (note the double escaping required): ^\\s\*. | \\b[A-Za-z0-9] | [A-Za-z0-9]\\b | \_. | \\#. | [a-z][a-z] | // | .\$" |
|
||||
|
||||
### vim-surround
|
||||
|
||||
|
@ -52,10 +52,10 @@ Now follows an exhaustive list of every known Vim command that we could find.
|
||||
| :white_check_mark: | :1234: l | right (also: Space or Right key) |
|
||||
| :white_check_mark: | 0 | to first character in the line (also: Home key) |
|
||||
| :white_check_mark: | ^ | to first non-blank character in the line |
|
||||
| :white_check_mark: | :1234: $ | to the last character in the line (N-1 lines lower) (also: End key) |
|
||||
| :white_check_mark: | :1234: \$ | to the last character in the line (N-1 lines lower) (also: End key) |
|
||||
| :white_check_mark: | g0 | to first character in screen line (differs from "0" when lines wrap) |
|
||||
| :white_check_mark: | g^ | to first non-blank character in screen line (differs from "^" when lines wrap) |
|
||||
| :white_check_mark: | :1234: g$ | to last character in screen line (differs from "$" when lines wrap) |
|
||||
| :white_check_mark: | :1234: g\$ | to last character in screen line (differs from "\$" when lines wrap) |
|
||||
| :white_check_mark: | gm | to middle of the screen line |
|
||||
| :white_check_mark: | :1234: \| | to column N (default: 1) |
|
||||
| :white_check_mark: | :1234: f{char} | to the Nth occurrence of {char} to the right |
|
||||
@ -503,8 +503,8 @@ Since the list is too long, now we just put those already supported options here
|
||||
| :white_check_mark: :star: | ; | idem, set cursor to the first line number before interpreting the second one | The cursor movement is not included. |
|
||||
| :white_check_mark: | {number} | an absolute line number |
|
||||
| :white_check_mark: | . | the current line |
|
||||
| :white_check_mark: | $ | the last line in the file |
|
||||
| :white_check_mark: | % | equal to 1,$ (the entire file) |
|
||||
| :white_check_mark: | \$ | the last line in the file |
|
||||
| :white_check_mark: | % | equal to 1,\$ (the entire file) |
|
||||
| :white_check_mark: | \* | equal to '<,'> (visual area) |
|
||||
| :white_check_mark: | 't | position of mark t |
|
||||
| :arrow_down: | /{pattern}[/] | the next line where {pattern} matches |
|
||||
|
@ -359,11 +359,11 @@
|
||||
|
||||
**Fixed Bugs:**
|
||||
|
||||
- :$ requires additional enter to go to end of buffer [\#2858](https://github.com/VSCodeVim/Vim/issues/2858)
|
||||
- :\$ requires additional enter to go to end of buffer [\#2858](https://github.com/VSCodeVim/Vim/issues/2858)
|
||||
|
||||
**Merged pull requests:**
|
||||
|
||||
- Fixes $ and % commands [\#2860](https://github.com/VSCodeVim/Vim/pull/2860) ([xconverge](https://github.com/xconverge))
|
||||
- Fixes \$ and % commands [\#2860](https://github.com/VSCodeVim/Vim/pull/2860) ([xconverge](https://github.com/xconverge))
|
||||
- fixed buggy interactive substitute replacements [\#2857](https://github.com/VSCodeVim/Vim/pull/2857) ([kevintighe](https://github.com/kevintighe))
|
||||
|
||||
## [v0.15.2](https://github.com/vscodevim/vim/tree/v0.15.2) (2018-07-19)
|
||||
@ -796,7 +796,7 @@
|
||||
- refactor\(modehandler-updateview\): use map and remove unused context [\#2197](https://github.com/VSCodeVim/Vim/pull/2197) ([jpoon](https://github.com/jpoon))
|
||||
- Integrate TravisBuddy [\#2191](https://github.com/VSCodeVim/Vim/pull/2191) ([bluzi](https://github.com/bluzi))
|
||||
- Fix \#2168: Surround offset [\#2171](https://github.com/VSCodeVim/Vim/pull/2171) ([westim](https://github.com/westim))
|
||||
- Fix \#1945 $ in VisualBlock works on ragged lines [\#2096](https://github.com/VSCodeVim/Vim/pull/2096) ([Strafos](https://github.com/Strafos))
|
||||
- Fix \#1945 \$ in VisualBlock works on ragged lines [\#2096](https://github.com/VSCodeVim/Vim/pull/2096) ([Strafos](https://github.com/Strafos))
|
||||
|
||||
## [v0.10.5](https://github.com/vscodevim/vim/tree/v0.10.5) (2017-11-21)
|
||||
|
||||
@ -822,7 +822,7 @@
|
||||
- Code Cleanup [\#2138](https://github.com/VSCodeVim/Vim/pull/2138) ([jpoon](https://github.com/jpoon))
|
||||
- Fixed typo in README [\#2137](https://github.com/VSCodeVim/Vim/pull/2137) ([Nonoctis](https://github.com/Nonoctis))
|
||||
- fix\(travis\): use lts/carbon \(v8.9.1\) for travis [\#2129](https://github.com/VSCodeVim/Vim/pull/2129) ([jpoon](https://github.com/jpoon))
|
||||
- Fix ^, $, add case sensitivity override in search [\#2123](https://github.com/VSCodeVim/Vim/pull/2123) ([parkovski](https://github.com/parkovski))
|
||||
- Fix ^, \$, add case sensitivity override in search [\#2123](https://github.com/VSCodeVim/Vim/pull/2123) ([parkovski](https://github.com/parkovski))
|
||||
- fix vscode launch/tasks [\#2121](https://github.com/VSCodeVim/Vim/pull/2121) ([jpoon](https://github.com/jpoon))
|
||||
- Fix remapping keys to actions with "mustBeFirstKey", fixes \#2216 [\#2117](https://github.com/VSCodeVim/Vim/pull/2117) ([ohjames](https://github.com/ohjames))
|
||||
- Fixes \#2113: Start in Disabled mode configuration. [\#2115](https://github.com/VSCodeVim/Vim/pull/2115) ([westim](https://github.com/westim))
|
||||
@ -881,7 +881,7 @@
|
||||
- Easymotion new features [\#1967](https://github.com/VSCodeVim/Vim/pull/1967) ([MaxfieldWalker](https://github.com/MaxfieldWalker))
|
||||
- Trying to fix the travis issues with neovim [\#1958](https://github.com/VSCodeVim/Vim/pull/1958) ([Chillee](https://github.com/Chillee))
|
||||
- Fixes \#1941: Action repetition with Ctrl-\[ [\#1953](https://github.com/VSCodeVim/Vim/pull/1953) ([tagniam](https://github.com/tagniam))
|
||||
- Fixes \#1950: counter for $ [\#1952](https://github.com/VSCodeVim/Vim/pull/1952) ([tagniam](https://github.com/tagniam))
|
||||
- Fixes \#1950: counter for \$ [\#1952](https://github.com/VSCodeVim/Vim/pull/1952) ([tagniam](https://github.com/tagniam))
|
||||
- Makes all tests pass on Windows [\#1939](https://github.com/VSCodeVim/Vim/pull/1939) ([philipmat](https://github.com/philipmat))
|
||||
- Update tests due to VSCode PR 28238 [\#1926](https://github.com/VSCodeVim/Vim/pull/1926) ([philipmat](https://github.com/philipmat))
|
||||
- fix `z O` unfoldRecursively [\#1924](https://github.com/VSCodeVim/Vim/pull/1924) ([VincentBel](https://github.com/VincentBel))
|
||||
@ -1918,8 +1918,8 @@
|
||||
- Fix PR builds [\#75](https://github.com/VSCodeVim/Vim/pull/75) ([jpoon](https://github.com/jpoon))
|
||||
- Tests [\#74](https://github.com/VSCodeVim/Vim/pull/74) ([jpoon](https://github.com/jpoon))
|
||||
- Add commands support for 'gg' and 'G' [\#71](https://github.com/VSCodeVim/Vim/pull/71) ([liushuping](https://github.com/liushuping))
|
||||
- fix line end determination for a, A, $ [\#68](https://github.com/VSCodeVim/Vim/pull/68) ([kimitake](https://github.com/kimitake))
|
||||
- '$' and '^' for Moving to beginning and end of line [\#66](https://github.com/VSCodeVim/Vim/pull/66) ([josephliccini](https://github.com/josephliccini))
|
||||
- fix line end determination for a, A, \$ [\#68](https://github.com/VSCodeVim/Vim/pull/68) ([kimitake](https://github.com/kimitake))
|
||||
- '\$' and '^' for Moving to beginning and end of line [\#66](https://github.com/VSCodeVim/Vim/pull/66) ([josephliccini](https://github.com/josephliccini))
|
||||
- support x command [\#65](https://github.com/VSCodeVim/Vim/pull/65) ([kimitake](https://github.com/kimitake))
|
||||
- Update README.md [\#63](https://github.com/VSCodeVim/Vim/pull/63) ([markrendle](https://github.com/markrendle))
|
||||
- map keys from US keyboard to other layouts [\#61](https://github.com/VSCodeVim/Vim/pull/61) ([guillermooo](https://github.com/guillermooo))
|
||||
|
@ -210,12 +210,11 @@ export abstract class BaseCommand extends BaseAction {
|
||||
|
||||
const cursorsToIterateOver = vimState.allCursors
|
||||
.map(x => new Range(x.start, x.stop))
|
||||
.sort(
|
||||
(a, b) =>
|
||||
a.start.line > b.start.line ||
|
||||
(a.start.line === b.start.line && a.start.character > b.start.character)
|
||||
? 1
|
||||
: -1
|
||||
.sort((a, b) =>
|
||||
a.start.line > b.start.line ||
|
||||
(a.start.line === b.start.line && a.start.character > b.start.character)
|
||||
? 1
|
||||
: -1
|
||||
);
|
||||
|
||||
let cursorIndex = 0;
|
||||
@ -3276,12 +3275,11 @@ class ActionJoin extends BaseCommand {
|
||||
|
||||
const cursorsToIterateOver = vimState.allCursors
|
||||
.map(x => new Range(x.start, x.stop))
|
||||
.sort(
|
||||
(a, b) =>
|
||||
a.start.line > b.start.line ||
|
||||
(a.start.line === b.start.line && a.start.character > b.start.character)
|
||||
? 1
|
||||
: -1
|
||||
.sort((a, b) =>
|
||||
a.start.line > b.start.line ||
|
||||
(a.start.line === b.start.line && a.start.character > b.start.character)
|
||||
? 1
|
||||
: -1
|
||||
);
|
||||
|
||||
for (const { start, stop } of cursorsToIterateOver) {
|
||||
|
@ -160,8 +160,8 @@ export class DeleteOperator extends BaseOperator {
|
||||
text = text.endsWith('\r\n')
|
||||
? text.slice(0, -2)
|
||||
: text.endsWith('\n')
|
||||
? text.slice(0, -1)
|
||||
: text;
|
||||
? text.slice(0, -1)
|
||||
: text;
|
||||
}
|
||||
|
||||
if (yank) {
|
||||
|
@ -96,20 +96,18 @@ export class LineRange {
|
||||
case token.TokenType.SelectionFirstLine:
|
||||
currentLineNum = Math.min.apply(
|
||||
null,
|
||||
doc.selections.map(
|
||||
selection =>
|
||||
selection.start.isBeforeOrEqual(selection.end)
|
||||
? selection.start.line
|
||||
: selection.end.line
|
||||
doc.selections.map(selection =>
|
||||
selection.start.isBeforeOrEqual(selection.end)
|
||||
? selection.start.line
|
||||
: selection.end.line
|
||||
)
|
||||
);
|
||||
break;
|
||||
case token.TokenType.SelectionLastLine:
|
||||
currentLineNum = Math.max.apply(
|
||||
null,
|
||||
doc.selections.map(
|
||||
selection =>
|
||||
selection.start.isAfter(selection.end) ? selection.start.line : selection.end.line
|
||||
doc.selections.map(selection =>
|
||||
selection.start.isAfter(selection.end) ? selection.start.line : selection.end.line
|
||||
)
|
||||
);
|
||||
break;
|
||||
|
@ -622,11 +622,11 @@ export class HistoryTracker {
|
||||
this.currentHistoryStepIndex = this.currentHistoryStepIndex - stepsToUndo + 1;
|
||||
|
||||
/*
|
||||
* Unlike the goBackHistoryStep() function, this function does not trust the
|
||||
* HistoryStep.cursorStart property. This can lead to invalid cursor position errors.
|
||||
* Since this function reverses change-by-change, rather than step-by-step,
|
||||
* the cursor position is based on the start of the last change that is undone.
|
||||
*/
|
||||
* Unlike the goBackHistoryStep() function, this function does not trust the
|
||||
* HistoryStep.cursorStart property. This can lead to invalid cursor position errors.
|
||||
* Since this function reverses change-by-change, rather than step-by-step,
|
||||
* the cursor position is based on the start of the last change that is undone.
|
||||
*/
|
||||
return lastChange && [lastChange.start];
|
||||
}
|
||||
|
||||
|
@ -484,9 +484,8 @@ export class ModeHandler implements vscode.Disposable {
|
||||
*/
|
||||
|
||||
if (vimState.currentMode === ModeName.Visual) {
|
||||
vimState.allCursors = vimState.allCursors.map(
|
||||
x =>
|
||||
x.start.isEarlierThan(x.stop) ? x.withNewStop(x.stop.getLeftThroughLineBreaks(true)) : x
|
||||
vimState.allCursors = vimState.allCursors.map(x =>
|
||||
x.start.isEarlierThan(x.stop) ? x.withNewStop(x.stop.getLeftThroughLineBreaks(true)) : x
|
||||
);
|
||||
}
|
||||
if (action instanceof BaseMovement) {
|
||||
@ -554,13 +553,12 @@ export class ModeHandler implements vscode.Disposable {
|
||||
}
|
||||
|
||||
if (vimState.currentMode === ModeName.Visual) {
|
||||
vimState.allCursors = vimState.allCursors.map(
|
||||
x =>
|
||||
x.start.isEarlierThan(x.stop)
|
||||
? x.withNewStop(
|
||||
x.stop.isLineEnd() ? x.stop.getRightThroughLineBreaks() : x.stop.getRight()
|
||||
)
|
||||
: x
|
||||
vimState.allCursors = vimState.allCursors.map(x =>
|
||||
x.start.isEarlierThan(x.stop)
|
||||
? x.withNewStop(
|
||||
x.stop.isLineEnd() ? x.stop.getRightThroughLineBreaks() : x.stop.getRight()
|
||||
)
|
||||
: x
|
||||
);
|
||||
}
|
||||
// And then we have to do it again because an operator could
|
||||
|
@ -179,12 +179,11 @@ export class SearchState {
|
||||
}
|
||||
} while (result && !(wrappedOver && result!.index > startPos));
|
||||
|
||||
this._matchRanges.sort(
|
||||
(x, y) =>
|
||||
x.start.line < y.start.line ||
|
||||
(x.start.line === y.start.line && x.start.character < y.start.character)
|
||||
? -1
|
||||
: 1
|
||||
this._matchRanges.sort((x, y) =>
|
||||
x.start.line < y.start.line ||
|
||||
(x.start.line === y.start.line && x.start.character < y.start.character)
|
||||
? -1
|
||||
: 1
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user