*eunuch.txt*  File manipulation
Author:  Tim Pope <http://tpo.pe/>
License: Same terms as Vim itself (see |license|)

This plugin is only available if 'compatible' is not set.

INTRODUCTION                                    *eunuch*

Vim sugar for the UNIX shell commands that need it the most.  Delete or rename
a buffer and the underlying file at the same time.  Load a `find` or a
`locate` into the quickfix list.  And so on.

Since this plugin can delete files, you should be aware that this plugin can
delete files.  Fat fingers beware.

If you create a new file that starts with #!, `chmod +x` will automatically be
invoked on it when you first write the file.

File type detection for files edited with `sudoedit` and `sudo -e` happens
based on the original file name.

New init scripts are automatically prepopulated with `/etc/init.d/skeleton`,
if available.

COMMANDS                                        *eunuch-commands*

                                                *eunuch-:Remove*
:Remove[!]              |:bdelete|, and, if successful, delete the file from
                        disk.  If a bang is given, it is passed along to
                        :bdelete.

                                                *eunuch-:Unlink*
:Unlink[!]              Delete the file from disk and reload the buffer.
                        If a bang is given, discard unsaved changes.

                                                *eunuch-:Move*
:Move[!] {file}         Like |:saveas|, but delete the old file afterwards.

                                                *eunuch-:Rename*
:Rename[!] {file}       Like |:Move|, but relative to the current file's
                        containing directory.

                                                *eunuch-:Chmod*
:Chmod {mode}           Change the permissions of the current file.

                                                *eunuch-:Mkdir*
:Mkdir {dir}            Create directory {dir} with |mkdir()|.

:Mkdir! {dir}           Create directory {dir} with |mkdir()| passing the "p"
                        argument.  This is like `mkdir -p`.

:Mkdir[!]               With no argument, create the containing directory for
                        the current file.

                                                *eunuch-:Find*
:Find[!] {args}         Run `find` and load the results into the quickfix
                        list.  Jump to the first result unless ! is given.

                                                *eunuch-:Locate*
:Locate[!] {args}       Run `locate` and load the results into the quickfix
                        list.  Jump to the first result unless ! is given.

                                                *eunuch-:SudoEdit*
:SudoEdit [file]        Edit a file using sudo.  This overrides any read
                        permission issues, plus allows you to write the file
                        with :w!.

                                                *eunuch-:SudoWrite*
:SudoWrite              Use sudo to write the file to disk.  Handy when you
                        forgot to use sudo to invoke Vim.  This uses :SudoEdit
                        internally, so after the first invocation you can
                        subsequently use :w!.

                                                *eunuch-:Wall* *eunuch-:W*
:Wall                   Like |:wall|, but for windows rather than buffers.
:W                      It also writes files that haven't changed, which is
                        useful for kicking off build and test suites (such as
                        with watchr or guard).  Furthermore, it handily
                        doubles as a safe fallback for people who, like me,
                        accidentally type :W instead of :w a lot.

ABOUT                                           *eunuch-about*

Grab the latest version or report a bug on GitHub:

http://github.com/tpope/vim-eunuch

 vim:tw=78:et:ft=help:norl:
