LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 10-20-2008, 09:59 AM   #1
RudraB
Member
 
Registered: Mar 2007
Distribution: Fedora
Posts: 264

Rep: Reputation: 23
save and kill vim from shellscript


dear friends,
I am in NFS and I have to logout if I am not in my chair for 1hour. I can do this using gnome-session-save; but if I have instance of vi editor open and unsaved, can I ensure from the shell script to save all those process before quiting?
 
Old 10-21-2008, 03:45 AM   #2
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
It is bad behaviour to leave unsaved documents for 1 hour, you never know what could happen imho
At least for my part, when I work with important document, I do a save immediatly after each change
Sorry if that does not answer your question, though (I don't know a way to do autosave in vi)
But I think you could recover document with the vi swap files, if opened document were brutally closed without saving
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
kill a waiting process using shellscript ranmahs Linux - General 5 12-07-2007 03:56 AM
Vim Save Hooks dlublink Linux - Software 2 09-24-2006 08:55 PM
Vim: ftp save no longer works after reinstall GreenPenInc Linux - Software 0 06-14-2005 02:59 PM
ShellScript sharadgana Programming 1 12-16-2004 01:16 PM
How do you save in "vim"? Mekaziah Linux - General 4 10-09-2002 06:43 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration