Comments (3)
@dumblob Currently each client have it's own index and position for each directory they visit. If I understand you correctly, what you're suggesting implies merging these into one or otherwise it wouldn't be possible to determine something for the new clients. I'm not sure if this is always desirable and also if it's possible at all. For instance, what will happen if two clients are on the same directory and one of them moves up or down. Shall the other one move with the other then? Or when two clients have the same ancestor a few levels up in the directory hierarchy which by the way is always the case if you consider the root directory. What will be the common index/position then? Even in vim you can display the same file with different cursor positions in multiple windows although semantics of a text editor is not very comparable to a file manager. Also note that vim/nvim does not have proper server/client architecture and a file is expected to be opened only by a single client.
May I suggest trying to spawn a shell from inside lf
(e.g. $bash
) and then drop back to lf
with a shell exit
command (e.g. <C-d>
) if you're alternating frequently. This way you will have the same selected file when you get back to lf
.
from lf.
If I understand you correctly,...
Fortunately not ;)
First, the idea is to leave the functionality as it is right now with regards to the path index. The only difference (but technically a substantial one) is, that the indexes will not be stored in clients, but on the server. Each index record will have a monotonic time stamp. Now comes the news. Namely, newly connected clients won't start with an empty index, but rather with an index made up by copy-merging all the existing indexes on server (if there is an ambiguity, the index record with newer time stamp wins). Additionally to not make already running clients miss out on something, there will be new command swaphistoryformergedone
(of course should be shorter 😉), which can any running client run at any time and which will instruct the server to create a new empty index, copy-merge all the existing indexes to this one (with record time resolution as described above) and exchange the old index of the requesting client with this newly created copy-merged one.
Hope this clarifies the intention a bit.
May I suggest trying to spawn a shell from inside
lf
(e.g.$bash
) and then drop back tolf
with a shellexit
command (e.g.<C-d>
) if you're alternating frequently. This way you will have the same selected file when you get back tolf
.
This will cover just about 20% of my use cases, where the history synchronization as described above will be used.
from lf.
I'm reading this again and some of the things are not clear to me, specifically the case where there are multiple clients with different indexes on the same directory. Also the intention here does not seem to justify the additional complexity introduced. With the new select
command, it may still be possible to implement this feature using shell commands on launch and exit. I am closing this issue since there is no active effort to implement this. Feel free to add comments if a new idea comes up.
from lf.
Related Issues (20)
- Mouse buttons don't work
- Preview window colors HOT 14
- Yank path w/filename, filename, and file (As in Ranger) in Powershell HOT 6
- [QUESTION] Paste with overwrite for multiple files HOT 5
- Main Column Line Numbers Only HOT 8
- Outdated file information for recreated directories HOT 9
- directories have another font type HOT 2
- Feature request: highlighting of cursors when inactive HOT 3
- Feature request: add an lfrc switch to move duplicate copy suffixes at the beginning of filename. HOT 4
- `autoquit` should be enabled by default HOT 6
- how to use fribidi within lf.
- sixel preview writes out of bounds
- Broken characters of dir when I use `-print-last-dir` option / change drive option `/d` in `lfcd.cmd` HOT 3
- Issue with scrolling using alt key HOT 6
- Feature request: precalculate previews for files around the cursor HOT 3
- lf does not open terminal text editor when going right HOT 4
- Multishell/Crossplatform handling of `--` HOT 3
- how to use `lf -remote` in cmd? HOT 3
- Downdir command? HOT 2
- Is there a way to select a directory for --print-selection and --selection-path? HOT 3
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 lf.