LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-07-2010, 08:09 AM   #31
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721

Quote:
Originally Posted by r3sistance View Post
There should be little need to use control for anything in a text editor thus using it for things like saving, finding, exiting I believe is a superior method all round.
I have no idea what you mean here.
 
Old 08-07-2010, 08:11 AM   #32
r3sistance
Senior Member
 
Registered: Mar 2004
Location: UK
Distribution: CentOS 6/7
Posts: 1,375

Rep: Reputation: 217Reputation: 217Reputation: 217
Control, as in the key labelled ctrl. There should be no need for a text editor to use this for anything, and so nano using control+key combinations in my opinion is a superior method then say vi's. Hit i to insert then escape to enter in things like ":w". or ":q!".
 
Old 08-07-2010, 08:32 AM   #33
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721
But the thing is that vi has much more commands that "Save" and "Exit".

It has commands like:
  • Replace character
  • Create new line above/below current
  • Delete
  • Copy
  • Select
  • Select line-by-line
  • Move up/down/left/right
  • Replace
  • And much more...
 
Old 08-07-2010, 08:36 AM   #34
r3sistance
Senior Member
 
Registered: Mar 2004
Location: UK
Distribution: CentOS 6/7
Posts: 1,375

Rep: Reputation: 217Reputation: 217Reputation: 217
I am not arguing that vi doesn't do more. I am just saying that way nano uses control +key is a superior method. Also if you need to create a new line in nano, you go to where you want the line and just hit return. Using putty highlighting the text copies (admit-ably if it's larger then the terminal window in either width or height this will be an issue) and use right click to paste. Putty can do searches with ^w.
 
Old 08-07-2010, 08:57 AM   #35
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721
Quote:
Originally Posted by r3sistance View Post
[the] way nano uses control +key is a superior method.
Why?

Tell me, keystroke-by-keystroke, how would you , for example, replace a word in nano?
 
Old 08-07-2010, 09:16 AM   #36
r3sistance
Senior Member
 
Registered: Mar 2004
Location: UK
Distribution: CentOS 6/7
Posts: 1,375

Rep: Reputation: 217Reputation: 217Reputation: 217
Quote:
Originally Posted by r3sistance View Post
I am not arguing that vi doesn't do more. I am just saying that way nano uses control +key is a superior method.
*cough cough* I am not arguing on a function by function argument, I am simply saying that if you can do control +key then this method appears very much superior. It's easier to learn and use in my opinion. If somebody wants to go out and make more control +key methods... well up to them.

Last edited by r3sistance; 08-07-2010 at 09:17 AM.
 
Old 08-07-2010, 09:22 AM   #37
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721
But Ctrl+Key combinations are hard to press. I think it would get quite awkward and painful if you have to keep pressing them all the time.
 
Old 08-07-2010, 10:11 AM   #38
r3sistance
Senior Member
 
Registered: Mar 2004
Location: UK
Distribution: CentOS 6/7
Posts: 1,375

Rep: Reputation: 217Reputation: 217Reputation: 217
If you are pressing them in an awkward fashion then you likely are not doing it right... there is two control keys for a reason after all and we all have two hands. When it comes to Text Editors I generally just prefer nano from the fact it does what I need it too. I am not after anything more complicated, I want it easy and simple... if I wanted something more complicated I'd use something more advanced like open office writer or I would do it on my machines and just SCP it up to the server.
 
Old 08-07-2010, 10:14 AM   #39
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721
You'd use OpenOffice.org Writer to edit config files and source code?
 
Old 08-07-2010, 10:27 AM   #40
r3sistance
Senior Member
 
Registered: Mar 2004
Location: UK
Distribution: CentOS 6/7
Posts: 1,375

Rep: Reputation: 217Reputation: 217Reputation: 217
I can not remember where it's been said in here this is about config files or source code. I said if I needed more functionality what I would not when it comes to config files and source code.
 
Old 08-07-2010, 10:56 AM   #41
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721
Quote:
Originally Posted by r3sistance View Post
I can not remember where it's been said in here this is about config files or source code.
Why would you really use vi or nano for anything other than that?
 
Old 08-07-2010, 11:09 AM   #42
r3sistance
Senior Member
 
Registered: Mar 2004
Location: UK
Distribution: CentOS 6/7
Posts: 1,375

Rep: Reputation: 217Reputation: 217Reputation: 217
I use nano for leaving myself notes, documenting ideas I have while I am doing things on the server, making change log files. Basic Documentation files... etc.
 
Old 08-07-2010, 06:25 PM   #43
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Debian + kde 4 / 5
Posts: 6,834

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
vi's mode concept certainly is hard to grasp at first. For me, the key was to recognize that the command mode is the "base mode", the one you work from, and that editing text is simply one of the commands you can issue from it. You don't have hotkeys tacked on to an editor, you have text editing built into a powerful command interface.

I found this page especially helpful in grasping it's power.

http://www.swaroopch.com/notes/Vim_en:First_Steps

(Full disclosure: I'm still taking baby steps with vim; I don't use it as my main editor yet (I still use nano generally). But I intend to get there eventually. )
 
Old 08-07-2010, 08:16 PM   #44
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721
Yes, one of the main steps for me toward understanding vi was to realize that you are supposed to mainly stay in command mode and only go into insert mode when you want to add some new text. Before I just stayed in insert mode all the time using the arrow keys to move around, and only went to command mode to save and then get right back into insert mode.

So basically you should edit and move in command mode, and add new text in insert mode.
 
Old 08-08-2010, 02:14 AM   #45
r3sistance
Senior Member
 
Registered: Mar 2004
Location: UK
Distribution: CentOS 6/7
Posts: 1,375

Rep: Reputation: 217Reputation: 217Reputation: 217
This is actually a reason I am going to say Vi(m) is not notepad like (even tho it pre-dates notepad), because notepad isn't about breaking around several modes, it's just about simple text editing what Nano is far more suited for. Also notepad uses Control+Key combinations IE ^C copy, ^V paste... actually thinking about it, I wonder why no there are not any text editors that do try to be a bit more like notepad in that department, since it does pretty much everything a text editor needs in a very efficient way that can on the main part easily work in a console...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
text editor vs notepad linux_sj Linux - Newbie 13 03-24-2010 11:48 AM
notepad compatible text editor manuleka Linux - Newbie 5 03-30-2009 03:55 PM
using Windows Notepad in Linux newbiesforever Linux - Software 9 08-07-2008 01:52 PM
How can we copy the program code wriiten in notepad to linux vi editor? mayank027 Linux - General 2 10-25-2005 07:14 AM
Notepad in linux wh33t Linux - Software 10 05-24-2004 11:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:35 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration