parent
f8a2248a28
commit
abafebd389
|
@ -127,3 +127,11 @@ class ToggleTabs(Method):
|
||||||
w.set_error("Buffer will translate %d spaces to a tab" % b.indentlvl)
|
w.set_error("Buffer will translate %d spaces to a tab" % b.indentlvl)
|
||||||
else:
|
else:
|
||||||
w.set_error("Buffer will not write tabs")
|
w.set_error("Buffer will not write tabs")
|
||||||
|
|
||||||
|
class Pwd(Method):
|
||||||
|
'''Print the buffer's current working directory'''
|
||||||
|
def _execute(self, w, **vargs):
|
||||||
|
cwd = os.path.dirname(w.buffer.path) + '/'
|
||||||
|
if cwd.startswith(os.getenv('HOME')):
|
||||||
|
cwd = cwd.replace(os.getenv('HOME'), '~')
|
||||||
|
w.set_error("Directory %s" % cwd)
|
||||||
|
|
Loading…
Reference in New Issue