Skip to content

tpope/vim-eunuch

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

In 20f11a6, I attempted to fix this by
changing -nargs=1 to -nargs=+, based on the observation that it seemed
to prevent Vim from implicitly expanding <q-args> before handing it to
us.  Upon further investigation, that actually gives us a partially
expanded mess, expanding "%" but not "$VAR".  If you can't beat 'em,
join 'em.  This commit reverts to -nargs=1, and drops our own calls to
expand() entirely.

This also restores the zero argument version of :SudoEdit, which was
accidentally removed in the previous attempt.

Resolves: #101
291ef1f

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
doc
 
 
 
 
 
 

eunuch.vim

Vim sugar for the UNIX shell commands that need it the most. Features include:

  • :Remove: Delete a file on disk without E211: File no longer available.
  • :Delete: Delete a file on disk and the buffer too.
  • :Move: Rename a buffer and the file on disk simultaneously. See also :Rename, :Copy, and :Duplicate.
  • :Chmod: Change the permissions of the current file.
  • :Mkdir: Create a directory, defaulting to the parent of the current file.
  • :Cfind: Run find and load the results into the quickfix list.
  • :Clocate: Run locate and load the results into the quickfix list.
  • :Lfind/:Llocate: Like above, but use the location list.
  • :Wall: Write every open window. Handy for kicking off tools like guard.
  • :SudoWrite: Write a privileged file with sudo.
  • :SudoEdit: Edit a privileged file with sudo.
  • Typing a shebang line causes the file type to be re-detected. Additionally the file will be automically made executable (chmod +x) after the next write.

Installation

Install using your favorite package manager, or use Vim's built-in package support:

mkdir -p ~/.vim/pack/tpope/start
cd ~/.vim/pack/tpope/start
git clone https://tpope.io/vim/eunuch.git
vim -u NONE -c "helptags eunuch/doc" -c q

Contributing

See the contribution guidelines for pathogen.vim.

Self-Promotion

Like eunuch.vim? Follow the repository on GitHub and vote for it on vim.org. And if you're feeling especially charitable, follow tpope on Twitter and GitHub.

License

Copyright (c) Tim Pope. Distributed under the same terms as Vim itself. See :help license.