Add 'smartcase' option
This commit is contained in:
parent
6bb9c45793
commit
c6efc0d46c
2 changed files with 26 additions and 0 deletions
|
|
@ -44,4 +44,16 @@ class VimOption
|
|||
nosb: =>
|
||||
@nosplitbelow()
|
||||
|
||||
smartcase: =>
|
||||
atom.config.set("vim-mode.useSmartcaseForSearch", true)
|
||||
|
||||
scs: =>
|
||||
@smartcase()
|
||||
|
||||
nosmartcase: =>
|
||||
atom.config.set("vim-mode.useSmartcaseForSearch", false)
|
||||
|
||||
noscs: =>
|
||||
@nosmartcase()
|
||||
|
||||
module.exports = VimOption
|
||||
|
|
|
|||
|
|
@ -835,6 +835,20 @@ describe "the commands", ->
|
|||
submitNormalModeInputText(':set nosplitbelow')
|
||||
expect(atom.config.get('ex-mode.splitbelow')).toBe(false)
|
||||
|
||||
it "sets (no)s(mart)c(a)s(e)", ->
|
||||
openEx()
|
||||
submitNormalModeInputText(':set scs')
|
||||
expect(atom.config.get('vim-mode.useSmartcaseForSearch')).toBe(true)
|
||||
openEx()
|
||||
submitNormalModeInputText(':set noscs')
|
||||
expect(atom.config.get('vim-mode.useSmartcaseForSearch')).toBe(false)
|
||||
openEx()
|
||||
submitNormalModeInputText(':set smartcase')
|
||||
expect(atom.config.get('vim-mode.useSmartcaseForSearch')).toBe(true)
|
||||
openEx()
|
||||
submitNormalModeInputText(':set nosmartcase')
|
||||
expect(atom.config.get('vim-mode.useSmartcaseForSearch')).toBe(false)
|
||||
|
||||
describe "aliases", ->
|
||||
it "calls the aliased function without arguments", ->
|
||||
ExClass.registerAlias('W', 'w')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue