]> git.r.bdr.sh - rbdr/dotfiles/blob - atom/packages/vim-mode/lib/utils.coffee
Adds atom
[rbdr/dotfiles] / atom / packages / vim-mode / lib / utils.coffee
1 module.exports =
2 # Public: Determines if a string should be considered linewise or character
3 #
4 # text - The string to consider
5 #
6 # Returns 'linewise' if the string ends with a line return and 'character'
7 # otherwise.
8 copyType: (text) ->
9 if text.lastIndexOf("\n") is text.length - 1
10 'linewise'
11 else if text.lastIndexOf("\r") is text.length - 1
12 'linewise'
13 else
14 'character'