gedit
text editor for the GNOME Desktop
Synopsis
gedit
[OPTION...] [FILE...]
[+LINE[:COLUMN]]
add an example, a script, a trick and tips
examples
source
function gedit {
apt-get install -y gedit
}
source
How to tell GEDIT to reload currently opened file
This functionality is not yet present in Gedit, but it's on the
Requested plugins list
source
make
./pac
gedit output &
source
How to configure GEdit correctly?
You can have the lines in the left side by navigating to
Edit -> Preferences and checking off
Display Line Numbers. Additional plugins can be
grabbed here and configured under Edit ->
Preferences -> Plugins Tab.
You can grab Auto Indent here
and Auto Complete here.
Here's a shot of preferences for reference:
source
Shortcut to remove first character of multiple lines in gedit
That really depends on the software you're using.
For instance, MS-Word would left you alt-select the first character of the lines
(if the lines doesn't wrap around).
If you're using an editor that allows Regular Expression search and replace you could
use something like ^.
to search for the first
character of each line.
Unfortunately you need to be more specific.
source
How to move files and folders with Gedit?
It is kinda... Well... Not proper. (as in not a plugin).
1) Click File -> Open
2) Locate directory
3) Drag and Drop file into any folder within that directory.
or
Ctrl + x (cut), Ctrl + c (copy), Ctrl + v (paste) or just use
right click menu. Now move to the other directory and paste it.
source
use gedit to open file with null characters
I believe that works on a document that's already loaded rather
than one that's in the process of being loaded.
You could use a wrapper script or function that does the
tr
for you then launches gedit
.
source
Can gedit on mac be used to edit files over ssh?
Use the -X option when you ssh into your linux machine. If you
haven't already installed X11, it's available as an optional
install on your OS X install disc. With X11 installed, 'ssh -X
user@host' starts X11 and you're ready to use gedit.
Alternatively, you can use Macfusion to mount your linux machine, through
ssh, as a file system. You can then use an OS X text editor to
edit files on the remote machine.
source
Formatting gets changed when trying to copy text from gedit to vim
Take a look here. Basically it's the
pastetoggle
option.
source
Changing GEdit's default file open/save path?
Similar things have been requested, although it seems they don't plan
on changing it. It is hardcoded into gedit that the initial
default save directory is the user's home folder. After you save
to a different location, gedit will remember the new location and
make that the default for the next save. With that said, just
open gedit and save something to the desktop. The next time you
go to save something it should point there already, although if
you save somewhere else it will change. There is no way of
changing the default to always be a specific
location unless you edit the source.
source
How can I show "space" as "-" or other marks in gEdit?
It appears that the gEdit plugin "Draw Spaces" has this
functionality.
source
Can't install gedit plugins on Linux Mint 12
The solution is found
here. Apparently one needs to
- Change the extension for the description file from
.gedit-plugin to .plugin (which I did)
- In addition one must edit the header of this file from [Gedit
plugin] to [Plugin]
The second point solved the problem for me, but this should be
better documented by the gedit guys.
source
unable to open a file in gedit from the terminal when I login as root
By default, and for security reasons, the only user that
interacts with X-server is the logged-in user. Meaning, You can
not initiate a connection to x-server as a different user or in
your case as root, unless you have overridden the default setting
to allow different users/hosts to connect to x-server. So the
error message you are getting is related to x-server since any
other user can't connect to it. In order to get around it, you
have various fixes you can apply. What I normally do when ever I
need to run an X-app as root is as follows.
- From normal user terminal, I run
xhost +
to
grant access to all user temporarily
- Then I log in as root from a different terminal and execute
the X-app ie
gedit tester.php
To make it permanent (which I don't suggest), edit
/etc/profile
and add the following line:
export XAUTHORITY=/root/.Xauthority
source
Gedit opens on all workspaces?
I'm sure you know this, but fedora 10 is outdated and no longer
supported and you should probably migrate to something fresher,
and probably this issue doesn't even exist there :)
Question: Does this happen when you launch it from a terminal
too, or only from the entries provided by xfce? What version of
xfce? Is it a pure xfce & xfwm setup or do you use it in
combination with something else? (Can't post comments, forgive
me!)
The name for this behaviour is sticky, might want to check the
settings manager (window manager and related sections) for how
it's set up.
If unable to find the cause, you could hack around it
with wmctrl, see here using wmctrl -r gedit -b
remove,sticky
description
gedit is
the official text editor of the GNOME desktop
environment.
While aiming at
simplicity and ease of use, gedit is a powerful
general purpose text editor. It can be used to create and
edit all kinds of text files.
gedit
features a flexible plugin system which can be used to
dynamically add new advanced features to gedit
itself.
options
-b,
--background
Run gedit in the
background.
--encoding
Set the character encoding to
be used for opening the files listed on the command
line.
-g,
--geometry=GEOMETRY
Set the X geometry window size
(WIDTHxHEIGHT+X+Y).
--list-encodings
Display list of possible values
for the encoding option and exit.
--new-window
Create a new toplevel window in
an existing instance of gedit.
--new-document
Create a new document in an
existing instance of gedit.
-s,
--standalone
Run gedit in standalone
mode.
-w,
--wait
Open files and block the
gedit process.
--help
Prints the command line options.
--version
Output version information and
exit.
FILE
Specifies the file to open when gedit starts. If
this is not specified, gedit will load a blank file
with an "Unsaved Document" label. Multiple files
can be loaded if they are separated by spaces. gedit
also supports handling of remote files. For example, you can
pass the location of a webpage to gedit , like
"http://www.gnome.org", or load a file from a FTP
server, like "ftp://ftp.gnome.org/robots.txt".
+LINE
For the first file, go to the line specified by LINE (do
not insert a space between the "+" sign and the
number). If LINE is missing, go to the last line.
COLUMN
For the first file, go to the column specified by
COLUMN. If COLUMN is missing, go to the first column.
bugs
If you find a
bug, please report it at
http://bugzilla.gnome.org/enter_bug.cgi?product=gedit.
authors
Paolo Maggi
(paolo[:at:]gnome[:dot:]org)
Paolo Borelli (pborelli[:at:]katamail[:dot:]com)
Steve Frécinaux (code[:at:]istique[:dot:]net)
Jesse van den Kieboom (jessevdk[:at:]gnome[:dot:]org)
Ignacio Casal Quinteiro <icq[:at:]gnome[:dot:]org>
James Willcox (jwillcox[:at:]gnome[:dot:]org)
Federico Mena Quintero (federico[:at:]novell[:dot:]com)
Chema Celorio