sudo-gui.vim


Ⅰ. 插件描述

sudo GUI for a GUI vim

Ⅱ. 基本信息

创建日期:  2010-12-07
使用用户:  46
Github星:  14
插件作者:  gmarik

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'gmarik/sudo-gui-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'gmarik/sudo-gui-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'gmarik/sudo-gui-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/gmarik/sudo-gui.vim

Ⅳ. 文档说明

## About

sudo-gui.vim is a GUI sudo for a GUI vim.

Why

The original idea isn't mine, but I just couldn't get MacVim working with sudo.

What

sudo-gui.vim plugin provides the SudoWrite! command, along with a W! shortcut, enabling a file with administrative priviliges to be written.
Depending on whether vim is run as a GUI or terminal app, a password will be requested at the console or in a GUI dialog box.

  • On OS X built-in security dialog will be used.
  • On Linux polkit's pkexec will be invoked if available.
  • As a fallback you'll be able to authenticate in the console using sudo.

Screenshot

Installation

If you're a Vundle user add the following to your .vimrc:

Bundle 'gmarik/sudo-gui.vim'

and run :BundleInstall (a Vim restart is required for Vundle versions prior to v0.5).

PS

I know there is a sudo.vim but I'd rather prototype before contributing...

TODO

  • docs
  • SudoRead?
  • Screencast?

添加新评论