Add splitbelow and splitright options to :set

This commit is contained in:
jazzpi 2016-08-10 02:01:01 +02:00
parent a59a6f9364
commit 7bec719a6f
2 changed files with 52 additions and 0 deletions

View file

@ -802,6 +802,34 @@ describe "the commands", ->
submitNormalModeInputText(':set nonumber')
expect(atom.config.get('editor.showLineNumbers')).toBe(false)
it "sets (no)sp(lit)r(ight)", ->
keydown(':')
submitNormalModeInputText(':set spr')
expect(atom.config.get('ex-mode.splitright')).toBe(true)
atom.commands.dispatch(editorElement, 'ex-mode:open')
submitNormalModeInputText(':set nospr')
expect(atom.config.get('ex-mode.splitright')).toBe(false)
atom.commands.dispatch(editorElement, 'ex-mode:open')
submitNormalModeInputText(':set splitright')
expect(atom.config.get('ex-mode.splitright')).toBe(true)
atom.commands.dispatch(editorElement, 'ex-mode:open')
submitNormalModeInputText(':set nosplitright')
expect(atom.config.get('ex-mode.splitright')).toBe(false)
it "sets (no)s(plit)b(elow)", ->
keydown(':')
submitNormalModeInputText(':set sb')
expect(atom.config.get('ex-mode.splitbelow')).toBe(true)
atom.commands.dispatch(editorElement, 'ex-mode:open')
submitNormalModeInputText(':set nosb')
expect(atom.config.get('ex-mode.splitbelow')).toBe(false)
atom.commands.dispatch(editorElement, 'ex-mode:open')
submitNormalModeInputText(':set splitbelow')
expect(atom.config.get('ex-mode.splitbelow')).toBe(true)
atom.commands.dispatch(editorElement, 'ex-mode:open')
submitNormalModeInputText(':set nosplitbelow')
expect(atom.config.get('ex-mode.splitbelow')).toBe(false)
describe "aliases", ->
it "calls the aliased function without arguments", ->
ExClass.registerAlias('W', 'w')