nautilus-py-vim


Ⅰ. 插件描述

A nautilus python extension which adds several menu items to nautilus for gvim

Ⅱ. 基本信息

创建日期:  2011-05-30
使用用户:  1
Github星:  2
插件作者:  Hong Xu

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/xuhdev/nautilus-edit-with-vim

Ⅳ. 文档说明

# Nautilus-Edit-with-Vim

Overview

Nautilus-Edit-with-Vim is an extension for Nautilus, the GNOME file manager,
written in python. This extension adds several menu items in the nautilus
right-click context menu for gvim, just like gVim on Windows. This version of
the extension works on Nautilus 3.

NOTE: If you are using Nautilus 2, please use the [nautilus-2 branch][].

Install

To install this extension, first make sure that you have installed the
nautilus python extension:

$ # On Fedora
$ sudo yum install nautilus-python

$ # On Debian/Ubuntu
$ sudo apt-get install python-nautilus

If you want to enable the "Edit with gVim as Root" menu item, you should
install gksu,
beesu or
kdesu:

$ # On Fedora:
$ sudo yum install beesu

$ # On Debian/Ubuntu
$ sudo apt-get install gksu

After that, run the following command to install in user directory:

curl -L http://github.com/xuhdev/nautilus-edit-with-vim/raw/master/nautilus-edit-with-vim.py >~/.local/share/nautilus-python/extensions/nautilus-edit-with-vim.py

Or to install system-widely:

sudo curl -L http://github.com/xuhdev/nautilus-edit-with-vim/raw/master/nautilus-edit-with-vim.py >$XDG_DATA_DIR/share/nautilus-python/extensions/nautilus-edit-with-vim.py

Then restart nautilus(execute "nautilus -q") and try to right click on the
file(s) you want to edit, you will see the changes in the context menu("Edit
with gVim" when only one file is selected, and "Diff with gVim", "Edit with
Multi gVim", "Edit with a Single gVim" are present when several files are
selected), just like what it is like on Windows.

Configuration

To configure the extension, you could write a config file. Nautilus-Edit-with-Vim
will search for the config file in the order of the following files:

  • ~/.nautilus-edit-with-vim.conf
  • ~/.nautilus/nautilus-edit-with-vim.conf
  • /etc/nautilus-edit-with-vim.conf

For the content of the config file, you could take a look at the
[example.conf][].

If none of the configuration files are found, Nautilus-Edit-with-Vim will use
default values.

Uninstall

Remove user's local installation:

rm ~/.local/share/nautilus-python/extensions/nautilus-edit-with-vim.py

Remove a system-wide installation:

rm $XDG_DATA_DIR/share/nautilus-python/extensions/nautilus-edit-with-vim.py

添加新评论