try
{
var view = ko.views.manager.currentView;
view.setFocus();
var line = view.scimoz.lineFromPosition(view.scimoz.currentPos);
var lineStart = view.scimoz.positionFromLine(line);
var lineText = view.scimoz.getTextRange(lineStart, view.scimoz.currentPos);
if (!lineText.match(/^\s*$/))
{
var match = /(.*?)([a-zA-Z\-_<\?\#\!]+)(\s*)/.exec(lineText);
if (match)
{
name = match[2];
if (name.charAt(0) == '<')
{
view.scimoz.setSel(lineStart + match[1].length, lineStart + match[1].length + match[2].length + match[3].length);
name = name.substring(1);
view.scimoz.replaceSel('<' + name + '></' + name + '>');
view.scimoz.gotoPos(view.scimoz.currentPos - (name.length + 3))
}
else
{
var snippet = null;
var folder = ko.projects.findPart('folder', view.document.language, 'container');
if (folder)
snippet = folder.getChildByAttributeValue('name', name, 0);
if (!snippet)
snippet = ko.projects.findPart('snippet', name, 'container');
if(snippet)
{
view.scimoz.setSel(lineStart + match[1].length, lineStart + match[1].length + match[2].length + match[3].length);
Snippet_insert(snippet);
}
}
}
}
}
catch(e)
{
alert(e);
}
class !@#_currentPos!@#_anchor:
def __init__(self):
def !@#_currentPos!@#_anchor(self):
#encoding utf-8
import unittest
class Test!@#_currentPos!@#_anchor(unittest.TestCase):
def setUp(self):
pass
def tearDown(self):
pass
if __name__ == '__main__':
unittest.main()
for !@#_currentPos!@#_anchor in :
if __name__ == "__main__":
!@#_currentPos!@#_anchor
#!/usr/bin/env python
!@#_currentPos!@#_anchor
<img src="!@#_currentPos!@#_anchor" alt="" />
<script type="text/javascript" src="!@#_currentPos!@#_anchor"></script>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>!@#_currentPos!@#_anchor</title>
</head>
<body>
</body>
</html>
<div id="!@#_currentPos!@#_anchor"></div>
<link rel="stylesheet" type="text/css" href="!@#_currentPos!@#_anchor">
<a href="!@#_currentPos!@#_anchor"></a>
<script type="text/javascript">
<!--
!@#_currentPos!@#_anchor
// -->
</script>
<style type="text/css">
!@#_currentPos!@#_anchor
</style>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
<head>
<title>!@#_currentPos!@#_anchor</title>
</head>
<body>
</body>
</html>
<?php
!@#_currentPos!@#_anchor
?>
class !@#_currentPos!@#_anchor extends
{
}
function !@#_currentPos!@#_anchor()
{
}
0