mirror of
https://github.com/m00natic/vlfi.git
synced 2025-01-18 20:10:47 +00:00
Update README, wording, add links and information on hooks.
This commit is contained in:
parent
2c231dfb15
commit
6476c1be6a
68
README.org
68
README.org
@ -3,26 +3,29 @@
|
|||||||
Emacs minor mode that allows viewing, editing, searching and comparing
|
Emacs minor mode that allows viewing, editing, searching and comparing
|
||||||
large files in batches. Batch size can be adjusted on the fly and
|
large files in batches. Batch size can be adjusted on the fly and
|
||||||
bounds the memory that is to be used for operations on the file. This
|
bounds the memory that is to be used for operations on the file. This
|
||||||
way multiple large files can be instantly and simultaneously accessed
|
way multiple large files (like terabytes or whatever) can be instantly
|
||||||
without swapping and degraded performance.
|
and simultaneously accessed without swapping and degraded
|
||||||
|
performance.
|
||||||
|
|
||||||
This is development version of the GNU ELPA [[http://elpa.gnu.org/packages/vlf][vlf.el]] package. Here's
|
This is development version of the GNU ELPA [[http://elpa.gnu.org/packages/vlf][VLF]] package. Here's what
|
||||||
what it does in a nutshell:
|
it offers in a nutshell:
|
||||||
|
|
||||||
- regular expression search on whole file (in constant memory
|
- regular expression search on whole file (in constant memory
|
||||||
determined by current batch size)
|
determined by current batch size)
|
||||||
- chunk editing (if size has changed, saving is done in constant
|
- chunk editing (if size has changed, saving is done in constant
|
||||||
memory determined by current batch size)
|
memory determined by current batch size)
|
||||||
- occur like indexing
|
- [[http://www.emacswiki.org/emacs/OccurMode][Occur]] like indexing
|
||||||
- options to jump to beginning, end or arbitrary file chunk
|
- options to jump to beginning, end or arbitrary file chunk
|
||||||
- ability to jump/insert given number of batches at once
|
- ability to jump/insert given number of batches at once
|
||||||
- newly added content is acknowledged if file has changed size
|
- newly added content is acknowledged if file has changed size
|
||||||
meanwhile
|
meanwhile
|
||||||
- automatic scrolling of batches
|
- automatic scrolling of batches
|
||||||
- as VLF is minor mode, font locking and functionality of the
|
- as a minor mode, font locking and functionality of the respective
|
||||||
respective major mode is also present
|
major mode is also present
|
||||||
- by batch Ediff comparison
|
- by batch [[http://www.emacswiki.org/emacs/EdiffMode][Ediff]] comparison
|
||||||
- VLF is added as an option when opening large files
|
- can be added as option to automatically open large files
|
||||||
|
- smooth integration with [[http://www.emacswiki.org/emacs/HexlMode][hexl-mode]]
|
||||||
|
- works with [[http://www.emacswiki.org/emacs/TrampMode][TRAMP]] so accessing network files is fine
|
||||||
|
|
||||||
GNU Emacs 23 and 24 are supported.
|
GNU Emacs 23 and 24 are supported.
|
||||||
|
|
||||||
@ -34,12 +37,12 @@ M-x vlf PATH-TO-FILE
|
|||||||
|
|
||||||
Emacs' Unicode support is leveraged so you'll not see bare bytes but
|
Emacs' Unicode support is leveraged so you'll not see bare bytes but
|
||||||
characters decoded as if file is normally opened. This holds for
|
characters decoded as if file is normally opened. This holds for
|
||||||
editing, search and indexing.
|
editing, search, indexing and comparison.
|
||||||
|
|
||||||
** 32-bit GNU Emacs
|
** 32-bit GNU Emacs
|
||||||
|
|
||||||
Regular Emacs integers are used, so if you use 32-bit Emacs without
|
Regular Emacs integers are used, so if you use 32-bit Emacs without
|
||||||
bignum support, VLF will not work with files over 512 MB (maximum
|
bignum support, *VLF* will not work with files over 512 MB (maximum
|
||||||
integer value).
|
integer value).
|
||||||
|
|
||||||
** Memory control
|
** Memory control
|
||||||
@ -56,12 +59,12 @@ To have *vlf* offered as choice when opening large files:
|
|||||||
(require 'vlf-integrate)
|
(require 'vlf-integrate)
|
||||||
#+END_EXAMPLE
|
#+END_EXAMPLE
|
||||||
|
|
||||||
You can control when vlf-mode is invoked or offered with the
|
You can control when *vlf-mode* is invoked or offered with the
|
||||||
*vlf-application* customization option. By default it will offer VLF
|
*vlf-application* customization option. By default it will offer
|
||||||
when opening large files. There are also options to never use it (you
|
*VLF* when opening large files. There are also options to never use
|
||||||
can still call *vlf* command explicitly); to use it without asking for
|
it (you can still call *vlf* command explicitly); to use it without
|
||||||
large files or to invoke it on all files. Here's example setup such
|
asking for large files or to invoke it on all files. Here's example
|
||||||
that vlf-mode automatically launches for large files:
|
setup such that *vlf-mode* automatically launches for large files:
|
||||||
|
|
||||||
#+BEGIN_EXAMPLE
|
#+BEGIN_EXAMPLE
|
||||||
(custom-set-variables
|
(custom-set-variables
|
||||||
@ -70,12 +73,12 @@ that vlf-mode automatically launches for large files:
|
|||||||
|
|
||||||
*** Disable for specific mode
|
*** Disable for specific mode
|
||||||
|
|
||||||
To disable automatic usage of VLF for a major mode, add it to
|
To disable automatic usage of *VLF* for a major mode, add it to
|
||||||
*vlf-forbidden-modes-list*.
|
*vlf-forbidden-modes-list*.
|
||||||
|
|
||||||
*** Disable for specific function
|
*** Disable for specific function
|
||||||
|
|
||||||
To disable automatic usage of VLF for a function, for example named
|
To disable automatic usage of *VLF* for a function, for example named
|
||||||
*func* defined in file *file.el*:
|
*func* defined in file *file.el*:
|
||||||
|
|
||||||
#+BEGIN_EXAMPLE
|
#+BEGIN_EXAMPLE
|
||||||
@ -84,8 +87,8 @@ To disable automatic usage of VLF for a function, for example named
|
|||||||
|
|
||||||
** Keymap
|
** Keymap
|
||||||
|
|
||||||
All VLF operations are grouped under the *C-c C-v* prefix by default.
|
All *VLF* operations are grouped under the *C-c C-v* prefix by
|
||||||
Here's example how to add another prefix (*C-x v*):
|
default. Here's example how to add another prefix (*C-x v*):
|
||||||
|
|
||||||
#+BEGIN_EXAMPLE
|
#+BEGIN_EXAMPLE
|
||||||
(eval-after-load "vlf"
|
(eval-after-load "vlf"
|
||||||
@ -133,10 +136,10 @@ beforehand.
|
|||||||
|
|
||||||
** Occur over whole file
|
** Occur over whole file
|
||||||
|
|
||||||
*C-c C-v o* builds index for given regular expression just like
|
*C-c C-v o* builds index for given regular expression just like M-x
|
||||||
*M-x occur*. It does this batch by batch over the whole file. Note
|
occur*. It does so batch by batch over the whole file. Note that
|
||||||
that even if you prematurely stop it with *C-g*, it will still show
|
even if you prematurely stop it with *C-g*, it will still show index
|
||||||
index of what's found so far.
|
of what's found so far.
|
||||||
|
|
||||||
** Jump to line
|
** Jump to line
|
||||||
|
|
||||||
@ -159,3 +162,18 @@ or taken from the first buffer in case of buffers). Moving after the
|
|||||||
last difference in current chunk searches for following one with
|
last difference in current chunk searches for following one with
|
||||||
difference. The other way around if looking for difference before the
|
difference. The other way around if looking for difference before the
|
||||||
first one.
|
first one.
|
||||||
|
|
||||||
|
* Extending
|
||||||
|
|
||||||
|
** Move hooks
|
||||||
|
|
||||||
|
A couple of hooks are run whenever updating chunk:
|
||||||
|
*vlf-before-chunk-update* and *vlf-after-chunk-update*.
|
||||||
|
|
||||||
|
** Batch move hooks
|
||||||
|
|
||||||
|
Some operations may trigger multiple chunk moves. There are a couple
|
||||||
|
of hooks that run in such cases: *vlf-before-batch-functions* and
|
||||||
|
*vlf-after-batch-functions*. They are passed one argument that
|
||||||
|
specifies type of operation that runs. Possible values are the
|
||||||
|
symbols: *write*, *ediff*, *occur*, *search* and *goto-line*.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user