Comments (31)
Yes, I should work on including those, maybe through readline modes, for both vi and emacs styles.
from broot.
+1 for vi keybindings. Would also be nice to just be able to set custom keys in general :)
from broot.
[[verbs]]
name = "line_down"
key = "ctrl-n"
execution = ":line_down"
[[verbs]]
name = "line_up"
key = "ctrl-p"
execution = ":line_up"
I added my own ctrl-p
and ctrl-n
by adding custom verbs that just call built-in verbs.
from broot.
+1 for "hjkl" keybinds for navigation
from broot.
Broot 1.5.0 just released
from broot.
I would just use "/" to search or filter like in vim or vifm.
I would love to replace vifm with broot. Seems like this is more light weight.
Edit: after playing with broot for a little while I see that you are meant to use fuzzy find to navigate rather that navigation keys. It's a great app. I need to play with it a bit longer to see if I can replace my file manager.
from broot.
This might help other users. Maybe we'll include it in the documentation.
from broot.
invocation was needed previously but isn't in recent versions of broot.
from broot.
There's currently no internal you could use to clear the input. I'll add one.
from broot.
+1 for "hjkl" keybinds for navigation
and how would you deal with search ? Right now those keys would filter the tree.
from broot.
make sure you dont hard-set those bindings, as not everyone is using qwerty.
from broot.
+1 for "hjkl" keybinds for navigation
and how would you deal with search ? Right now those keys would filter the tree.
Good option to use Ctrl + hjkl like in fzf. When Ctrl is bind to Caps Lock key it's super convenient.
from broot.
@anuvyklack you can already bind ctrl + hjkl to navigation functions in broot. See https://dystroy.org/broot/documentation/configuration/#keyboard-key
from broot.
@Canop I've tried but it doesn't work. It seems like a bug. `alt + hjkl' works perfect. But it's not convenient everywhere use ctrl and in broot use alt.
Is it really a bug? Need I open an issue?
from broot.
I just tried and noticed that ctrl-j seems to be one of those key combinations that my terminals intercepts.
That's the biggest problem usually: when the terminal already handles the chars, it's hard to do anything.
You can open an issue, with the exact configuration you tested which didn't work.
from broot.
@fnune just to be clear: does this configuration works for you ?
from broot.
Indeed it does! I could add keybindings for everything this way, I think.
from broot.
I think my "name" attribute is superfluous there and key + execution should suffice. But you probably know better :)
from broot.
What could be a "planned" way ? A part of the config to uncomment maybe ? I don't want to have users opt-in for some key bindings in a whole and not being able to change them.
from broot.
I deleted the previous comment because I thought a bit more about it: I think the current options are totally fine.
from broot.
Hmm, @fnune adding your config, broot complains:
Invalid [[verbs]] entry in configuration
Missing invocation
Invalid [[verbs]] entry in configuration
Missing invocation
from broot.
Just wanted to mention that I tried broot, and really liked it, but the first thing I wanted to do as a long-time Emacs user was use Control-N and Control-P to move down/up.
The next thing I expected (I do not know why?) was being able to compose a command line by pressing Command/Control/Alt-Enter and having the currently selected file/directory name copied to the end of a command line. I guess that's because I am old enough to have Norton Commander in my finger memory.
from broot.
@jwr It's not clear if you noticed, but ctrl-n / ctrl-p is easy (see up if necessary).
Regarding the second part, I'm not sure I follow you (I don't remember Norton Commander well enough, I guess it's Alzheimer). Are you after the :print_path verb and mapping it to the desired key shortcut (https://dystroy.org/broot/documentation/configuration/#verbs-shortcuts-and-keys) ?
from broot.
@Canop I thought the setup above didn't work based on the comments. Now I wanted to try it, but I am ashamed to admit I can't figure out where the configuration file is supposed to live (Mac OS). I looked at https://dystroy.org/broot/documentation/configuration/#opening-the-configuration-file but it only mentions "conf.toml" and says the location is OS-dependent. The method with typing :os from help doesn't seem to work for me (verb not found "os" and when trying :open_stay nothing happens — am I supposed to enter the name of the file now?).
Also, I think this is only a partial solution — this doesn't let me use Ctrl-A/Ctrl-E as Home/End in the command line, or press Ctrl-K to kill from cursor to the end of the line.
As for :print_path, no, this is not quite what I meant. In Norton Commander you could start typing a command line (say type "mv", and use Ctrl-ENTER to append selected file or directory names one by one, so you would build up "mv file1.txt file2.txt some_dir" and then execute it with ENTER once you were ready). I realize broot has a different UI concept, but this could be something to think about.
from broot.
@jwr when you type ?, you're normally shown the help screen, which displays the path to the config file.
Regarding the other shortcuts, like the ones to navigate into the input, I have no objections against adding a few other verbs even if rarely used but please make sure you've read the documentation on https://dystroy.org/broot/documentation/usage/ and https://dystroy.org/broot/documentation/configuration/ )
Last point understood, thanks.
from broot.
@Canop Thanks, now I can see the config file path, my terminal colors made it difficult to see. I also feel silly for not seeing it earlier.
I will do my best to configure the Emacs keybindings and come back with suggestions of things that might be added.
from broot.
Hmm, @fnune adding your config, broot complains:
Invalid [[verbs]] entry in configuration Missing invocation Invalid [[verbs]] entry in configuration Missing invocation
@gubikmic It worked for me. Maybe it's referring to a missing invocation
attribute like it appears on other verbs:
[[verbs]]
name = "view"
invocation = "view"
execution = "$PAGER {file}"
Maybe you can try adding that?
from broot.
@Canop it's taken a few brushes but I'm starting to find myself incorporating broot into my workflow. It's a pleasure to use when I have the impetus to do so, thank you for developing it.
I came across this issue looking for the exact same keybindings as the original poster: c-w
and c-u
. I was able to map ctrl-w
to :input_del_word_left
. The documentation doesn't seem to indicate any input verb to clear the input. I tried to map ctrl-u
to :back
, noticing only that Esc
was default mapped to :back
, but having used that and it having not done as I expected, it seems as though Esc
performs :back
and the additional function of clearing the line. I'm a total amateur broot user so I might be misunderstanding something. Just wondering if there's a way to get the ctrl-u
functionality so I can bring my muscle memory 😁
from broot.
That would be great, I'd really appreciate that. No rush, no pressure, take it easy. Thank you again!
from broot.
I've added the :input_clear
internal which may be mapped this way:
{
key: ctrl-u
internal: ":input_clear"
}
It will be officially available in 1.5.0 which should be released in a few hours
from broot.
That's amazing, thank you for your super-quick response. Now to get it in my env.. 😁. Thanks again.
from broot.
Related Issues (20)
- Username with one or more spaces causes an error HOT 3
- R file type is not mapped
- ArchLinux's AUR fails to build broot HOT 4
- ANSI codes inserted into the prompt after starting broot (causing "No matching verb") HOT 15
- Add features for Trash management HOT 1
- Request: Verb: Toggle descending/following all symlinks HOT 4
- Allow configuring how double click opens files HOT 2
- How do I move around locations? HOT 2
- Slow at /proc HOT 4
- Color scheme produces unexpected output since 1.33.0
- Does not compile on Termux (Android) any more HOT 2
- Wrong light colorscheme in zellij HOT 7
- broot fail to recognize `suid` and `sgid` bits when showing permission HOT 2
- Option to always open editor relative to directory where i start `broot` HOT 6
- Arrow between path and git branch misaligned HOT 2
- Could not edit file in Kakoune by specifying client and server HOT 3
- showing long pathnames on multiple lines
- Is there a way to prevent right arrow from opening file in external editor? HOT 1
- Run shell commands like tar and zip directly through broot terminal UI.
- Multiple arguments to custom verbs. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from broot.