[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Gvim Nautilus script



Hej Alle
Hvis der er nogle vim brugere der også bruger Nautilus, kommer her et
forslag til at udvide funktionaliteten lidt.

Da jeg i Nautilus2 så nogle gzip-komprimerede textfiler, jeg gerne lige
ville kikke i, men ikke lige kunne finde ud af at sætte Nautilus op til
det, fik jeg den ide at prøve mig med nautilus-scripts. Jeg vidste jo at
vim allerede var sat op til at kunne læse txt.gz, så det var jo oplagt.

Jeg håber da at nogen kan gøre brug af dem, og især komme med forslag
til forbedringer.

Leo

#v+ 
#!/bin/bash
#
# Nautilus script: open file(s) in a new instance of gvim
#
# Loosely based on Gedit script by Largey Patrick <sslug@sslug>
#
# Licence : GNU GPL 
#
# Copyright (C) Leo Laursen <sslug@sslug>
#
# Ver: 0.1  Date: 7.07.2002
# Initial release
#
# Dependence : Nautilus (of course)
#			  Gnome-utils (gdialog)

filesall=""
while [ "$#" -gt 0 ]
do
   files=`echo "$1" | sed 's/ /\\ /g'`
   filesall="$files $filesall"
   shift
done
exec gvim $filesall

# 2. variation
## Nautilus script: Open file(s) in existing gvim or opens gvim
# exec gvim --remote $filesall
#
# 3. variation
## Nautilus script: Open file(s) in split window in gvim
## gvim --remote + "0sp # | winc p" "1"
## Preben "Peppe" Guldberg, on news:comp.editors
#exec gvim --remote +"split # | wincmd p" $filesall

#v-

Scriptet lægges i "~/.gnome2/nautilus-scripts", gøres eksekverbart og så
skulle der dukke et nyt punkt op i højrekliks menuen.
Er det ikke GNOME2 så måske "~/.gnome/nautilus-scripts"

Den eneste forskel på de tre versioner er "exec" linien. Vælg den mest
brugbare, eller kopier scriptet i versioner med med hver sin udgave.
-- 
If there are self-made purgatories, then we all have to live in them.
		-- Spock, "This Side of Paradise", stardate 3417.7


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 18:44 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *