]> git.r.bdr.sh - rbdr/dotfiles/blame_incremental - atom/packages/vim-mode/lib/insert-mode.coffee
Update prompt to show ruby & node envs
[rbdr/dotfiles] / atom / packages / vim-mode / lib / insert-mode.coffee
... / ...
CommitLineData
1copyCharacterFromAbove = (editor, vimState) ->
2 editor.transact ->
3 for cursor in editor.getCursors()
4 {row, column} = cursor.getScreenPosition()
5 continue if row is 0
6 range = [[row-1, column], [row-1, column+1]]
7 cursor.selection.insertText(editor.getTextInBufferRange(editor.bufferRangeForScreenRange(range)))
8
9copyCharacterFromBelow = (editor, vimState) ->
10 editor.transact ->
11 for cursor in editor.getCursors()
12 {row, column} = cursor.getScreenPosition()
13 range = [[row+1, column], [row+1, column+1]]
14 cursor.selection.insertText(editor.getTextInBufferRange(editor.bufferRangeForScreenRange(range)))
15
16module.exports = {
17 copyCharacterFromAbove,
18 copyCharacterFromBelow
19}