def delete_pad(): # {{{1 """ Deletes the currently selected note in the __pad__ buffer. """ confirm = vim.eval('input("really delete? (y/n): ")') if confirm in ("y", "Y"): path = get_selected_path() remove(path) make_sure_dir_is_empty(path) vim.command("ListPads") vim.command("redraw!")
def delete_pad(): # {{{1 """ Deletes the currently selected note in the __pad__ buffer. """ confirm = vim.eval('input("really delete? (y/n): ")') if confirm in ("y", "Y"): path = get_selected_path() remove(path) make_sure_dir_is_empty(path) vim.command("Pad ls") vim.command("redraw!")
def move_to_folder(path=None): # {{{1 """ Moves the selected pad to a subfolder of g:pad#dir """ selected_path = get_selected_path() if path is None: path = vim.eval('input("move to: ")') if not exists(join(get_save_dir(), path)): mkdir(join(get_save_dir(), path)) move(selected_path, join(get_save_dir(), path, basename(selected_path))) make_sure_dir_is_empty(path) vim.command("ListPads") if path is None: vim.command("redraw!")
def move_to_folder(path=None): # {{{1 """ Moves the selected pad to a subfolder of g:pad#dir """ selected_path = get_selected_path() if path is None: path = vim.eval('input("move to: ")') if not exists(join(get_save_dir(), path)): mkdir(join(get_save_dir(), path)) move(selected_path, join(get_save_dir(), path, basename(selected_path))) make_sure_dir_is_empty(path) vim.command("Pad ls") if path is None: vim.command("redraw!")