Skip to content
This repository was archived by the owner on Apr 6, 2018. It is now read-only.

Commit a274ea6

Browse files
committed
fix some more command->normal mode renames
1 parent 12c7df6 commit a274ea6

File tree

3 files changed

+27
-27
lines changed

3 files changed

+27
-27
lines changed

docs/operators.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* `c2c` - repeated linewise
1616
* `C` - change to the end of the line
1717
* [Adding and subtracting](http://vimhelp.appspot.com/change.txt.html#CTRL-A)
18-
* `ctrl-a` and `ctrl-x` in command mode to increase/decrease numbers in text
18+
* `ctrl-a` and `ctrl-x` in normal mode to increase/decrease numbers in text
1919
* [Yank](http://vimhelp.appspot.com/change.txt.html#yank)
2020
* `vwy` - works in visual mode
2121
* `yw` - with a motion

spec/motions-spec.coffee

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ describe "Motions", ->
2222
editor.normalModeInputView.editorElement.getModel().setText(key)
2323

2424
submitNormalModeInputText = (text) ->
25-
commandEditor = editor.normalModeInputView.editorElement
26-
commandEditor.getModel().setText(text)
27-
atom.commands.dispatch(commandEditor, "core:confirm")
25+
normalEditor = editor.normalModeInputView.editorElement
26+
normalEditor.getModel().setText(text)
27+
atom.commands.dispatch(normalEditor, "core:confirm")
2828

2929
describe "simple motions", ->
3030
beforeEach ->
@@ -850,7 +850,7 @@ describe "Motions", ->
850850
editor.setCursorScreenPosition([0, 2])
851851

852852
describe "as a motion", ->
853-
describe "in command mode", ->
853+
describe "in normal mode", ->
854854
beforeEach ->
855855
keydown('g')
856856
keydown('g')
@@ -885,7 +885,7 @@ describe "Motions", ->
885885
expect(editor.getCursorScreenPosition()).toEqual [0, 1]
886886

887887
describe "as a repeated motion", ->
888-
describe "in command mode", ->
888+
describe "in normal mode", ->
889889
beforeEach ->
890890
keydown('2')
891891
keydown('g')
@@ -1189,7 +1189,7 @@ describe "Motions", ->
11891189
expect(editor.getCursorBufferPosition()).toEqual [1, 0]
11901190

11911191
describe "using search history", ->
1192-
commandEditor = null
1192+
normalEditor = null
11931193

11941194
beforeEach ->
11951195
keydown('/')
@@ -1200,27 +1200,27 @@ describe "Motions", ->
12001200
submitNormalModeInputText('abc')
12011201
expect(editor.getCursorBufferPosition()).toEqual [2, 0]
12021202

1203-
commandEditor = editor.normalModeInputView.editorElement
1203+
normalEditor = editor.normalModeInputView.editorElement
12041204

12051205
it "allows searching history in the search field", ->
12061206
keydown('/')
1207-
atom.commands.dispatch(commandEditor, 'core:move-up')
1208-
expect(commandEditor.getModel().getText()).toEqual('abc')
1209-
atom.commands.dispatch(commandEditor, 'core:move-up')
1210-
expect(commandEditor.getModel().getText()).toEqual('def')
1211-
atom.commands.dispatch(commandEditor, 'core:move-up')
1212-
expect(commandEditor.getModel().getText()).toEqual('def')
1207+
atom.commands.dispatch(normalEditor, 'core:move-up')
1208+
expect(normalEditor.getModel().getText()).toEqual('abc')
1209+
atom.commands.dispatch(normalEditor, 'core:move-up')
1210+
expect(normalEditor.getModel().getText()).toEqual('def')
1211+
atom.commands.dispatch(normalEditor, 'core:move-up')
1212+
expect(normalEditor.getModel().getText()).toEqual('def')
12131213

12141214
it "resets the search field to empty when scrolling back", ->
12151215
keydown('/')
1216-
atom.commands.dispatch(commandEditor, 'core:move-up')
1217-
expect(commandEditor.getModel().getText()).toEqual('abc')
1218-
atom.commands.dispatch(commandEditor, 'core:move-up')
1219-
expect(commandEditor.getModel().getText()).toEqual('def')
1220-
atom.commands.dispatch(commandEditor, 'core:move-down')
1221-
expect(commandEditor.getModel().getText()).toEqual('abc')
1222-
atom.commands.dispatch(commandEditor, 'core:move-down')
1223-
expect(commandEditor.getModel().getText()).toEqual ''
1216+
atom.commands.dispatch(normalEditor, 'core:move-up')
1217+
expect(normalEditor.getModel().getText()).toEqual('abc')
1218+
atom.commands.dispatch(normalEditor, 'core:move-up')
1219+
expect(normalEditor.getModel().getText()).toEqual('def')
1220+
atom.commands.dispatch(normalEditor, 'core:move-down')
1221+
expect(normalEditor.getModel().getText()).toEqual('abc')
1222+
atom.commands.dispatch(normalEditor, 'core:move-down')
1223+
expect(normalEditor.getModel().getText()).toEqual ''
12241224

12251225
describe "the * keybinding", ->
12261226
beforeEach ->

spec/vim-state-spec.coffee

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -198,14 +198,14 @@ describe "VimState", ->
198198
it "allows the cursor to be placed on the \n character", ->
199199
expect(editor.getCursorScreenPosition()).toEqual [0, 6]
200200

201-
it "puts the editor into command mode when <escape> is pressed", ->
201+
it "puts the editor into normal mode when <escape> is pressed", ->
202202
keydown('escape')
203203

204204
expect(editorElement.classList.contains('normal-mode')).toBe(true)
205205
expect(editorElement.classList.contains('insert-mode')).toBe(false)
206206
expect(editorElement.classList.contains('visual-mode')).toBe(false)
207207

208-
it "puts the editor into command mode when <ctrl-c> is pressed", ->
208+
it "puts the editor into normal mode when <ctrl-c> is pressed", ->
209209
helpers.mockPlatform(editorElement, 'platform-darwin')
210210
keydown('c', ctrl: true)
211211
helpers.unmockPlatform(editorElement)
@@ -224,14 +224,14 @@ describe "VimState", ->
224224
expect(editor.getSelectedBufferRanges()).toEqual [[[0, 4], [0, 5]]]
225225
expect(editor.getSelectedText()).toBe("t")
226226

227-
it "puts the editor into command mode when <escape> is pressed", ->
227+
it "puts the editor into normal mode when <escape> is pressed", ->
228228
keydown('escape')
229229

230230
expect(editor.getCursorBufferPositions()).toEqual [[0, 4]]
231231
expect(editorElement.classList.contains('normal-mode')).toBe(true)
232232
expect(editorElement.classList.contains('visual-mode')).toBe(false)
233233

234-
it "puts the editor into command mode when <escape> is pressed on selection is reversed", ->
234+
it "puts the editor into normal mode when <escape> is pressed on selection is reversed", ->
235235
expect(editor.getSelectedText()).toBe("t")
236236
keydown("h")
237237
keydown("h")
@@ -308,7 +308,7 @@ describe "VimState", ->
308308
expect(vimState.mode).toEqual 'normal'
309309
expect(editorElement.classList.contains('normal-mode')).toBe(true)
310310

311-
it "activateVisualMode with same type puts the editor into command mode", ->
311+
it "activateVisualMode with same type puts the editor into normal mode", ->
312312
keydown('v')
313313
expect(editorElement.classList.contains('visual-mode')).toBe(true)
314314
expect(vimState.submode).toEqual 'characterwise'

0 commit comments

Comments
 (0)