[solved] confusion about vim and its config files

Hi, Im getting really confused with vim and its /etc/vimrc config, and the per user ~/.vimrc.
On one of my PC's I have an untouched /etc/vimrc and a /home/jason/.vimrc which has:
syntax on
now, on that same PC, if I run
vim .vimrc
"syntax on" in green and yellow as expected, and if I run
sudo vim .vimrc
I also see
"syntax on" in green and yellow, but surely this is opening it as root?
*Edit
Even though there is no .vimrc in /root, and the system-wide /etc/vimrc is untouched/blank
On another PC I also have an untoched /etc/vimrc, and a /home/jason/.vimrc which has:
syntax on
Aswell, and:
vim .vimrc
has "syntax on" in green and yellow as expected, but this time:
sudo vim .vimrc
Has no colour?
I cant explain this, any ideas?
*Edit
To clarify, both PC's have an untouched /etc/vimrc and there is no /root/.vimrc file on either PC
Last edited by jrussell (2013-04-14 10:21:42)

siriusb wrote:
The configuration files in /etc are for system-wide settings. These are the default settings if not overridden by a user's own settings in their home directory.
So running vim as your regular user will use the settings from your home directory.
What does sudo? From man sudo
sudo allows a permitted user to execute a command as the superuser or another user, as specified by the security policy.
So if you didn't specify any setting in the home folder of the user you want to run vim as, and you don't have anything in /etc/vimrc, vim won't apply any custom settings.
I understand all of that, but on both my PC's I have a clean/untouched config /etc/vimrc, and both /root/.vimrc files do not exist, so howcome on one PC I get colour with sudo vim...., and on the other I dont?

