ruby/import_js/importer.rb
def import
      variable_name = VIM.evaluate("expand('<cword>')")
      if variable_name.empty?
        VIM.message(<<-EOS.split.join(' '))
          [import-js]: No variable to import. Place your cursor on a variable,
          then try again.
        EOS
        return
      end
      current_row, current_col = window.cursor

      old_buffer_lines = buffer.count
      import_one_variable variable_name
      return unless lines_changed = buffer.count - old_buffer_lines
      window.cursor = [current_row + lines_changed, current_col]
    end
# Finds variable under the cursor to import. By default, this is bound to
# `<Leader>j`.
Finds variable under the cursor to import. By default, this is bound to
`j`.
Finds variable under the cursor to import . By default this is bound to ` j ` .
def import
      variable_name = VIM.evaluate("expand('<cword>')")
      if variable_name.empty?
        VIM.message(<<-EOS.split.join(' '))
          [import-js]: No variable to import. Place your cursor on a variable,
          then try again.
        EOS
        return
      end
      current_row, current_col = window.cursor
      old_buffer_lines = buffer.count
      import_one_variable variable_name
      return unless lines_changed = buffer.count - old_buffer_lines
      window.cursor = [current_row + lines_changed, current_col]
    end
def import variable_name = VIM . evaluate ( "expand('<cword>')" ) if variable_name . empty? VIM . message ( <<-EOS . split . join ( ' ' ) ) 
          [import-js]: No variable to import. Place your cursor on a variable,
          then try again.
         EOS return end current_row , current_col = window . cursor old_buffer_lines = buffer . count import_one_variable variable_name return unless lines_changed = buffer . count - old_buffer_lines window . cursor = [ current_row + lines_changed , current_col ] end
Finds variable under the cursor to import.
Finds variable under the cursor to import .