Class: Incrementer

Inherits:
Object show all
Defined in:
lib/xiki/incrementer.rb

Overview

Helps you to insert “1”, “2”, “3”.… Useful during macros.

Class Method Summary collapse

Class Method Details

.enterObject



11
12
13
14
# File 'lib/xiki/incrementer.rb', line 11

def self.enter
  self.increment if Keys.prefix_u
  View.insert Clipboard['n']
end

.incrementObject



7
8
9
# File 'lib/xiki/incrementer.rb', line 7

def self.increment
  Clipboard['n'] = Clipboard['n'].next
end

.startObject



3
4
5
# File 'lib/xiki/incrementer.rb', line 3

def self.start
  Clipboard['n'] = (Keys.prefix_n || 0).to_s
end