New command defining format, minor improvements
- If the second address is empty, it is assumed to be `.`
- Regex addresses and `:substitute` now integrate with search history and
respect case sensitivity settings
- Patterns for `:substitute` can't be delimited by
- `:set` now supports inverting options using `:set inv{option}` and
`:set {option}!`
- New commands: `:new`, `:vnew`, `:exit`, `:xall`, `:wall`, `:qall`, `:update`
This commit is contained in:
parent
962e4a35ba
commit
91f3f82730
10 changed files with 862 additions and 400 deletions
|
|
@ -1,23 +1,19 @@
|
|||
class VimOption
|
||||
@singleton: =>
|
||||
@option ||= new VimOption
|
||||
@options =
|
||||
'list': 'editor.showInvisibles'
|
||||
'nu': 'editor.showLineNumbers'
|
||||
'number': 'editor.showLineNumbers'
|
||||
|
||||
list: =>
|
||||
atom.config.set("editor.showInvisibles", true)
|
||||
@registerOption: (vimName, atomName) ->
|
||||
@options[vimName] = atomName
|
||||
|
||||
nolist: =>
|
||||
atom.config.set("editor.showInvisibles", false)
|
||||
@set: (name, value) ->
|
||||
atom.config.set(@options[name], value)
|
||||
|
||||
number: =>
|
||||
atom.config.set("editor.showLineNumbers", true)
|
||||
@get: (name) ->
|
||||
atom.config.get(@options[name])
|
||||
|
||||
nu: =>
|
||||
@number()
|
||||
|
||||
nonumber: =>
|
||||
atom.config.set("editor.showLineNumbers", false)
|
||||
|
||||
nonu: =>
|
||||
@nonumber()
|
||||
@inv: (name) ->
|
||||
atom.config.set(@options[name], not atom.config.get(@options[name]))
|
||||
|
||||
module.exports = VimOption
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue