*ku-file.txt*   ku source: file

Version 0.1.4
Copyright (C) 2008-2009 kana <http://whileimautomaton.net/>
License: MIT license  {{{
    Permission is hereby granted, free of charge, to any person obtaining
    a copy of this software and associated documentation files (the
    "Software"), to deal in the Software without restriction, including
    without limitation the rights to use, copy, modify, merge, publish,
    distribute, sublicense, and/or sell copies of the Software, and to
    permit persons to whom the Software is furnished to do so, subject to
    the following conditions:

    The above copyright notice and this permission notice shall be included
    in all copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
    OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
}}}

CONTENTS                                        *ku-file-contents*

Introduction            |ku-file-introduction|
Action Table            |ku-file-action-table|
Key Table               |ku-file-key-table|
Archives                |ku-file-archives|
Bugs                    |ku-file-bugs|
Changelog               |ku-file-changelog|




==============================================================================
INTRODUCTION                                    *ku-file-introduction*

*ku-file* is a source for |ku| to deal with files and directories.  You can
choose one from many files, directories and contents in archive files, then
take an action on it.


Requirements:
- Vim 7.1.299 or later
- |ku| 0.2.2 or later (vimscript#2337)
- |pi_zip.txt|: Zip archive explorer v17 or later (standard plugins)

Latest version:
http://github.com/kana/config/commits/vim-ku-source-file

Document in HTML format:
http://kana.github.com/config/vim/ku-file.html




==============================================================================
ACTION TABLE                                    *ku-file-action-table*

default                                         *ku-file-aciton-default*
                        Same as "open".

open                                            *ku-file-aciton-open*
                        Open the file or directory specified by the selected
                        item in the current window, regardless of whether the
                        selected item is completed one or not.

open!                                           *ku-file-aciton-open!*
                        Like "open", but use :edit! to open the selected item.


ACTIONS FOR ITEMS IN ARCHIVES          *ku-file-actions-for-items-in-archives*
ACTIONS FOR ARCHIVE ITEMS                  *ku-file-actions-for-archive-items*

extract-asis                                    *ku-file-aciton-extract-asis*
                        Extract the archive or the specified item in the
                        archive with the same directory structure in the
                        archive.

extract-smartly                               *ku-file-aciton-extract-smartly*
                        Like "extract-asis", but extract the archive or the
                        specified item in the archive in a directory which
                        name is the same as the basename of the archive if the
                        archive doesn't contain such directory.

extract-solely                                 *ku-file-aciton-extract-solely*
                        Like "extract-asis", but extract the specified item in
                        the archive without any directory structure in the
                        archive.  This action is not available for items which
                        are archive.

Example of "extract-*" actions ~

In the following table,
"a.zip" is an archive file which contains "a/foo.txt",
"b.zip" is an archive file which contains "bar.txt", and
"c.zip" is an archive file which contains "d/baz.txt".

            |                  Extracted stuff                ~
Target item |------------------------------------------------ ~
            | extract-asis     extract-smartly extract-solely ~
------------------------------------------------------------- ~
a.zip         a/foo.txt        a/foo.txt       foo.txt
b.zip         bar.txt          a/bar.txt       bar.txt
c.zip         d/baz.txt        a/d/baz.txt     baz.txt




==============================================================================
KEY TABLE                                       *ku-file-key-table*

Key             Action ~
--------        --------
<C-e>           extract-smartly |ku-file-action-extract-smartly|
<C-o>           open            |ku-file-action-open|
<Esc>e          extract-solely  |ku-file-action-extract-solely|
<M-e>           extract-solely  |ku-file-action-extract-solely|
E               extract-asis    |ku-file-action-extract-asis|
O               open!           |ku-file-action-open!|
e               extract-smartly |ku-file-action-extract-smartly|
o               open            |ku-file-action-open|




==============================================================================
ARCHIVES                                        *ku-file-archives*

ITEMS IN ARCHIVES                               *ku-file-items-in-archives*

|ku-file| can treat archive files as if they are directories.  For example, as
you input "dir/" in |the-ku-buffer|, ku will list files and directories in the
directory "dir".  Like this operation, as you input "foo.zip/" in the ku
buffer, ku will list files and directories in the archive file "foo.zip".  If
"foo.zip" contains "README.txt", "Makefile" and "bar.c", ku will list them as
follows:
>
        Source: file
        >foo.zip/
        foo.zip/Makefile
        foo.zip/README.txt
        foo.zip/bar.c
<
You can take an action on such items.  For example, if you do "open" on
"foo.zip/bar.c", the content of "bar.c" in "foo.zip" will be displayed in
a new buffer.

Additional actions are available for items in archive files.
See |ku-file-actions-for-items-in-archives| for the details.


ARCHIVE ITEMS                                   *ku-file-archive-items*

Additional actions are available for items which are archive files.
See |ku-file-actions-for-archive-items| for the details.


LIMITATIONS                                     *ku-file-archives-limitations*

Currently, there are the following limitations to deal with archives files:

- Recursive archive files are not supported yet.  This means that archive
  files which are contained in another archive file are not treated specially.
  For example, if there is "a.zip" which contains "b.zip" and "b.zip" contains
  "c.txt", you can choose "b.zip" with some patterns such as "a.zip/b.zip",
  but you cannot choose "c.txt" with any pattern such as "a.zip/b.zip/c.txt".

- The following formats are supported:
  - .zip

  The following formats are supported later:
  - .Z
  - .bz2
  - .gz
  - .tar
  - .tar.Z
  - .tar.bz2
  - .tar.gz

- Archive files without standard extensions are not supported yet.




==============================================================================
BUGS                                            *ku-file-bugs*

- ".." for the root directories is not listed.  But on Microsoft Windows, this
  behavior is not worked properly, so that ".." is also listed in some
  situations.

- See also |ku-file-archives-limitations|.

- Actions specific to archive files or items in archive files are also
  available for all items even if they are not such items.  Currently, such
  actions don't nothing for improper items.

- There are many bugs around the world.




==============================================================================
CHANGELOG                                       *ku-file-changelog*

0.1.4   2009-05-29T09:11:39+09:00               *ku-file-changelog-0.1.4*
        Bug fixes:
        - Fix a bug that it is not possible to list the contents in the most
          of absolute paths.  This bug was mixed in version 0.1.3.

          Thanks to Travis Jeffery for a feedback.  I noticed this bug by the
          feedback, though it doesn't imply this bug.

0.1.3   2009-05-24T15:57:13+09:00               *ku-file-changelog-0.1.3*
        Feature enhancements:
        - Support to deal with files in an archive files.  See also
          |ku-file-archives| for the details.

0.1.2   2009-05-13T22:33:46+09:00               *ku-file-changelog-0.1.2*
        Bug fixes:
        - Fix an assumption that the separator for pathes is "/".  This
          assumption causes unexpected behavior on some environments such as
          Microsoft Windows.
        - Fix a bug that dot files are not listed on Microsoft Windows.
          Thanks to thinca for reporting this.
        - Fix a bug that directories are suffixed with a path separator
          unexpectedly if some condition is met.  It is somewhat inconvenient
          with |ku-auto-component-completion|.
        - Don't list ".." for the root directory.  This is not worked for
          Microsoft Windows yet.
        - Fix a bug that |ku-file-action-open| and |ku-file-action-open!|
          don't escape a given path properly.  Thanks to thinca for reporting
          this.

        Feature enhancements:
        - In the |ins-completion-menu|, append a path separator for each item
          which is a directory to clear whether an item is a directory or not.
          This appending only affects the menu, and internal data are not
          always suffixed with a path separator.

        Incompatible changes:
        - Require ku 0.2.2.

0.1.1   2009-05-04T01:45:44+09:00               *ku-file-changelog-0.1.1*
        - Update for ku 0.2.1.

0.1.0   2009-04-28T02:00:05+09:00               *ku-file-changelog-0.1.0*
        - Update for ku 0.2.0.

0.0.2   2008-12-24T14:08:50+09:00               *ku-file-changelog-0.0.2*
        - Fix the bug that a file or a directory which path contains a space
          cannot be correctly opened.

0.0.1   2008-09-29T02:42:28+09:00               *ku-file-changelog-0.0.1*
        - Filter items for |ku-auto-component-completion|.  Only directories
          are completed.
        - List dot files if the last part of an input pattern starts with
          a dot, for example, ".a", "b/c/.d" and so forth.
        - Fix the bug that parent directories are not listed.

0.0.0   2008-07-20T01:10:37+09:00               *ku-file-changelog-0.0.0*
        - Initial version.




==============================================================================
vim:tw=78:ts=8:ft=help:norl:fen:fdl=0:fdm=marker: