Skip to content

Commit

Permalink
Merge pull request #31 from abudden/devel
Browse files Browse the repository at this point in the history
Fixes for paths with spaces and support for opening notes at the right.
  • Loading branch information
fmoralesc committed Aug 28, 2012
2 parents 66d2f47 + 6b1aca0 commit c5796e7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion plugin/padlib/handler.py
Expand Up @@ -34,7 +34,10 @@ def open_pad(path=None, first_line=None): #{{{1
path = join(get_save_dir(), timestamp()) path = join(get_save_dir(), timestamp())


if bool(int(vim.eval("g:pad_open_in_split"))): if bool(int(vim.eval("g:pad_open_in_split"))):
vim.command("silent! botright" + str(vim.eval("g:pad_window_height")) + "split " + path) if vim.eval('g:pad_position') == 'right':
vim.command("silent! rightbelow" + str(vim.eval("g:pad_window_width")) + "vsplit " + path)
else:
vim.command("silent! botright" + str(vim.eval("g:pad_window_height")) + "split " + path)
else: else:
vim.command("silent! edit " + path) vim.command("silent! edit " + path)


Expand Down
4 changes: 2 additions & 2 deletions plugin/padlib/vim_globals.py
Expand Up @@ -28,6 +28,6 @@ def set_vim_globals():


# we forbid writing backups of the notes # we forbid writing backups of the notes
orig_backupskip = vim.eval("&backupskip") orig_backupskip = vim.eval("&backupskip")
vim.command("set backupskip=" + vim.command("let &backupskip='" +
",".join([orig_backupskip, join(get_save_dir(), "*")])) ",".join([orig_backupskip, join(get_save_dir(), "*")])+"'")


0 comments on commit c5796e7

Please sign in to comment.