Similar Messages

  • About IPS and its working

    i want to know in detail about IPS and its working.Also is it using artificial intelligent or neural network for self upgrading reason.

    No, the sensors are not intelligent. They will very happily sit there dumb until updated manually.

  • Why do we need to specify Role baseprovider and membership provider in Central Admin and security config files?

    Hi,
    why do we need to specify role base provider and membership provider files in central admin and securiy config files.
    thanks,
    gaurav

    We use 3 settings in Forms based auth:
    1 Membership = This contains Users and groups information. (This table also has username and password)
    2 ConnectionString = Connetion details to connect to database is stored here(servername, databasename, username, password, port )
    3 Role = This table contains all the Roles (Admin, contibutor, etc of the data source)

  • Location of MTA and POA config files:

    Hello. I'm reading an article from cool tools by Kiril Stankov regarding
    moving a groupwise database to a new volume or server. In step 4 he says
    if you are moving data between servers make sure to copy the POA, MTA,
    WAA and GWIA config files. The only one I can find is the gwia.cfg. I
    looked under SYS:\system for the others and can't find them anywhere.
    Thanks

    > What's in grpwise.ncf ?
    >
    > It should be something like
    >
    > LOAD SYS:\SYSTEM\GWPOA @POA.POA
    > LOAD SYS:\SYSTEM\GWMTA @MTA.MTA
    LOAD SYS:\SYSTEM\GWPOA @CTCPO.POA
    LOAD SYS:\SYSTEM\GWMTA @CTCMAIL.MTA
    > the files you want are the ones after the @ sign, and they should be in
    > the directory referred to in the load bit, in this case sys:\system
    Ok. So I can, in my case anyway, just copy my SYS directory over if I
    choose too
    > Cheers Dave
    >
    >
    > --
    > Dave Parkes [NSCS]
    > Occasionally resident at http://support-forums.novell.com/

  • I love AI love Apple.  I own an iMac, a MacbookPro, an iPad, and an iPhone.  I've been a loyal Mac user since the '80's.   But, please, when are you going to do something about iCal and its Reminders component?  Attaching documents is clumsy. If you're on

    I love AI love Apple. I own an iMac, a MacbookPro, an iPad, and an iPhone.  I’ve been a loyal Mac user since the ‘80’s.   But, please, when are you going to do something about iCal and its Reminders component?  Attaching documents is clumsy. If you’re on iCloud, as I am, repeating events is impossible.  The ability to copy text or graphics into either events or Reminders doesn’t really exist.  This is an easy fix.   Why not get it done? 

    Maybe things will improve this summer,
    http://www.apple.com/macosx/mountain-lion/features.html
    Regards,
    Captfred

  • HT201320 I am having trouble with password. Forgetting password,as I have many mail IDs like yahoo,gmail,hotmail,apple, I cloud etc.,thus confusing about password and restating through procedures. The altered password is not accepted I Safari

    I am having trouble with password. Forgetting password,as I have many mail IDs like yahoo,gmail,hotmail,apple, I cloud etc.,thus confusing about password and restating through procedures. The altered password is not accepted I Safari. When I want to open my mail but window appears as incorrect password though the mail appears on the left. however whe I go to my mail separately opening my mail, without mail icon in my pad.

    I'm having the same problem, what did you do?

  • How can I identify new new added harddisk and its device file

    Hello:
    I am confuse about it. It is about new harddisk map to device file issue.
    Example:
    I set up two harddisks by VMware SCSI 1:0 & SCSI 1:1, and I can see /dev/sdb /dev/sdc by "lvmdiskscan".
    The puzzle is how can I distinguish this two new harddisk mapping device file if SCSI 1:0 & SCSI 1:1 are also 1GB of each?
    Just like one which is right SCSI 1:0 map to /dev/sdb or /dev/sdc ? How can I check them using command?

    Normally /dev/sda is SCSI ID 0, /dev/sdb SCSI ID 1, etc.
    You can try lsscsi command, e.g.:
    # lsscsi
    [0:0:0:0]    disk    VBOX     HARDDISK         1.0   /dev/sda
    [0:0:1:0]    disk    VBOX     HARDDISK         1.0   /dev/sdb
    [0:0:2:0]    disk    VBOX     HARDDISK         1.0   /dev/sdc
    [0:0:3:0]    disk    VBOX     HARDDISK         1.0   /dev/sdd
    [2:0:0:0]    cd/dvd  VBOX     CD-ROM           1.0   /dev/sr0

  • Confused about XPostFacto and the 8GB Limit - Please help

    Hi all,
    I've been running XPostFacto 4.0 on my Apple G3 Desktop (Rev C, 640MB Ram, 533 Mhz G4 OWC CPU upgrade) for sometime and is running great.
    But I have a question about the 8GB rule.
    This computer only runs off of a Seritek SATA card. There is a 35 GB Raptor drive on it, the first 7.81 GB is the 10.3.9 drive, and rest is for applications and files.
    I added a 160 GB Hitachi drive to the SATA card that I moved from my G4 MDD computer. It already has 3 partitions: 30 GB for 10.3.9, 10GB for OS9, and 115 GB for audio production files.
    If I wanted to boot off the Hitachi drive, would I have to re-format and create a 8 GB partition?
    As is, if I try to boot off the drive I just added, XPostFacto tries to synchronize the files, then it invariably crashes.
    I tried reading the manual again, but I get confused about the Mac OS X Installer and the 8GB rule, and so on.
    Thanks!

    i wound up erasing the partition on the transferred drive and carboncopycloning the beige's OS X drive to it...and now the transferred drive is booting ok!
    now, i'm thinking of copying the whole raptor drive over and re-partitioning the raptor drive (strangely, the raptor appears with about 9 partitions on Disk Utility, though the only two that i created are clickable...wonder if the OS sees this drive as something like scsi).
    this is a little asides the point, but on my MDD, the 7200 hitachi seemed to test as "faster" than the 10000rpm raptor in most categories. would the 7200 drive infact be better for OS style-tasks?
    Powerbook Alum 15 G4, MDD Dual 867 Mhz, Beige Minitower G3 Mac OS X (10.3.9)

  • Trying to set up encrypted mails but I'm confused about certificates and keys

    Hello all,
    My first foray into encrypted emails and I'm already confused! To begin with, I'm trying to exchange mails with one other person, who I believe uses Outlook. So far:
    He's sent me his certificate (although I thought I would receive his public key) which is a file called smime.p7m. I don't know what to do with this.
    I've successfully followed the instructions at https://support.mozilla.org/en-US/kb/digitally-signing-and-encrypting-messages. When I start a new mail, I can either go to the Enigmail menu and switch on encryption / digital signing and it seems fine, or I can go to the dropdown on the S/MIME button and it says "You need to set up one or more personal certificates before you can use this security feature." Are these two different ways of doing the same thing (in which case I'll use the one that works!) or not?
    As you can see, I'm getting confused between keys and certificates! If some kind person could take a minute to explain what my next steps are, that would be much appreciated. I couldn't find anything on the Thunderbird support pages, though I know I need to send him my public key.
    Thanks in advance.
    Stuart.

    Stuart8, good find, that article.
    I found the main disincentive to using the built-in S/MIME capability is that it's not immediately obvious where to get your certificate and keys. Most providers want $$$ for them, which is natural enough if they are actually going to validate you in some way. I did at one time have a Thawte certificate and even enough WOT vouches to be a low-grade WOT Attorney.
    Once you have your key, it's a bit of a pfaff to install it into Thunderbird. You'll probably find that S/MIME is the default in business correspondence, since many businesses operate their own mail servers, ftp servers and so on and probably have an arrangement to generate self-issued certificates or to buy them on a commercial basis from a CA.
    Enigmail/OpenPGP doesn't require any financial outlay on your part, but is harder to get your keys properly validated since there's not much of a formal WOT nor a reliable central registry. You generate your own keys and it's pretty much all based on mutual trust.
    Since the two systems are incompatible, you need to have set up the same as whatever your correspondent is using.
    I suspect that you have discovered that it's a two-way process. In order for a correspondent to send you an encrypted message, you must both be using the same system, and he must have your public key to encrypt his message, and you'll need his in order to reply with encryption. So yes, he needs to send you his public key for you to send to him, but what he sends to you needs YOUR public key.
    Obviously, signing messages is a useful halfway house. I believe that you sign with your private key, and the recipient will have to download your public key to validate your signature. Whilst a signature doesn't safeguard your privacy, it goes some way to proving that the message came from who it says it came from and that it hasn't been altered in transit. (I really can't understand why banks, lawyers, insurance companies haven't picked up on these encryption and signing schemes. Perhaps they actually prefer all those awful phone calls where you need to struggle to recall supposedly unforgettable names and dates! ;-) )
    In practice, I find that if you sign a message to an outfit who don't know what to do with it, their numpty anti-virus system will probably barf on the signature which it thinks is executable code and therefore must be a virus or worm. :-(

  • Confusion about Kodo and JCA

    Hi,
    I'm a bit confused about Kodo's Connection Architecture strategy. It is my understanding that
    PMF's can be built to use the connection architecture. Along this line, one would configure the
    ConnectionFactory or ConnectionFactoryName, and possibly the ConnectionFactory2 and
    ConnectionFactory2Name properties in a PMF. The result of the PMF implementation supporting the
    connection architecture is nice integration with the application servers in terms of security,
    transaction, and connection management. One can lookup in JNDI a reference to a Kodo PMF that
    supports datastore transactions or to another one that supports optimistic transactions or to
    another one that supports NTR, and with proper settings of the transactional properties and suitable
    application code, one's sesson bean will work.
    But from what I can see of Kodo's JDOPersistenceManagerFactory class, it, itself, implements the
    ManagedConnectionFactory interface, meaning, I think, that this class is resource adaptor. And that
    the part that confuses me. Why would Kodo be a resource adaptor? I thought it used a resource
    adaptor, which I think is the same thing as a connection factory.
    Anyway, I'm puzzled, and I'm hoping that someone could straighten me out.
    David Ezzio

    David-
    The fact that Kodo can integrate into an application server as a
    Resource Adaptor, and section 3.2.2 of the specification that says that
    the PersistentManagerFactory should be able to utilize a Resource
    Adaptor to obtain connections to the data store are two separate issues.
    We implement Kodo itself as a Resource Adaptor in order to provide ease
    of integration into recent application servers. Your confusion is
    understandable, since we do not actually yet support the use of Resource
    Adaptors as the Connection Factories as per section 3.2.2.
    Does that make sense?
    David Ezzio <[email protected]> wrote:
    Hi,
    I'm a bit confused about Kodo's Connection Architecture strategy. It is my understanding that
    PMF's can be built to use the connection architecture. Along this line, one would configure the
    ConnectionFactory or ConnectionFactoryName, and possibly the ConnectionFactory2 and
    ConnectionFactory2Name properties in a PMF. The result of the PMF implementation supporting the
    connection architecture is nice integration with the application servers in terms of security,
    transaction, and connection management. One can lookup in JNDI a reference to a Kodo PMF that
    supports datastore transactions or to another one that supports optimistic transactions or to
    another one that supports NTR, and with proper settings of the transactional properties and suitable
    application code, one's sesson bean will work.
    But from what I can see of Kodo's JDOPersistenceManagerFactory class, it, itself, implements the
    ManagedConnectionFactory interface, meaning, I think, that this class is resource adaptor. And that
    the part that confuses me. Why would Kodo be a resource adaptor? I thought it used a resource
    adaptor, which I think is the same thing as a connection factory.
    Anyway, I'm puzzled, and I'm hoping that someone could straighten me out.
    David Ezzio--
    Marc Prud'hommeaux [email protected]
    SolarMetric Inc. http://www.solarmetric.com
    Kodo Java Data Objects Full featured JDO: eliminate the SQL from your code

  • CS5 confusion about saving and previews

    I'm adjusting to the recent upgrade to CS5 but have reached a hiccup. I'm on a Mac Pro (2010) with OS 10.6.4. Previously, when I've saved a file (whether it was a jpg, tiff, eps, png., psd...), a preview was created. If I double-clicked on it to open it, even if Photoshop wasn't opened, the document would open up in the native Photoshop software. Now, after saving a tif, jpg. or eps., upon double-clicking, the document opens up in the generic Macintoch preview window and will not initiate the Photoshop software. I checked my preferences for document handling and the "Always Save" in: Icon and Windows Thumbnail are checked. There is no longer a save in Macintosh Thumbnail, as in previous software versions. I hope this explains my full dilemma and that a member will see the discrepancy to help me out. Is there something I need to change that I can't recognize?
    Thanks,
    Al

    I'm a bit confused by your explanation, is the problem that when you save the file it doesn't have a thumbnail? If so, are you running Photoshop 12.0.1? There was a fix on the 12.0.1 update to fix this.
    If the problem is that when you double click on a file it doesn't open in Photoshop, then you just need to change a preference in Finder. Select the file you want (say, a .tif) and go to File>Get Info (or Command+I). On the "Open With:" option, choose Photoshop CS5 from the drop down menu. After that, click on the "Change all" button below it. You'll need to do that to all the extensions you want (.jpg, etc)
    Hope this helps!

  • [SOLVED] Confused about Mobility Radeon HD 3200

    I've always found hard to find good information about this card - some sources, even, contradict themselves. All what I know is that it is an integrated graphics card and that it features the RS780M chipset. These are some tips I've got from the system logs:
    grep -i r600 /var/log/Xorg.0.log
    [ 23.353] (II) RADEON(0): [DRI2] DRI driver: r600
    [ 23.353] (II) RADEON(0): [DRI2] VDPAU driver: r600
    [ 24.099] (II) AIGLX: Loaded and initialized r600
    dmesg | grep -i radeon
    [ 0.000000] Command line: BOOT_IMAGE=/vmlinuz-linux-hf root=UUID=ab92c2db-22b5-4fcb-a33f-2efe3f3f104c ro radeon.modeset=1 radeon.benchmark=0 radeon.tv=0 radeon.pm=0 init=/usr/lib/systemd/systemd quiet
    [ 0.000000] Kernel command line: BOOT_IMAGE=/vmlinuz-linux-hf root=UUID=ab92c2db-22b5-4fcb-a33f-2efe3f3f104c ro radeon.modeset=1 radeon.benchmark=0 radeon.tv=0 radeon.pm=0 init=/usr/lib/systemd/systemd quiet
    [ 1.463857] [drm] radeon kernel modesetting enabled.
    [ 1.464337] radeon 0000:01:05.0: VRAM: 256M 0x00000000C0000000 - 0x00000000CFFFFFFF (256M used)
    [ 1.464340] radeon 0000:01:05.0: GTT: 512M 0x00000000A0000000 - 0x00000000BFFFFFFF
    [ 1.464779] [drm] radeon: 256M of VRAM memory ready
    [ 1.464781] [drm] radeon: 512M of GTT memory ready.
    [ 1.472494] radeon 0000:01:05.0: WB enabled
    [ 1.472499] radeon 0000:01:05.0: fence driver on ring 0 use gpu addr 0x00000000a0000c00 and cpu addr 0xffff8800374a5c00
    [ 1.472502] radeon 0000:01:05.0: fence driver on ring 3 use gpu addr 0x00000000a0000c0c and cpu addr 0xffff8800374a5c0c
    [ 1.472570] [drm] radeon: irq initialized.
    [ 1.472672] radeon 0000:01:05.0: setting latency timer to 64
    [ 1.504277] [drm] radeon atom DIG backlight initialized
    [ 1.504279] [drm] Radeon Display Connectors
    [ 1.504311] [drm] radeon: power management initialized
    [ 2.344989] fbcon: radeondrmfb (fb0) is primary device
    [ 2.441483] radeon 0000:01:05.0: fb0: radeondrmfb frame buffer device
    [ 2.441486] radeon 0000:01:05.0: registered panic notifier
    [ 2.441502] [drm] Initialized radeon 2.30.0 20080528 for 0000:01:05.0 on minor 0
    I also found good (?) information, or at least a clearly-explained article, here. After reading it, UVD appears as the AMD's counterpart of NVIDIA's VDPAU for video acceleration.
    What I'm not sure about, is:
    -  Does it support video acceleration? I'd like to offload video processing to the GPU, but am not sure if my card and the open-source drivers support it or not. Wikipedia's article about VDPAU states it comes from NVIDIA, but then it says it has an open-source implementation.
    -  What has gallium to do with it? What gallium drivers should I enable in mesa? And what about DRI drivers?
    I configured mesa as follows:
    ./configure --prefix=/usr \
    --sysconfdir=/etc \
    --with-dri-driverdir=/usr/lib/xorg/modules/dri \
    --with-gallium-drivers=r600 \
    --with-dri-drivers=radeon \
    --with-llvm-shared-libs \
    --enable-gallium-llvm \
    --enable-egl \
    --enable-gallium-egl \
    --with-egl-platforms=x11,drm \
    --enable-shared-glapi \
    --enable-gbm \
    --enable-glx-tls \
    --enable-dri \
    --enable-glx \
    --enable-osmesa \
    --enable-texture-float \
    --enable-xa \
    --enable-vdpau
    Not sure if I missed something, though.
    I am very confused about how Linux manages graphics, and what all those layers are for. DRM, DRI, VDPAU, VA-API, gl, gl3, xv, xvmc... it's a mess!
    Thanks in advance.
    Last edited by Kalrish (2013-06-16 17:54:04)

    The feature matrix might help. The easy part to answer is that the 3D driver is split into two parts: DRM which is part of the kernel and DRI which is in userspace and comes from the mesa package.
    Xv is an Xserver extension supported by pretty much all drivers. Found in the DDX (xf86-video-*), it uses features of the card to speed up the display of video (but not decoding). It can either do this by using the "video overlay" or creating a shader.
    Now if you want to use Xv but also offload decoding to the card, you need a video acceleration API. The ones to choose from are XvMC, VA-API, VDAPU in increasing order of feature support. They were developed by Xorg, Intel, Nvidia respectively but anyone is free to implement them. I don't think it's correct to call UVD a counterpart of VDPAU. UVD is a bunch of registers on newer AMD cards. And if you sent bits to those registers in the right way, you can implement VDPAU.
    The other way to implement VDPAU (say if the documentation for UVD registers was not released) is to use gallium. There is a gallium state tracker which can still do it at the expense of being slower. It is a hack whereby you convert video frames to polygon textures and make the OpenGL part of the card think that it's calculating part of a 3D scene when really it's decoding video.

  • Confuse about ADS and How to check ADS in NW7.0

    I confuse about ADS. It's a separate software from NW 7.0 or integrate when install NW7.0 . How to check ADS in NW7.0.
    Thanks in advanced

    Everything here : https://www.sdn.sap.com/irj/sdn/adobe
    Summary: installed with NW7.0, you must configure it. See config guide how to check it.

  • [solved] pacman command to compare package config files

    Hi, Id like to know if there is a pacman command similar to this:
    pacman -Qii | awk '/^MODIFIED/ {print $2}'
    from pacman tips, but where it just checks if the files are not identicle to the default config file of the package?
    From what I can tell, this checks if a file was modified at all (I have copied a config file from a package to a modified package and the file still appears in the output, even though their contents is identicle.
    pacman -Qii | awk '/^MODIFIED/ {print $2}'
    Last edited by jrussell (2013-04-13 17:59:39)

    graysky wrote:
    jrussell wrote:... but where it just checks if the files are not identicle to the default config file of the package?
    Unless I am misunderstanding you, pacman does that by default; when the upgrade is written to disc, the file in question becomes foo.pacnew which you can easily vimdiff or whatever against the original.
    Yes, but I would like to print out a list of config files that are not identical
    I basically want to see a list of all the config files installed that are not identical to thier original config file,
    pacman -Qii | awk '/^MODIFIED/ {print $2}'
    still lists files which are identical because I think it uses modification times or something else

  • Deploy a package in SSIS DB catalog and pass Config file dynamically in a SQL job

    Hi,
    I have a Package that needs to be deployed in SSIS Catalog DB.
    Later I need to execute it through SQL Job.
    Please let me know the steps how to do this and also I need to pass a Config file to run the package in SQL job.
    Thanks,.
    Sailaja

    Hi Sailaja,
    Based on your description, you want to deploy a package to SSIS Catalog DB, then execute it through SQL Agent job with configuration file.
    To deploy a package to SSIS Catalog DB, we can refer to the following suggestions:
    SSMS-->Integration Service Catalogs-->SSISDB-->Your project-->projects. Right click on the projects, and choose "Import Packages...". Then make use of the Project Conversion Wizard to select the packages that you want to deploy, deploy
    the generated .ispac file to SSIS Catalog. For more details, please see:
    https://msdn.microsoft.com/en-us/library/jj852096.aspx
    The command line tool DTUTIL.EXE which can be used to deploy SSIS packages. For more details, please see:
    http://www.mssqltips.com/sqlservertutorial/215/command-line-deployment-tool-for-ssis-packages/
    To schedule the package by using SQL Agent job, we should select Integration Services Package for the job step type, then add configuration file or add some properties form configuration file in the Configuration tab. For more details, please see:
    https://msdn.microsoft.com/en-us/library/gg471507.aspx
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

Maybe you are looking for

  • Displaying values from JSP in textbox

    I want to fetching values from database table using JSP and display the values in a textbox in a textbox. I found if the value is a single word, it can display correctly. but if the values are multiply words, there are just the first word appeared in

  • Clearing values from a single partition

    I have a cube that I load daily with a reload of the weeks data. Data from previously loaded days may change and is brought in via a view (lets say week to date). What I need to be able to do is clear out one or two partitions (weekly) and then reloa

  • Hard drive data cable issues

    I have a 2010 13" Macbook pro. It was refurbished when bought in 2011, and I've had it since May of 2011. The first time I had the flashing folder with a question mark was about a year after it was bought in summer 2012, and the data cable connecting

  • Missing post message in client session monitoring

    Hi, I have synchronized creating a record of a data object, in the message monitoring tool appears that the message is processed correctly but if I look the session at the client session monitoring that message did not appears, would appears as post

  • Ipod 80G classic Restore Loop

    A few months ago i accidentally dropped my ipod onto its corner. after that it would freeze and not work properly. eventually it set itself to disk mode. i have no idea how or why. it just did. now when i connect it to itunes it says i need to restor