diff options
| author | Ben Beltran <ben@nsovocal.com> | 2015-09-28 12:39:59 -0500 |
|---|---|---|
| committer | Ben Beltran <ben@nsovocal.com> | 2015-09-28 12:39:59 -0500 |
| commit | 455f099b504ec07dd492ab31987ae05a6f6774c7 (patch) | |
| tree | 22b0c7fd8e492733b97e661750a2d79c46da451d /atom/packages/vim-surround/lib | |
| parent | 24c7594d62d8d7fbbcdb64b11ce4adc5d8e6991a (diff) | |
Adds atom packages
Diffstat (limited to 'atom/packages/vim-surround/lib')
4 files changed, 12 insertions, 6 deletions
diff --git a/atom/packages/vim-surround/lib/command/change.coffee b/atom/packages/vim-surround/lib/command/change.coffee index b1860f5..7bdf623 100644 --- a/atom/packages/vim-surround/lib/command/change.coffee +++ b/atom/packages/vim-surround/lib/command/change.coffee @@ -6,7 +6,7 @@ Selector = require './selector' module.exports = class Change constructor: (config) -> @command = config.changeSurroundCommand - @context = "atom-text-editor.vim-mode.command-mode" + @context = "atom-text-editor.vim-mode.normal-mode" @disposables = new CompositeDisposable @curPairs = [] @curPairsWithTarget = [] diff --git a/atom/packages/vim-surround/lib/command/delete.coffee b/atom/packages/vim-surround/lib/command/delete.coffee index aa5eec0..744b3a1 100644 --- a/atom/packages/vim-surround/lib/command/delete.coffee +++ b/atom/packages/vim-surround/lib/command/delete.coffee @@ -1,4 +1,4 @@ -{CompositeDisposable} = require 'atom' +{compositedisposable} = require 'atom' Base = require './base' Selector = require './selector' @@ -6,7 +6,7 @@ Selector = require './selector' module.exports = class Delete extends Base constructor: (config) -> @command = config.deleteSurroundCommand - @context = "atom-text-editor.vim-mode.command-mode" + @context = "atom-text-editor.vim-mode.normal-mode" super config getName: (key) -> "delete-#{key}" diff --git a/atom/packages/vim-surround/lib/command/selector.coffee b/atom/packages/vim-surround/lib/command/selector.coffee index aae3541..bcb3c15 100644 --- a/atom/packages/vim-surround/lib/command/selector.coffee +++ b/atom/packages/vim-surround/lib/command/selector.coffee @@ -1,4 +1,6 @@ -vimModePath = atom.packages.resolvePackagePath('vim-mode') +vimModePath = atom.packages.resolvePackagePath('vim-mode') or + atom.packages.resolvePackagePath('vim-mode-next') + {SelectInsideQuotes, SelectInsideBrackets} = require "#{vimModePath}/lib/text-objects" module.exports = class Selector diff --git a/atom/packages/vim-surround/lib/vim-surround.coffee b/atom/packages/vim-surround/lib/vim-surround.coffee index b9fd332..f293194 100644 --- a/atom/packages/vim-surround/lib/vim-surround.coffee +++ b/atom/packages/vim-surround/lib/vim-surround.coffee @@ -20,6 +20,9 @@ module.exports = surroundCommand: type: 'string' default: 's' + deleteCommand: + type: 'string' + default: 'd s' activate: (state) -> @commandClasses = [ @@ -37,5 +40,6 @@ module.exports = @commands.push command @disposables.add command.disposables - deactivate: () -> - @disposables.dispose() + consumeVimMode: (vimMode) -> @vimMode = vimMode + + deactivate: () -> @disposables.dispose() |