Skip to content
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

New Features Added! (See details for explanations) #6

Open
wants to merge 100 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
100 commits
Select commit Hold shift + click to select a range
f948499
Merge remote-tracking branch 'refs/remotes/micro-editor/master'
NicolaiSoeborg Dec 12, 2016
970aebf
Show dirs, set focus on new opened tab
NicolaiSoeborg Dec 12, 2016
44e8967
Better "select file" menu
NicolaiSoeborg Dec 12, 2016
f45a8c3
Remove statusline from filetree
NicolaiSoeborg Dec 12, 2016
7bcf2eb
Add some text to README
NicolaiSoeborg Dec 12, 2016
ef19390
Support for Windows filesystems (limited)
NicolaiSoeborg Dec 13, 2016
cffd201
Bump version number
NicolaiSoeborg Dec 13, 2016
f3a04df
Open files on right side, optimize RefreshTree()
NicolaiSoeborg Dec 13, 2016
e52fb67
More refactor, show path in filetree
NicolaiSoeborg Dec 13, 2016
dc3906b
Try to do a better job of Windows path handeling
NicolaiSoeborg Dec 13, 2016
48dff2c
Fix: Linux filepath shouldn't contain a star
NicolaiSoeborg Dec 13, 2016
b4a3960
Fix wrong readme
NicolaiSoeborg Dec 13, 2016
0d3f484
Fix windows "isDir" path detection
NicolaiSoeborg Dec 14, 2016
8a53791
Fix: slow opening of large files
NicolaiSoeborg Dec 17, 2016
99a472e
Merge remote-tracking branch 'refs/remotes/micro-editor/master'
NicolaiSoeborg Dec 18, 2016
98449eb
Better filetree styling
NicolaiSoeborg Dec 26, 2016
27c6634
Add deletion option, bump to version 1.3.0, refactor
Jan 30, 2017
982ecbe
Add license and repo.json
Jan 30, 2017
d3c8c54
Fix error when deleting files.
Feb 14, 2017
2542bae
Remove messenger prompt on deletion
NicolaiSoeborg Feb 19, 2017
9312f6f
Add ToggleTree, rename 'filetree' to 'filemanager'
NicolaiSoeborg Mar 9, 2017
d408132
Cleanup after name change
NicolaiSoeborg Mar 9, 2017
8fdc59f
Fix example keybinding
NicolaiSoeborg Mar 9, 2017
cf762df
Fix: new syntax for Micro 1.1.5
NicolaiSoeborg Mar 27, 2017
05fb55e
vscode config files for spelling
Aug 17, 2017
bdd762d
added debug error messages and comments
Aug 17, 2017
aa0ef2f
check options for errors
Aug 17, 2017
da6f5c4
moved function and updated comment
Aug 17, 2017
519f69f
correct spelling
Aug 17, 2017
bde6916
moved out options to its own function
Aug 17, 2017
c684046
Added path name
Aug 17, 2017
5f28b36
added micro log to each function
Aug 17, 2017
3d7937b
changed AddLog back to Error as it is automatic logged to log.
Aug 17, 2017
45b7a01
made clear messages
Aug 17, 2017
637d8f6
moved functions around to try and group then together.
Aug 17, 2017
72aa0ce
changed version number and needs micro editor 1.3.2 to work.
Aug 17, 2017
2570f9d
changed debug mode to false
Sep 4, 2017
5d0a284
changed to version 2 as not backwards compatible with micro editor be…
Sep 4, 2017
ace5ebe
Merge pull request #4 from tommyshem/master
NicolaiSoeborg Sep 12, 2017
4de1055
Add .gitignore
NicolaiSoeborg Sep 30, 2017
2f8ab43
Release version v2.0.0
NicolaiSoeborg Sep 30, 2017
580c2c2
Change debugging
NicolaiSoeborg Oct 24, 2017
a94f36e
Add mouse support
NicolaiSoeborg Oct 24, 2017
2f43d8c
Update filemanager.lua
Nov 2, 2017
d8dccc8
Add proper way to install plugin in README
sum01 Nov 2, 2017
445b5d8
Merge pull request #7 from sum01/master
NicolaiSoeborg Nov 4, 2017
43155fb
Merge pull request #8 from NicolaiSoeborg/NopeDK-patch-1
NicolaiSoeborg Nov 4, 2017
206e987
Use Go's standard libs instead of Lua's
sum01 Nov 20, 2017
0049026
Remove 'limited windows support' from README
sum01 Nov 19, 2017
0a02cf3
Merge pull request #12 from sum01/go_libs
NicolaiSoeborg Nov 24, 2017
91ffa47
stop out of bound error for long lists
Nov 26, 2017
9c0e0f1
Merge pull request #16 from NicolaiSoeborg/outOfBoundError
NicolaiSoeborg Nov 27, 2017
2797d28
Release version 2.1.1
NicolaiSoeborg Dec 9, 2017
9cde215
Big rework, brings tons of new features & fixes
sum01 Dec 7, 2017
5f0a66f
Remove pointless gitignore
sum01 Dec 7, 2017
216da7e
Add an editorconfig
sum01 Dec 7, 2017
7bdf85f
Syntax highlighting fix
sum01 Dec 7, 2017
f698e9e
Update README with new commands
sum01 Dec 8, 2017
db6039d
Add example picture
sum01 Dec 28, 2017
e9b1713
Increment version in lua file
sum01 Dec 28, 2017
c107d8a
Follow the user when cd is run
sum01 Dec 29, 2017
b35b015
Add missing zero's for command completion
sum01 Jan 4, 2018
6d3035b
Fix incorrect mouseclick position
sum01 Jan 9, 2018
d3b550c
Merge pull request #21 from sum01/v3
NicolaiSoeborg Jan 10, 2018
418b88e
Clean up the README
sum01 Jan 14, 2018
708f20c
Add the option to hide vcs-ignored files and/or dotfiles
sum01 Jan 14, 2018
bbbf0fb
Fix weird behaviour with 'rm' command
sum01 Jan 20, 2018
37792e1
Add a CHANGELOG, adhearing to http://keepachangelog.com/en/1.0.0/
sum01 Jan 20, 2018
f52e005
Workaround to fix #24
sum01 Jan 21, 2018
9ba6f0d
Don't bother getting ignored if we don't need it
sum01 Jan 26, 2018
79ae647
Merge pull request #25 from sum01-dev
sum01 Jan 30, 2018
63ac651
Increment to v3.1.0
sum01 Jan 30, 2018
a2d0408
Fix some issues caused by how files are opened
sum01 Feb 4, 2018
1ec95b6
Increment to v3.1.1
sum01 Feb 4, 2018
17adec4
Bump to 3.1.2 to fix #28
sum01 Feb 8, 2018
59d8c30
Compress a directory even if you are on a file now
avently Feb 13, 2018
4fb7c5a
Jump to top from any file/folder via left arrow
avently Feb 13, 2018
32dfb88
Added an option for compressing parent directory
avently Feb 13, 2018
5338e62
Merge pull request #30 from avently/patch-1
sum01 Feb 15, 2018
ffcf64e
Move the preInsertTab callback next to other tab callback
sum01 Feb 14, 2018
eb1d6c4
Add CHANGELOG entries for #30
sum01 Feb 15, 2018
f1b4c32
Use return without the do/end wrapper
sum01 Feb 15, 2018
279e712
Add a check to prevent removal failing
sum01 Feb 15, 2018
57df3ff
Increment to v3.2.0
sum01 Feb 15, 2018
1cec711
Added support for listing child folders before files.
Aug 11, 2018
2ac3e9d
refactored get_scanlist to be more readable. There is a problem openi…
cbrown1 Aug 11, 2018
5a5db53
Fix up PR for sorting folders above filenames
sum01 Sep 14, 2018
65a602f
Change to correct Golang lib for basename
sum01 Sep 14, 2018
59b5ef0
Increment to v3.3.0
sum01 Sep 14, 2018
24c404c
Don't call ReOpen() after opening a file
jackwilsdon Oct 2, 2018
712d902
Increment to v3.3.1
sum01 Oct 3, 2018
01ec427
Add an open-on-start option (default false)
sum01 Oct 3, 2018
d3dbabe
Update options in README
sum01 Oct 3, 2018
1c23bd9
Fixed broken filemanager-showignored
scottbilas Oct 8, 2018
19fc8aa
Put cursor on empty view when auto-starting
sum01 Oct 11, 2018
156be16
Minor change to changelog wording
sum01 Oct 23, 2018
c893814
Merge PR #38 from @scottbilas
sum01 Oct 23, 2018
5bddddc
Add changelog for PR #38
sum01 Oct 23, 2018
9f42507
Increment to v3.4.0
sum01 Oct 23, 2018
7614569
Clarify README
NicolaiSoeborg Dec 16, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# EditorConfig is awesome: http://EditorConfig.org

# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
charset = utf-8
end_of_line = lf
indent_style = tab
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true

# Ignore .md files, because 2 spaces at end-of-line has meaning
[*.md]
trim_trailing_whitespace = false
109 changes: 109 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [3.4.0] - 2018-10-22

### Fixed

- Issues with Lua's `io.popen` on some systems by using Micro's built-in `RunShellCommand` instead, [thanks to @scottbilas](https://github.com/NicolaiSoeborg/filemanager-plugin/pull/38)

### Added

- Adds the option `filemanager-openonstart` to allow auto-opening the file tree when Micro is started (default OFF)

### Changed

- Update README's option's documentation

## [3.3.1] - 2018-10-03

### Changed

- Performance improvement by removing unnecessary refresh of the opened file, [thanks to @jackwilsdon](https://github.com/NicolaiSoeborg/filemanager-plugin/pull/37)

## [3.3.0] - 2018-09-13

### Added

- The ability to sort folders above files, [thanks to @cbrown1](https://github.com/NicolaiSoeborg/filemanager-plugin/pull/33)

### Fixed

- The displayed filenames are now correctly only showing their "basename" on Windows

## [3.2.0] - 2018-02-15

### Added

- The ability to go to parent directory with left arrow (when not minimizing). Thanks @avently
- The ability to jump to the `..` as a "parent directory". Thanks @avently

## [3.1.2] - 2018-02-07

### Fixed

- The minimum Micro version, which was incorrectly set to v1.4.0. Ref [issue #28](https://github.com/NicolaiSoeborg/filemanager-plugin/issues/28)

## [3.1.1] - 2018-02-04

### Fixed

Ref https://github.com/zyedidia/micro/issues/992 for both of these fixes.

- The syntax parser not loading correctly (mostly block comments) on opened files. **Requires Micro >= v1.4.0**
- An errant tab being inserted into the newly opened file.

## [3.1.0] - 2018-01-30

### Added

- The ability to hide dotfiles using the `filemanager-showdotfiles` option.
- The ability to hide files ignored in your VCS (aka `.gitignore`'d) using the `filemanager-showignored` option. Only works with Git at the moment.
- This `CHANGELOG.md`

### Fixed

- A bug with the `rm` command that caused weird, undefined behaviour to contents within the same dir as the file/dir deleted.
- Issue [#24](https://github.com/NicolaiSoeborg/filemanager-plugin/issues/24)

## [3.0.0] - 2018-01-10

### Fixed

- Issues [#13](https://github.com/NicolaiSoeborg/filemanager-plugin/issues/13), [#14](https://github.com/NicolaiSoeborg/filemanager-plugin/issues/14), [#15](https://github.com/NicolaiSoeborg/filemanager-plugin/issues/15), [#19](https://github.com/NicolaiSoeborg/filemanager-plugin/issues/19), [#20](https://github.com/NicolaiSoeborg/filemanager-plugin/issues/20)
- The broken syntax highlighting

### Added

- Directory expansion/compression below itself for viewing more akin to a file tree.
- The `rm` command, which deletes the file/directory under the cursor.
- The `touch` command, which creates a file with the passed filename.
- The `mkdir` command, which creates a directory with the passed filename.
- An API, of sorts, for the user to rebind their keys to if they dislike the defaults.
- An [editorconfig](http://editorconfig.org/) file.

### Changed

- The view that it spawns in to read-only, which requires Micro version >= 1.3.5
- The functionality of some keybindings (when in the view) so they work safetly, or at all, with the plugin.
- From the `enter` key to `tab` for opening/going into files/dirs (a side-effect of using the read-only setting)

### Removed

- The ability to use a lot of keybindings that would otherwise mess with the view, and have no benifit.
- The pointless `.gitignore` file.

[unreleased]: https://github.com/NicolaiSoeborg/filemanager-plugin/compare/v3.4.0...HEAD
[3.4.0]: https://github.com/NicolaiSoeborg/filemanager-plugin/compare/v3.3.1...v3.4.0
[3.3.1]: https://github.com/NicolaiSoeborg/filemanager-plugin/compare/v3.3.0...v3.3.1
[3.3.0]: https://github.com/NicolaiSoeborg/filemanager-plugin/compare/v3.2.0...v3.3.0
[3.2.0]: https://github.com/NicolaiSoeborg/filemanager-plugin/compare/v3.1.2...v3.2.0
[3.1.2]: https://github.com/NicolaiSoeborg/filemanager-plugin/compare/v3.1.1...v3.1.2
[3.1.1]: https://github.com/NicolaiSoeborg/filemanager-plugin/compare/v3.1.0...v3.1.1
[3.1.0]: https://github.com/NicolaiSoeborg/filemanager-plugin/compare/v3.0.0...v3.1.0
[3.0.0]: https://github.com/NicolaiSoeborg/filemanager-plugin/compare/v2.1.1...v3.0.0
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2017 Nicolai Søborg

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
57 changes: 55 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,56 @@
# Filetree Plugin
# Filemanager Plugin

This is still a work in progress...
A simple plugin that allows for easy navigation of a file tree.

![Example picture](./example.jpg?raw=true "Example")

**Installation:** run `plugin install filemanager` and restart Micro.

## Basics

The top line always has the current directory's path to show you where you are.\
The `..` near the top is used to move back a directory, from your current position.

All directories have a `/` added to the end of it, and are syntax-highlighted as a `special` character.\
If the directory is expanded, there will be a `+` to the left of it. If it is collapsed there will be a `-` instead.

**NOTE:** If you change files without using the plugin, it can't know what you did. The only fix is to close and open the tree.

### Options

| Option | Purpose | Default |
| :--------------------------- | :----------------------------------------------------------- | :------ |
| `filemanager-showdotfiles` | Show dotfiles (hidden if false) | `true` |
| `filemanager-showignored` | Show gitignore'd files (hidden if false) | `true` |
| `filemanager-compressparent` | Collapse the parent dir when left is pressed on a child file | `true` |
| `filemanager-foldersfirst` | Sorts folders above any files | `true` |
| `filemanager-openonstart` | Automatically open the file tree when starting Micro | `false` |

### Commands and Keybindings

The keybindings below are the equivalent to Micro's defaults, and not actually set by the plugin. If you've changed any of those keybindings, then that key is used instead.

If you want to [keybind](https://github.com/zyedidia/micro/blob/master/runtime/help/keybindings.md#rebinding-keys) any of the operations/commands, bind to the labeled API in the table below.

| Command | Keybinding(s) | What it does | API for `bindings.json` |
| :------- | :------------------------- | :------------------------------------------------------------------------------------------ | :------------------------------------ |
| `tree` | - | Open/close the tree | `filemanager.toggle_tree` |
| - | <kbd>Tab</kbd> & MouseLeft | Open a file, or go into the directory. Goes back a dir if on `..` | `filemanager.try_open_at_cursor` |
| - | <kbd>→</kbd> | Expand directory in tree listing | `filemanager.uncompress_at_cursor` |
| - | <kbd>←</kbd> | Collapse directory listing | `filemanager.compress_at_cursor` |
| - | <kbd>Shift ⬆</kbd> | Go to the target's parent directory | `filemanager.goto_parent_dir` |
| - | <kbd>Alt Shift {</kbd> | Jump to the previous directory in the view | `filemanager.goto_next_dir` |
| - | <kbd>Alt Shift }</kbd> | Jump to the next directory in the view | `filemanager.goto_prev_dir` |
| `rm` | - | Prompt to delete the target file/directory your cursor is on | `filemanager.prompt_delete_at_cursor` |
| `rename` | - | Rename the file/directory your cursor is on, using the passed name | `filemanager.rename_at_cursor` |
| `touch` | - | Make a new file under/into the file/directory your cursor is on, using the passed name | `filemanager.new_file` |
| `mkdir` | - | Make a new directory under/into the file/directory your cursor is on, using the passed name | `filemanager.new_dir` |

#### Notes

- `rename`, `touch`, and `mkdir` require a name to be passed when calling.\
Example: `rename newnamehere`, `touch filenamehere`, `mkdir dirnamehere`.\
If the passed name already exists in the current dir, it will cancel instead of overwriting (for safety).

- The <kbd>Ctrl w</kbd> keybinding is to switch which buffer your cursor is on.\
This isn't specific to the plugin, it's just part of Micro, but many people seem to not know this.
Binary file added example.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading