Add basic support for visual marks < and >
Only works with range '<,'>. If there are multiple selections, run the command for each one. Closes #31.
This commit is contained in:
parent
3a104fe061
commit
1b8f6238c2
5 changed files with 84 additions and 27 deletions
|
|
@ -4,10 +4,13 @@ Ex = require './ex'
|
|||
|
||||
module.exports =
|
||||
class ExViewModel extends ViewModel
|
||||
constructor: (@exCommand) ->
|
||||
constructor: (@exCommand, withSelection) ->
|
||||
super(@exCommand, class: 'command')
|
||||
@historyIndex = -1
|
||||
|
||||
if withSelection
|
||||
@view.editorElement.getModel().setText("'<,'>")
|
||||
|
||||
@view.editorElement.addEventListener('keydown', @tabAutocomplete)
|
||||
atom.commands.add(@view.editorElement, 'core:move-up', @increaseHistoryEx)
|
||||
atom.commands.add(@view.editorElement, 'core:move-down', @decreaseHistoryEx)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue