Permalink
Browse files

noswapfile for VimWindow

  • Loading branch information...
1 parent 5eed2d3 commit ce6e26bd79a76da7ff9d5ae8f1369eab7b4e498e brook hong committed Feb 11, 2014
Showing with 8 additions and 3 deletions.
  1. +8 −3 plugin/dbgpavim.py
View
@@ -61,7 +61,7 @@ def DBGPavimTrace(log):
tracelog.write("\n"+log+"\n")
tracelog.flush()
-class VimWindow:
+class VimWindow(object):
""" wrapper class of window of vim """
def __init__(self, name = 'DEBUG_WINDOW'):
""" initialize """
@@ -81,6 +81,7 @@ def prepare(self):
def before_create(self):
vim.command("1wincmd w")
def on_create(self):
+ self.command('setl noswf')
pass
def getwinnr(self):
return int(vim.eval("bufwinnr('"+self.name+"')"))
@@ -161,6 +162,7 @@ def render(self, xml):
lines += str('%-2s %-15s %s:%s\n' % (node.get('level'), wr+fmark, fn, node.get('lineno')))
self.write(lines)
def on_create(self):
+ super(StackWindow, self).on_create()
self.command('highlight CurStack term=reverse ctermfg=White ctermbg=Red gui=reverse')
self.highlight_stack(0)
def highlight_stack(self, no):
@@ -247,13 +249,14 @@ def render(self, xml, lineno = 0):
out += "\n"
self.write(out, lineno)
def on_create(self):
+ super(WatchWindow, self).on_create()
self.commenter = '// '
if dbgPavim.fileType == 'php':
self.write('<?')
elif dbgPavim.fileType == 'python':
self.commenter = '## '
- self.command('set noai nocin')
- self.command('set wrap fdm=manual fmr={{{,}}} ft=%s fdl=1' % (dbgPavim.fileType))
+ self.command('setl noai nocin')
+ self.command('setl wrap fdm=manual fmr={{{,}}} ft=%s fdl=1' % (dbgPavim.fileType))
self.command('inoremap <buffer> <cr> <esc>:python dbgPavim.debugSession.watch_execute()<cr>')
def input(self, mode, arg = ''):
if arg == '%v%':
@@ -282,6 +285,7 @@ def __init__(self, name = 'HELP__WINDOW'):
def before_create(self):
pass
def on_create(self):
+ super(HelpWindow, self).on_create()
if vim.eval('g:dbgPavimLang') == 'cn' :
self.write( \
'[ Function Keys ] | [ Command Mode ] \n' + \
@@ -326,6 +330,7 @@ def __init__(self, name = 'CONSOLE__WINDOW'):
def before_create(self):
pass
def on_create(self):
+ super(ConsoleWindow, self).on_create()
vim.command('setlocal autoread')
class DebugUI:

0 comments on commit ce6e26b

Please sign in to comment.