Commit Graph

161 Commits

Author SHA1 Message Date
gotroyb127
41e0bb32cd
fix tilde expansion and numbering (#373)
* Fixed issue #346 and changed the format of numbers when both relativenumber and number are set.

* Fixed issue #349 (incorrect replacement of '~' with user's home direcotry).

* Changed where appropriate so that tilde replacements happens correctly.

* Added a function to replace tilde with user's home directory, only when it should.

* Renamed ReplaceTilde to replaceTilde so that it won't get exported and removed some ';' at the end of some lines.
2020-06-07 20:53:25 +03:00
Gokcehan
d5f989f373 show progress for delete operation
Related #238
2019-12-02 19:50:13 +03:00
Juris Arturs Majors
f76bf30f65 Asynchronous delete (#238)
* Asynchronous deletion, similar to moving

* Reversed some sloppy new lines from previous commit

* Move delete operations to delete.go

* Simplify to use RemoveAll before

* Send errors directly to ui.exprChan directly
2019-12-02 14:27:58 +03:00
Kennedy Mwenja
9991a40e87 Sort by file extensions (#230)
- preserve natural ordering of filenames if extensions are the same
  or are missing
- files without extensions rank higher on ascending sort and lower
  on descending sort
2019-10-04 21:44:52 +03:00
Kennedy Mwenja
9515bd73d0 Sort By Access Time and Change Time (#226)
- Add access time and change time as sort by types. This is
  powered by github.com/djherbis/times.
- Fall back to modification time if access time and change time
  cannot be determined.
- Add `sa` and `sc` as default bindings for sort by access time and
  sort by change time respectively.
- Add access time and change time to info types allowing them to be
  displayed by the file list in the ui
2019-09-18 21:52:30 +03:00
Daniel Martí
50ac367626 fix ineffective breaks, remove unused parameters (#210)
While at it, simplify a few pieces of code.
2019-08-12 14:52:27 +03:00
Gokcehan
9f661344ed allow defining a custom rename command 2019-07-21 20:40:57 +03:00
Juris Arturs Majors
bfd01e5ed8 draft rename (#197)
*  basic structure

* working rename, without making dir's and selection change

* mkdirAll if necessary

* updated TODO's

* rename with replace prompting

* path prompt and moved functionality to nav.rename()

* renewing now (no set period is needed)

* documentation, keybidning change, load file info after renaming

* go generate
2019-07-20 19:31:19 +03:00
Juris Arturs Majors
27861f06e2 correct message for folders that lf has no permission for (#203) 2019-07-20 15:44:20 +03:00
Juris Arturs Majors
16db95707e Mark clear (#190)
* markclear

* Revert "markclear"

This reverts commit 5e3a188618cb02f7aa284e9f2c9a00ed8ce3dc14.

* Revert "Revert "markclear""

This reverts commit a7a3bfebbf99c10b4a09f197fa997eca461369c4.

* markclear with arguments

* docs

* reverted some whitepsace

* some inline comments

* additional error handling

* wrong argument case

* consider case when argument specified clears all marks

* code cleanup and removed readMarks from writeMarks

* indentation :/

* discussed changes implemnted

* return readMarks error in sync()

* remove reset marks
2019-06-25 21:38:34 +03:00
Juris Arturs Majors
bf39c7c63b glob-select implementation (#184)
* glob-select logical implementation

* documentation

* indentation

* indentation

* indentation

* save

* merge glob selects

* check if selected before toggling

* glob-unselect

* identation ...

* return early
2019-06-20 18:17:47 +03:00
Gokcehan
4c6241ca42 clean path before select
Related #167
2019-05-18 18:21:16 +03:00
Gokcehan
8388b4f385 Revert "do not cd when select on directory"
This reverts commit f071a3ae70.

Related #167
2019-05-18 18:20:58 +03:00
Gokcehan
f071a3ae70 do not cd when select on directory
Related #167
2019-05-17 21:48:19 +03:00
David Pedersen
e815adc6a6 Add Wrap Scroll functionality. Fixes #126 (#166) 2019-05-12 17:21:45 +03:00
Gokcehan
2c87b0dcfe fix hidden sort 2019-03-31 23:52:39 +03:00
Gokcehan
b2b22fb674 disable hidden on windows 2019-03-31 23:39:41 +03:00
Gokcehan
808404978e show move progress in the ruler 2019-03-01 17:44:50 +03:00
Gokcehan
f44ec4f5bd use reverse attribute for preview messages 2019-03-01 03:51:14 +03:00
Gokcehan
4d2a628550 log copy and move errors 2019-02-28 22:04:57 +03:00
Gokcehan
193285a65d add 'echomsg' and 'echoerr' commands for logging 2019-02-28 21:58:14 +03:00
Gokcehan
6ec2924b6b show copy progress in the ruler 2019-02-28 21:04:38 +03:00
Gokcehan
599ac11f26 cleanup 2019-02-26 21:27:04 +03:00
Gokcehan
728c5fbb2c check if src and dst are the same file before move 2019-02-26 21:25:34 +03:00
Gokcehan
0f47c5428b load directories after copy/move 2019-02-26 21:04:51 +03:00
Gokcehan
4865ce9b00 implement builtin move operation
Related #61 and #113
2019-02-26 20:32:30 +03:00
Gokcehan
d6e9aece51 implement builtin copy operation
Related #61 and #113
2019-02-26 20:12:13 +03:00
Gokcehan
db8f535b61 cleanup 2019-02-07 00:36:15 +03:00
Gokcehan
bd889a9e06 make 'delete' command prompting
Related #113
2019-02-06 15:56:41 +03:00
Kallinteris Andreas
7e3f92f049 added ':delete' builtin command (#121)
* added ':delete' command

* fixed doc

* fixed typo

* added dummy function for delete for windows

* detacted the functionality from the OS

* now deletion works based on selections

* added effective selection

* delete no longer sends 'send sync'

* fixed typo

* fixed typo

* added DOC to effective selection

* added DOC to deleteFiles()

* fixed DOC typos

* added ability to overwrite :delete

* added ability to overwrite :delete
2018-12-29 20:14:20 +03:00
martinlebeda
c693b7eae4 add ignoredia and smartdia option for search and find without diacritics (#118) 2018-12-03 15:41:53 +03:00
Gokcehan
4ee6488a09 add 'incsearch' option for incremental searching
Related #68
2018-11-24 19:02:04 +03:00
Gokcehan
4ba3c3cda9 keep reverse direction in find and search 2018-08-23 01:55:50 +03:00
Gokcehan
4420e41c76 add 'anchorfind' option to control find start
Related #68
2018-08-23 01:37:07 +03:00
Gokcehan
a59a5aa712 use zero value in findlen for arbitrary length
Related #68
2018-08-23 01:29:59 +03:00
Gokcehan
011cca76d1 add find commands to find as you type
Related #68
2018-08-22 20:05:22 +03:00
Gokcehan
d3f9a3588f handle non-existent directories during reload 2018-07-30 20:56:57 +03:00
Gokcehan
a0935fabcb handle removed directories during load 2018-07-30 18:41:14 +03:00
Gokcehan
211bcd0444 write marks to marks file on quit
Related #76
2018-07-11 20:09:26 +03:00
Gokcehan
0d0f7451ac add 'mark-save' and 'mark-load' commands for marks
Related #76
2018-07-09 21:35:04 +03:00
Gokcehan
a80900f41e rename mark to selection 2018-07-09 21:22:10 +03:00
Gokcehan
d987c9e439 rename yank-delete-put to copy-cut-paste 2018-06-27 21:17:56 +03:00
Gokcehan
e025c68130 keep cache when navigation is renewed 2018-06-08 21:47:28 +03:00
Gokcehan
7acc85f81c reload modified files when loading cache
Related #92
2018-06-07 22:49:53 +03:00
Gokcehan
4846a74320 reload modified directories when loading cache
Related #92
2018-06-07 22:19:55 +03:00
Gokcehan
a85e0da9b0 cleanup 2018-05-20 20:30:41 +03:00
Gokcehan
ed8137a79c rename 'bot' to 'bottom' 2018-05-16 00:20:05 +03:00
Gokcehan
3b043752a4 sort cached directories asynchronously 2018-04-20 21:28:56 +03:00
Gokcehan
a0e1d4d59a sort cached directories while loading 2018-04-18 23:08:28 +03:00
Gokcehan
d608eb4a56 handle resize events properly 2018-04-15 18:18:39 +03:00
Gokcehan
4f05975e77 add builtin 'select' command to change selection 2018-03-27 20:47:17 +03:00
Gokcehan
6e869bfa0e cleanup 2018-03-22 17:54:24 +03:00
Gokcehan
7b1236f57a keep current position on reload
Related #92
2018-03-22 17:47:36 +03:00
Gokcehan
55ef28b4c7 cache file previews in memory
Related #5 and #92
2018-02-10 18:59:19 +03:00
Gokcehan
f6cce2d40c rename renew to reload and bind to control-r
Mentioned in #92.
2018-01-29 18:08:51 +03:00
Gokcehan
59b2001253 renew directories asynchronously
Mentioned in #92.
2018-01-27 00:28:07 +03:00
Gokcehan
158b1b401b cleanup 2018-01-11 19:40:54 +03:00
Gokcehan
6774ff0b81 keep current directory hierarchy in cache on renew
Mentioned in #92.
2018-01-11 19:37:33 +03:00
Gokcehan
2b4c0f913b load directories asynchronously
Mentioned in #92.
2018-01-11 19:25:48 +03:00
Gokcehan
dd7b3f95c7 clear dir cache with renew
Mentioned in #92.
2017-12-25 15:19:42 +03:00
Gokcehan
2c63096d3b avoid renew when hidden option is changed
Mentioned in #92.
2017-11-30 23:11:37 +03:00
Gokcehan
ce508d7ed3 add unmark command to unmark all selections
Mentioned in #79.
2017-11-25 16:15:04 +03:00
Gokcehan
9b7bf63096 cleanup 2017-11-19 21:55:13 +03:00
Gokcehan
9ac32fc850 cache directory contents in memory
Mentioned in #92.
2017-11-19 01:25:41 +03:00
Gokcehan
accb61dad1 eliminate redundant renews for sort changes
Mentioned in #92.
2017-11-18 22:06:30 +03:00
Gokcehan
fed8d73ffe move server file clearing to builtin 'put' command
If a user defines an asynchronous 'put' command it will fetch an empty
list from the server since server file list is immediately cleared after
every 'put' command. Now that we move the clearing to the builtin 'put'
command, users need to explicitly clear server file list in their custom
'put' commands if they like.
2017-10-26 21:16:24 +03:00
Gokcehan
cb577a4c3a handle user variables on all platforms 2017-08-06 11:05:46 +03:00
Gokcehan
bc99bf1919 cleanup 2017-08-05 19:25:28 +03:00
Gokcehan
458bc71688 use conditional compilation for windows 2017-08-05 19:23:55 +03:00
Gokcehan
d7fca734c8 use robocopy for copying and moving on windows
Mentioned in #12.
2017-07-25 19:37:16 +03:00
Gokcehan
cb072eba12 add smartcase option for smart case sensitive search
Mentioned in #69.
2017-07-15 17:46:22 +03:00
Gokcehan
ca7a3ccab4 add ignorecase option for case insensitive search
Mentioned in #69.
2017-07-15 17:18:37 +03:00
Gokcehan
9e69ce94ca add globsearch option for wildcard searching
Mentioned in #69.
2017-07-15 17:06:18 +03:00
Karol Woźniak
fe05105c88 Implement directory count info (#85) 2017-06-03 14:12:43 +03:00
Karol Woźniak
79728a93da Properly close file handle in readdir (#74) 2017-04-09 16:15:06 +03:00
Gokcehan
8bc975a858 add wrapscan option for cyclic search
Mentioned in #57.
2017-03-16 16:22:42 +03:00
Gokcehan
87825fb2ad cleanup 2017-02-11 16:34:18 +03:00
Gokcehan
8689d712a3 make search cyclic
Mentioned in #57.
2017-01-07 17:42:33 +03:00
Olivier Perret
a704248696 preserve mark order in f[sx] variables (#59)
* preserve mark order in f[sx] variables

* Revert "preserve mark order in f[sx] variables"

This reverts commit e02c5e8bb3ec58f7cefafc92419f14c51e6730ef.

* preserve mark order in f[sx], but more efficiently
credit to @gokcehan for the idea
2017-01-06 00:23:22 +03:00
Karol Woźniak
8be854d3ba Add reverse option (#55) 2016-12-26 23:49:18 +03:00
Olivier Perret
79b874e147 include first item in reverse search (#54) 2016-12-26 23:47:27 +03:00
Gokcehan
f7e778591a implement search/search-back and search-next/prev
Closes #38.
2016-12-24 15:57:57 +03:00
Gokcehan
a717c31ca1 cleanup 2016-12-18 21:34:41 +03:00
Gokcehan
e532db082f use lowercase initials for type names 2016-12-18 00:47:37 +03:00
Gokcehan
8ae5f838c7 simplify number extraction using regexp 2016-12-18 00:02:30 +03:00
Gokcehan
721a20269e add natural sorting as a sortby option
Closes #21.
2016-12-03 00:45:04 +03:00
Gokcehan
609c637e82 move file sorting to nav 2016-11-11 00:18:56 +03:00
Gokcehan
c6560ad607 fix less function for name sorting
Mentioned in #43.
2016-11-11 00:08:35 +03:00
Gokcehan
3b5759efba sync with server on startup
Mentioned in #13 and #36.
2016-11-10 23:43:54 +03:00
Karol Woźniak
a4c395a4de Refactor sorting types to only implement Len and Swap once (#43)
Using "trick" similar to `sort.Slice` that's comming in `go1.8`.
2016-11-10 01:01:30 +03:00
Gokcehan
724422efa3 keep a copy of saved files and show in the ui
Mentioned in #13 and #36.
2016-11-07 23:32:19 +03:00
Gokcehan
23f89f7c7f use single line strings for file list save and load 2016-11-06 21:32:14 +03:00
Gokcehan
ec4cb78535 rename paste command to put 2016-11-06 18:09:18 +03:00
Karol Woźniak
c9b4389c65 Refactor Nav API around symlinks handling (mostly) (#33)
* gofmt ui.go

* Refactor Nav API around symlinks handling (mostly)

1. Get both `Lstat` and `Stat` while reading the files. Stat info is
   used by default, but we still can tell it's a link if needed.
2. Remove all other `Stat` calls from different places.
3. Handle hidden files while reading.
4. `currFile` now returns error if there are no files.
5. `currEmpty` and `currPath` not longer necessary, removed.
6. `open` now returns a named error ErrNotDir, where expected.

7. Side effect: Links that point at directories are now sorted among
   "actual" directories.
2016-10-24 22:18:31 +03:00
Ivan Menshykov
2345e16794 Dirfirst option and numerical sorting (#27)
* Create option dirfirst, and add numerical sorting

* Add only dirfirst option
2016-10-18 23:17:27 +03:00
Olivier Perret
69ff83a4b0 add command to invert marks in current directory 2016-10-09 18:19:32 +02:00
Gokcehan
1683cdfd47 check if the directory is empty before nav operations
Mentioned in #23.
2016-10-05 18:26:55 +03:00
Gokcehan
7a851f6c72 cleanup 2016-10-02 01:19:30 +03:00
Gokcehan
d66eb7349d clean path before changing directory 2016-10-02 00:39:03 +03:00
Gokcehan
57bebef804 use recursive and backup options for paste 2016-09-13 22:56:03 +03:00