LinuxQuestions.org
Review your favorite Linux distribution.
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 06-27-2016, 08:54 PM   #1
cmoore90638
Member
 
Registered: May 2013
Posts: 30

Rep: Reputation: Disabled
editing etc/slackpkg/mirrors


I am really getting to feel stupid now.I am using VI to select a mirrors I get it open, but it won't uncomment. I am logged in as root. I have tried delete, space bar, and back space. the # will not disappear I have tried vi /etc/slackpkg/mirrors, and edit /etc/slackplg/mirrors. I haxe no idea what I am doing wrong, but I am sure it is something that will make me humble.

thank you in advance
 
Old 06-27-2016, 09:10 PM   #2
notKlaatu
Senior Member
 
Registered: Sep 2010
Location: Wellington, New Zealand
Distribution: Slackware, Fedora, NetBSD
Posts: 1,071

Rep: Reputation: 725Reputation: 725Reputation: 725Reputation: 725Reputation: 725Reputation: 725Reputation: 725
Maybe don't use vi for everyday maintenance yet, if you don't know vi. I mean, it's great to learn it at some point, but to start with maybe try `nano` instead.

Code:
# nano /etc/slackpkg/mirrors
For future reference, the delete key in vi(m) is 'x' (or 'd' if you want to get fancy).

I believe there's a vim tutor if you type 'vimtutor' into a terminal, but that's probably not on your top list of priorities yet :^)

Last edited by notKlaatu; 06-27-2016 at 09:24 PM. Reason: helpful info on learning vim for future ref.
 
1 members found this post helpful.
Old 06-27-2016, 09:33 PM   #3
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 8,581

Rep: Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761
I get the same results using vi but the 'x' key works to delete. Using vim instead of vi also allows use of the delete key.
 
Old 06-27-2016, 10:00 PM   #4
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 15,326
Blog Entries: 25

Rep: Reputation: 4391Reputation: 4391Reputation: 4391Reputation: 4391Reputation: 4391Reputation: 4391Reputation: 4391Reputation: 4391Reputation: 4391Reputation: 4391Reputation: 4391
vi/vim has a learning curve. It's curve worth navigating, but it is a quite a curve.

Slackware includes vim. Open a terminal and type the command

Code:
vimtutor
That will open an excellent introductory tutorial to vim. Vimtutor is an integral part of a vim install.

I got along for some years knowing only four basic vi/vim commands:

ESC-i (enter insert mode)
ESC (enter command mode)
dd (delete line)
x (delete character)

A couple of years ago, I set out to learn vim (I did so by using Mutt for email and setting vim as my editor). Now it is my preferred text editor, because of its power and versatility, and I'm still just a vim beginner.

Last edited by frankbell; 06-27-2016 at 10:04 PM.
 
1 members found this post helpful.
Old 06-27-2016, 11:25 PM   #5
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, MX 18
Posts: 9,484
Blog Entries: 15

Rep: Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161
I generally use nano to edit the mirrors file. Give it a try.
 
Old 06-28-2016, 01:28 AM   #6
Philip Lacroix
Member
 
Registered: Jun 2012
Distribution: Slackware, BSD
Posts: 422

Rep: Reputation: 539Reputation: 539Reputation: 539Reputation: 539Reputation: 539Reputation: 539
Vi is a very nice and powerful editor and my preferred one, though as frankbell I'm still using it at beginner level. Doing at least some basic reading is highly recommended: it will make your life much easier. The version of vi included in Slackware is elvis (the vi command is just a symlink to /usr/bin/elvis). The book "Slackware Linux Essentials" has a nice little section on elvis, perfect to get started: Chapter 16 - Vi.

Of course you can find the whole documentation on your machine:

Code:
/usr/doc/elvis-<version>/doc/elvis.html
The same documentation can be found online as well: elvis documentation.

Regarding Vim, in addition to frankbell's valuable mention of vimtutor, and to Vim's online help system, you can find the whole documentation here: Vim documentation.
 
  


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
/etc/slackpkg/mirrors divali Slackware 2 11-18-2013 08:23 PM
[SOLVED] typos in latest /etc/slackpkg/mirrors(.new) [slackpkg-2.82.0-noarch-8.tgz] wailingwailer Slackware 4 09-22-2012 04:04 AM
New Slackpkg Mirrors List - Please Test jaycee4 Slackware 23 09-13-2012 09:53 PM
slackpkg does not recognize mirrors xri Slackware 16 08-11-2009 11:00 PM
how do i go about editing /etc/slackpkg/mirrors ? Draconian Slackware 2 08-19-2004 02:04 AM

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

All times are GMT -5. The time now is 07:42 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration