mirror of
https://github.com/m00natic/vlfi.git
synced 2025-11-07 02:21:38 +00:00
Compare commits
39 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
290c4ac885 | ||
|
|
db1da304d5 | ||
|
|
655805ce48 | ||
|
|
bb482f0b0f | ||
|
|
9ffb968793 | ||
|
|
099adab959 | ||
|
|
65b4d7413f | ||
|
|
2e2bca6999 | ||
|
|
ea46386cbc | ||
|
|
d1af56d776 | ||
|
|
152462a654 | ||
|
|
9c50487982 | ||
|
|
88924f9c05 | ||
|
|
2aea17ab38 | ||
|
|
72fec35f44 | ||
|
|
a0cafa71ea | ||
|
|
c68c34ea90 | ||
|
|
c0a85cdcfe | ||
|
|
371c560f4b | ||
|
|
a3901b8f1a | ||
|
|
f4ee23c07f | ||
|
|
959bbc7661 | ||
|
|
0080991fa9 | ||
|
|
46e39a0fd8 | ||
|
|
51d95ec0a3 | ||
|
|
d6c722376c | ||
|
|
a42247cac4 | ||
|
|
3e8098af61 | ||
|
|
28646fbfee | ||
|
|
177c680288 | ||
|
|
2ac3e7d577 | ||
|
|
931ca52688 | ||
|
|
42e581da61 | ||
|
|
a65f3a431d | ||
|
|
f34986a9b8 | ||
|
|
452b7eb42d | ||
|
|
2dba838015 | ||
|
|
cb47e19128 | ||
|
|
efae918a83 |
101
README.org
101
README.org
@@ -1,8 +1,8 @@
|
||||
* View Large Files
|
||||
|
||||
An Emacs mode that allows viewing, editing and searching in large
|
||||
files in chunks. Batch size can be adjusted on the fly and bounds the
|
||||
memory that is to be used for operations on the file.
|
||||
Emacs minor mode that allows viewing, editing and searching 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 is development version of the GNU ELPA [[http://elpa.gnu.org/packages/vlf][vlf.el]] package. Here's
|
||||
what it does in a nutshell:
|
||||
@@ -17,6 +17,8 @@ what it does in a nutshell:
|
||||
- newly added content is acknowledged if file has changed size
|
||||
meanwhile
|
||||
- automatic scrolling of batches
|
||||
- as VLF is minor mode, font locking and functionality of the
|
||||
respective major mode is also present
|
||||
- VLF is added as an option when opening large files
|
||||
|
||||
GNU Emacs 23 and 24 are supported.
|
||||
@@ -41,64 +43,79 @@ integer value), VLF will probably not quite work.
|
||||
|
||||
*vlf-batch-size* bounds the memory used for all operations.
|
||||
|
||||
** Special mode
|
||||
|
||||
VLF is derived from special-mode and keeps all its properties. For
|
||||
example you can directly press digits to enter prefix arguments.
|
||||
|
||||
** Change major mode
|
||||
|
||||
You can change major mode to whatever you like (for example
|
||||
hexl-mode). Saving will insert contents as intended. You can return
|
||||
to *vlf-mode* too.
|
||||
|
||||
* Detail usage
|
||||
|
||||
** Applicability
|
||||
|
||||
You can control when vlf-mode is invoked or offered as choice with the
|
||||
*vlf-application* customization option. By default it will offer VLF
|
||||
when opening large files. There are also options to never use it (you
|
||||
can still call *vlf* command explicitly); to use it without asking for
|
||||
large files or to invoke it on all files. Here's example setup such
|
||||
that vlf-mode automatically launches for large files:
|
||||
|
||||
#+BEGIN_EXAMPLE
|
||||
(custom-set-variables
|
||||
'(vlf-application 'dont-ask))
|
||||
#+END_EXAMPLE
|
||||
|
||||
** Keymap
|
||||
|
||||
All VLF operations are grouped under the *C-c C-v* prefix by default.
|
||||
Here's example how to add another prefix (*C-x v*):
|
||||
|
||||
#+BEGIN_EXAMPLE
|
||||
(eval-after-load "vlf"
|
||||
'(define-key vlf-prefix-map "\C-xv" vlf-mode-map))
|
||||
#+END_EXAMPLE
|
||||
|
||||
** Control batch size
|
||||
|
||||
*+* and *-* control current batch size by factors of 2.
|
||||
*C-c C-v +* and *C-c C-v -* control current batch size by factors
|
||||
of 2.
|
||||
|
||||
You can also set by hand local variable *vlf-batch-size* and then
|
||||
refresh with *g*.
|
||||
refresh with *C-c C-v g*.
|
||||
|
||||
** Move around
|
||||
|
||||
*M-PgUp* and *M-PgDn* move chunk by chunk. With positive prefix
|
||||
argument they move prefix number of batches. With negative - append
|
||||
prefix number of batches.
|
||||
*C-c C-v n* and *C-c C-v p* move batch by batch. With positive
|
||||
prefix argument they move prefix number of batches. With negative -
|
||||
append prefix number of batches.
|
||||
|
||||
*[* and *]* take you to the beginning and end of file respectively.
|
||||
*C-c C-v SPC* displays batch starting from current point.
|
||||
|
||||
*j* jumps to given chunk. To see where you are in file and how many chunks
|
||||
there are (using the current batch size), look at the bracketed part
|
||||
of the buffer name, batch size is also there - at the end.
|
||||
*C-c C-v [* and *C-c C-v ]* take you to the beginning and end of file
|
||||
respectively.
|
||||
|
||||
*C-c C-v j* jumps to given chunk. To see where you are in file and
|
||||
how many chunks there are (using the current batch size), look at the
|
||||
parenthesized part of the buffer name, batch size is also indicated at
|
||||
the end.
|
||||
|
||||
** Search whole file
|
||||
|
||||
*s* and *r* search forward and backward respectively over the whole
|
||||
file. This is done chunk by chunk so if you have really huge file -
|
||||
you'd better set somewhat bigger batch size beforehand.
|
||||
*C-c C-v s* and *C-c C-v r* search forward and backward respectively
|
||||
over the whole file. This is done batch by batch so if you have
|
||||
really huge file - you'd better set somewhat bigger batch size
|
||||
beforehand.
|
||||
|
||||
** Occur over whole file
|
||||
|
||||
*o* builds index for given regular expression just like occur-mode.
|
||||
It does this chunk by chunk over the whole file. Note that even if
|
||||
you prematurely stop it with *C-g*, it will still show index of what's
|
||||
found so far.
|
||||
*C-c C-v o* builds index for given regular expression just like
|
||||
*M-x occur*. It does this batch by batch over the whole file. Note
|
||||
that even if you prematurely stop it with *C-g*, it will still show
|
||||
index of what's found so far.
|
||||
|
||||
** Jump to line
|
||||
|
||||
*l* jumps to given line in file. This is done by searching from the
|
||||
beginning, so again the bigger current batch size, the quicker. With
|
||||
negative argument, lines are counted from the end of file.
|
||||
*C-c C-v l* jumps to given line in file. This is done by searching
|
||||
from the beginning, so again the bigger current batch size, the
|
||||
quicker. With negative argument, lines are counted from the end of
|
||||
file.
|
||||
|
||||
** Edit
|
||||
** Edit and save
|
||||
|
||||
*e* enters VLF in edit mode. If editing doesn't change size of
|
||||
the chunk, only this chunk is saved. Otherwise the remaining part of
|
||||
the file is adjusted chunk by chunk, so again you'd better have bigger
|
||||
current batch size. If chunk has been expanded the memory used is
|
||||
|
||||
#+BEGIN_EXAMPLE
|
||||
(batch size + difference to the original chunk size) x 2
|
||||
#+END_EXAMPLE
|
||||
If editing doesn't change size of the chunk, only this chunk is saved.
|
||||
Otherwise the remaining part of the file is adjusted batch by batch,
|
||||
so again you'd better have bigger current batch size.
|
||||
|
||||
41
vlfi.el
41
vlfi.el
@@ -1,41 +0,0 @@
|
||||
;;; vlfi.el --- Obsolete - install vlf instead!
|
||||
|
||||
;; Copyright (C) 2006, 2012, 2013 Free Software Foundation, Inc.
|
||||
|
||||
;; Version: 0.9.1.1
|
||||
;; Keywords: large files, utilities
|
||||
;; Maintainer: Andrey Kotlarski <m00naticus@gmail.com>
|
||||
;; Authors: 2006 Mathias Dahl <mathias.dahl@gmail.com>
|
||||
;; 2012 Sam Steingold <sds@gnu.org>
|
||||
;; 2013 Andrey Kotlarski <m00naticus@gmail.com>
|
||||
;; URL: https://github.com/m00natic/vlfi
|
||||
|
||||
;; This file is free software; you can redistribute it and/or modify
|
||||
;; it under the terms of the GNU General Public License as published by
|
||||
;; the Free Software Foundation; either version 2, or (at your option)
|
||||
;; any later version.
|
||||
|
||||
;; This file is distributed in the hope that it will be useful,
|
||||
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
;; GNU General Public License for more details.
|
||||
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with GNU Emacs; see the file COPYING. If not, write to
|
||||
;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
;; Boston, MA 02111-1307, USA.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; This package used to provide the M-x vlfi command, which visited
|
||||
;; part of a large file without loading the entire file.
|
||||
;; However, it has been merged back to the vlf package,
|
||||
;; so use that instead.
|
||||
|
||||
;;; Code:
|
||||
|
||||
;;;###autoload
|
||||
(error
|
||||
"vlfi package has been merged with vlf: please install that instead")
|
||||
|
||||
;;; vlfi.el ends here
|
||||
Reference in New Issue
Block a user