Giter Club home page Giter Club logo

mintree's People

Contributors

philrunninger avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

mintree's Issues

Add file system operations

Create, rename, copy, or delete files or folders from the MinTree window. The new commands are:

  • A - append a new folder (with trailing slash) or file (without slash).
  • S - rename
  • D - delete a folder or file (for potential move elsewhere)
  • Y - yank a folder/file for copying
  • P - put a folder or file, after a prior D or Y command.

Other considerations and details:

  • After renaming or deleting a file, search open buffers for the old file, and reopen the new file.
  • D will move the folder/file to a temporary location, and remember where that is.
  • Y will copy the folder/file to a temporary location, and remember where that is.
  • P will copy from the temporary location into the target location.
  • Subsequent D or Y commands will delete and forget the previous temporary folder/file.
  • If using the tempname() function to create the temporary location, Vim automatically will delete that temporary folder when exiting.
  • When Appending or Putting on a...
    • folder, the object will go in that folder
    • file, the object will go in that file's folder

Other Tasks:

  • Test it fully
  • Make it work in Windows

File won't open

If I have two files in a directory, .env and .env.development, and .env.development is already open, I cannot open .env.

Add a `cd` command

Add a cd command to change the current working directory to the directory under the cursor.

Empty folders throw `No fold found` error.

To reproduce this error:

  1. mkdir empty_folder
  2. cd empty_folder
  3. echo "abcde" >> .snafu
  4. vim .snafu
  5. :MinTree

You will see this error message.

Error detected while processing function <SNR>68_MinTree[4]..<SNR>68_MinTreeOpen[8]..<SNR>68_ActivateNode:
line    3:
Error detected while processing function <SNR>68_MinTree[4]..<SNR>68_MinTreeOpen[8]..<SNR>68_ActivateNode[4]..<SNR>68_UpdateOpen[7]..<SNR>68_LocateFile[1]..<SNR>68__locateFile[5]..<SNR>68_FoldLimits:
line    4:
line    8:
Error detected while processing function <SNR>68_MinTree[6]..<SNR>68_UpdateOpen[7]..<SNR>68_LocateFile[1]..<SNR>68__locateFile[5]..<SNR>68_FoldLimits:
line    4:
line    8:
E490: No fold found

Then toggling the display of hidden files also throws similar errors, erroneously edits the originally opened file, and leaves it unmodifiable.

  1. I
Error detected while processing function <SNR>68_ToggleHidden[2]..<SNR>68_Refresh[1]..<SNR>68_FoldLimits:
line    4:
line    8:
Error detected while processing function <SNR>68_ToggleHidden[2]..<SNR>68_Refresh[8]..<SNR>68_UpdateOpen[7]..<SNR>68_LocateFile[1]..<SNR>68__locateFile[5]..<SNR>68_FoldLimits:
line    4:
line    8:
E490: No fold found

Implement a fuzzy search to quickly find files

Override the / keystroke to have customized searching behavior.

  1. When abc is typed, the search string is a.*b.*c.*.
  2. Add keystrokes (<C-N> and <C-P> perhaps) to move to next/previous match while still in "enter search string" mode.
  3. Add a keystroke <C-O> to open a folder while still in "enter search string" mode.

`cd` when on a file fails.

Error detected while processing function mintree#main#SetCWD:
line    5:
E344: Can't find directory "C:\Users\---\mintree\README.md" in cdpath
E472: Command failed

Cleanup and some miscellaneous changes

I'm not sure J, K, <C-J>, and <C-K> are all that useful. I'm thinking about removing them. Then I can use J and K to go down/up to the nearest directory, skipping over files. They would essentially be shortcuts for FjF and FkF. I don't know; maybe it will be useful.

I also want to add vifm's f<char> key. Instead of Vim's normal behavior, this goes to the first line that starts with <char>.

Make w work only on files.

Fix wording is some of the help messages: o, x, w.

Unlisted buffers show as open in MinTree.

To see this, :set cole=0. Then look at column 4. A 1 indicates that the file is open; however, we shouldn't consider unlisted buffers to be open. To make a buffer unlisted, use the :bdelete command.

Add bookmarks

This will be a big departure from the NERDTree method. I want to use vifm's style, which is similar to vim's marks:

  • m{a-zA-Z} creates a bookmark
  • '{a-zA-Z} jumps to the mark
  • :marks displays the currently set marks
  • :delmark {a-zA-Z} deletes a mark

This is still a fresh idea. Not sure yet how differently lowercase marks work from uppercase.

Fix jumping caused by refresh after `w`

After pressing the w key, the tree is refreshed to update the highlighting, but refresh puts the cursor at the parent directory node. How do we keep it on the file being wiped out?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.