def get_syntax(self):
        """
		Returns current editor's syntax mode
		@return: str
		"""
        zones = {"css, css *": "css", "xsl, xsl *": "xsl", "xml, xml *": "xml", "haml, haml *": "haml"}
        rng = tea.get_first_range(self._context)
        return tea.select_from_zones(self._context, rng, "html", **zones)
    def get_selection_range(self):
        """
		Returns character indexes of selected text
		@return: list of start and end indexes
		@example
		start, end = zen_editor.get_selection_range();
		print('%s, %s' % (start, end))
		"""
        rng = tea.get_first_range(self._context)
        return rng.location, rng.location + rng.length
Beispiel #3
0
    def get_selection_range(self):
        """
		Returns character indexes of selected text
		@return: list of start and end indexes
		@example
		start, end = zen_editor.get_selection_range();
		print('%s, %s' % (start, end))
		"""
        rng = tea.get_first_range(self._context)
        return rng.location, rng.location + rng.length
Beispiel #4
0
    def get_syntax(self):
        """
		Returns current editor's syntax mode
		@return: str
		"""
        zones = {
            'css, css *': 'css',
            'xsl, xsl *': 'xsl',
            'xml, xml *': 'xml',
            'haml, haml *': 'haml'
        }
        rng = tea.get_first_range(self._context)
        return tea.select_from_zones(self._context, rng, 'html', **zones)
Beispiel #5
0
	def get_syntax(self):
		"""
		Returns current editor's syntax mode
		@return: str
		"""
		zones = {
			'css, css *': 'css',
			'xsl, xsl *': 'xsl',
			'xml, xml *': 'xml',
			'haml, haml *': 'haml'
		}
		rng = tea.get_first_range(self._context)
		return tea.select_from_zones(self._context, rng, 'html', **zones)