diff --git a/lib/ex-mode.coffee b/lib/ex-mode.coffee index 490003e..5274e0a 100644 --- a/lib/ex-mode.coffee +++ b/lib/ex-mode.coffee @@ -36,6 +36,9 @@ module.exports = ExMode = @vim = vim @globalExState.setVim(vim) + consumeVimModePlus: (vim) -> + this.consumeVim(vim) + config: splitbelow: title: 'Split below' diff --git a/lib/ex.coffee b/lib/ex.coffee index 5edf5a8..e026b96 100644 --- a/lib/ex.coffee +++ b/lib/ex.coffee @@ -335,12 +335,23 @@ class Ex [pattern, substition, flags] = parsed if pattern is '' - pattern = vimState.getSearchHistoryItem() + if vimState.getSearchHistoryItem? + # vim-mode + pattern = vimState.getSearchHistoryItem() + else if vimState.searchHistory? + # vim-mode-plus + pattern = vimState.searchHistory.get('prev') + if not pattern? atom.beep() throw new CommandError('No previous regular expression') else - vimState.pushSearchHistory(pattern) + if vimState.pushSearchHistory? + # vim-mode + vimState.pushSearchHistory(pattern) + else if vimState.searchHistory? + # vim-mode-plus + vimState.searchHistory.save(pattern) try flagsObj = {} diff --git a/package.json b/package.json index 7fa69ff..0984409 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,11 @@ "versions": { "^0.1.0": "consumeVim" } + }, + "vim-mode-plus": { + "versions": { + "^0.1.0": "consumeVimModePlus" + } } }, "providedServices": {