Skip to content

Commit beefaa7

Browse files
committed
cleanup
1 parent ef99d0e commit beefaa7

File tree

2 files changed

+4
-16
lines changed

2 files changed

+4
-16
lines changed

server/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def loop(self):
3131
elif req[0] == 'exit':
3232
break
3333
elif ev == self.vimx.ch_in:
34-
vi = self.vimx.wait()
34+
vi = self.vimx.recv()
3535
self.logger.info("got: %s", vi)
3636
self.vimx.send('hello {}'.format(x))
3737
x += 1

server/vimx.py

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def __init__(self, ch_in, ch_out):
1010
self.buffer = [] # buffer for 'positive' objects
1111
self.logger = logging.getLogger(__name__)
1212

13-
def wait(self, expect=0):
13+
def recv(self, expect=0):
1414
""" Blocking function. Use with care!
1515
`expect` should either be 0 or a negative number. If `expect == 0`, any positive
1616
indexed object is returned. Otherwise, it will queue any positive objects until the
@@ -49,7 +49,7 @@ def call(self, fname, *args, reply=True):
4949
self.counter -= 1
5050
self.write(obj)
5151
if reply:
52-
re = self.wait(expect=self.counter)
52+
re = self.recv(expect=self.counter)
5353
return re
5454

5555
def eval(self, expr, reply=True):
@@ -59,7 +59,7 @@ def eval(self, expr, reply=True):
5959
self.counter -= 1
6060
self.write(obj)
6161
if reply:
62-
re = self.wait(expect=self.counter)
62+
re = self.recv(expect=self.counter)
6363
return re
6464

6565
def command(self, cmd):
@@ -78,18 +78,6 @@ def buffer_add(self, name):
7878
self.call('setbufvar', bufnr, '&bl', 1, reply=False)
7979
return bufnr
8080

81-
def sign_place(self, sign_id, name, bufnr, line):
82-
""" Place a sign at the specified location. """
83-
self.command("sign place {} name={} line={} buffer={}".format(sign_id, name, line, bufnr))
84-
85-
def sign_unplace(self, sign_id):
86-
""" Hide a sign with specified id. """
87-
self.command("sign unplace {}".format(sign_id))
88-
89-
def get_buffer_name(self, nr):
90-
""" Get the buffer name given its number. """
91-
return self.call('bufname', nr)
92-
9381
def abspath(self, relpath):
9482
vim_cwd = self.call("getcwd")
9583
return path.join(vim_cwd, relpath)

0 commit comments

Comments
 (0)