-
Notifications
You must be signed in to change notification settings - Fork 620
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move page (and every link pointing to it) up the directory hierarchy? #926
Comments
Seems like a bug :VimwikiRenameFile should work |
I've really gotten into Vimwiki and it's great tools but I have hit an issue of too many files as well and I need to reorganise. I have created a number of subdirectories and then tried :VimwikiRenameFile to migrate the file (I cant find any documentation to suggest another method) When I try to migrate a file (say linux.wiki to linux/linux.wiki) with the command :VimwikiRenameFile linux/linux the same issue occurs with :VimwikiRenameLink I can't see a way of migrating content into a subdirectory without having either an error or manually updating links and probably missing loads |
@notevenaperson Actually it wasn't a bug, my bad: VimwikiRenameFile did not support files in other dir I considered both as feature request, I coded it and now in dev you can:
Please tell me if it works for you, especially the move to other directory |
Closed by 1f77e47 |
So I'm checking out rename functionality currently, and I notice 2 things about this issue:
Unless I'm missing something, this issue being addressed means we don't need the following guard anymore? diff --git a/autoload/vimwiki/base.vim b/autoload/vimwiki/base.vim
index 1917718..1d4872e 100644
--- a/autoload/vimwiki/base.vim
+++ b/autoload/vimwiki/base.vim
@@ -1760,10 +1760,6 @@ function! s:input_rename_link() abort
let new_link = input('Enter new name: ')
" Guard: Check link
- if new_link =~# '[/\\]'
- call vimwiki#u#error('Cannot rename to a filename with path!')
- return
- endif
if substitute(new_link, '\s', '', 'g') ==? ''
call vimwiki#u#error('Cannot rename to an empty filename!')
return When I remove the guards, rename still seems to work for moving functionality using both methods. I didn't run all the tests yet -- that's my next order of business.
Should this issue be re-opened? A new one created? |
After using vimwiki for a while I realized that organizing my pages in many subfolders takes more effort than an immaculate file tree is worth, and makes linking a more time-consuming process.
I know of the VimwikiRenameFile function, which renames a file and updates links to it across the whole wiki, but I can't find one to move a file to a different directory without breaking every link.
The text was updated successfully, but these errors were encountered: