How can see what changed in document?

Everything about X, Gnome, KDE, ... and everything running on it

How can see what changed in document?

Postby bester69 » 2019-01-22 17:11

Hi,

Do you know how to do whith kate or gedit, to quickly watch what has changed in edition mode?,
I mean, some kind of quickly mode like "ultracompare"(parallel tab or highlighted text) with the recently opened document, so I can see what I has changed before to decide if save it or not. I need this, cos sometimes I accidentally save the document with things that shouldnt be there.


Thanks, a lot.
bester69 wrote:There is nothing to install in linux, from time to time i go to google searching for something fresh to install in linux, but, there is nothing
User avatar
bester69
 
Posts: 1285
Joined: 2015-04-02 13:15

Re: How can see what changed in document?

Postby wizard10000 » 2019-01-22 17:25

Why not set your preferred text editor to make a backup of a file before editing? kate and gedit both support this.
we see things not as they are, but as we are.
-- anais nin
User avatar
wizard10000
 
Posts: 1307
Joined: 2011-05-09 20:02
Location: everywhere i go, there i am!

Re: How can see what changed in document?

Postby CwF » 2019-01-22 17:54

You could look at diffuse or meld.
CwF
 
Posts: 217
Joined: 2018-06-20 15:16

Re: How can see what changed in document?

Postby GarryRicketson » 2019-01-22 18:17

You could set up a wiki, on a localhost , the wiki software keeps track of all the changes and edits, but it might be to complicated for you.
https://packages.debian.org/jessie/python-moinmoin
https://moinmo.in/

You can look at this, it will give you a idea of how it keeps track of all the changes to any pages, (documents) and shows what the previous page looked like before it was edited.
https://wiki.debian.org/RecentChanges
For example: I looked at "info" , on this document:
https://wiki.debian.org/InstallingDebianOn/Dell/Dell%20XPS%2013?action=info
================
https://wiki.debian.org/InstallingDebianOn/Dell/Dell%20XPS%2013?action=diff&rev1=1&rev2=2
User avatar
GarryRicketson
 
Posts: 5277
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: How can see what changed in document?

Postby pylkko » 2019-01-22 18:24

if you edit a file with gedit in a git repo (just init git in the folder first), it automatically displays (ok, it's proably a plugin) the lines that have changed since last edit (commit) in the left margin with a color. When using a git you will never again have the problem that you saved a version that you didn't want, as you have all the changes and the full history so that you can go to whatever version you ever want at any time.
User avatar
pylkko
 
Posts: 1392
Joined: 2014-11-06 19:02

Re: How can see what changed in document?

Postby bester69 » 2019-01-23 01:17

pylkko wrote:if you edit a file with gedit in a git repo (just init git in the folder first), it automatically displays (ok, it's proably a plugin) the lines that have changed since last edit (commit) in the left margin with a color. When using a git you will never again have the problem that you saved a version that you didn't want, as you have all the changes and the full history so that you can go to whatever version you ever want at any time.

This sounds good, but I would have to learn first some about git..

ok, I think I will go for this solution of my own Ive just created.:

katec
Code: Select all
#!/bin/sh
#
cp $1 $1.bak
echo "### ESTA ES LA COPIA ####" >> $1.bak
kate $1 &
kompare -c $1.bak $1
rm  $1.bak

This way, when editing file, it created a first copy as a reference and inmediatly open editor(kate) and comparator (kompare), so you just need to press F5 to refresh changes in kompare.. Within kompare we correct/commit the lines we messed accidentally, and then refresh kate to undo the wrong lines and continue with edition. Once It has finished, it removes the reference copy file.

Image

Thanks to All, for your help
bester69 wrote:There is nothing to install in linux, from time to time i go to google searching for something fresh to install in linux, but, there is nothing
User avatar
bester69
 
Posts: 1285
Joined: 2015-04-02 13:15

Re: How can see what changed in document?

Postby bester69 » 2019-01-23 15:30

This new version, updates reference file comparison everytime we close kompare, and next, It opens comparison again. It breaks the loop when closing kate.

katec
Code: Select all
#!/bin/sh
#
kate $1 2> /dev/null &
while true; do

 if [ -z "$(pidof kate)" ]
 then
  break
 else
 
  if [ -z "$(pidof kompare)" ]
  then
    cp $1 $1.bak
    echo "### ESTA ES LA COPIA ####" >> $1.bak
    kompare -c $1.bak $1 2> /dev/null & 
  else
  echo "nothing" 1> /dev/null 
  fi
 
    fi
done
killall kompare
rm  $1.bak
bester69 wrote:There is nothing to install in linux, from time to time i go to google searching for something fresh to install in linux, but, there is nothing
User avatar
bester69
 
Posts: 1285
Joined: 2015-04-02 13:15


Return to Desktop & Multimedia

Who is online

Users browsing this forum: No registered users and 3 guests

fashionable