Extend Default Configuration of vim Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) 2019 Community Moderator Election Results Why I closed the “Why is Kali so hard” questionSetting vim filetype with modeline not working as expectedWhy does Vim only activate my highlight configuration after I source my .vimrc manually?Customised vimrc for subfolders and projectsVIM: folding bullet pointsVim syntax highlighting fails with autosessionInstalling vim locally on a cluster: can't find syntaxvim sudo hack auto reloadHow do I recompile a package if installed via apt-get? (Ubuntu)st-terminal / vim - Ultisnips: How to enable Ctrl+Enter as Enter in insert mode of vim?Syntax highlighting in Vim turned on for user, but off for root

Is it true that "carbohydrates are of no use for the basal metabolic need"?

Is the Standard Deduction better than Itemized when both are the same amount?

Book where humans were engineered with genes from animal species to survive hostile planets

Seeking colloquialism for “just because”

List *all* the tuples!

How to align text above triangle figure

Why do people hide their license plates in the EU?

What is Arya's weapon design?

List of Python versions

English words in a non-english sci-fi novel

ListPlot join points by nearest neighbor rather than order

How to find out what spells would be useless to a blind NPC spellcaster?

What causes the vertical darker bands in my photo?

How can I make names more distinctive without making them longer?

What does the "x" in "x86" represent?

Generate an RGB colour grid

How to call a function with default parameter through a pointer to function that is the return of another function?

Why light coming from distant stars is not discrete?

What is the logic behind the Maharil's explanation of why we don't say שעשה ניסים on Pesach?

What exactly is a "Meth" in Altered Carbon?

Is it ethical to give a final exam after the professor has quit before teaching the remaining chapters of the course?

How do pianists reach extremely loud dynamics?

What does F' and F" mean?

Sci-Fi book where patients in a coma ward all live in a subconscious world linked together



Extend Default Configuration of vim



Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)
2019 Community Moderator Election Results
Why I closed the “Why is Kali so hard” questionSetting vim filetype with modeline not working as expectedWhy does Vim only activate my highlight configuration after I source my .vimrc manually?Customised vimrc for subfolders and projectsVIM: folding bullet pointsVim syntax highlighting fails with autosessionInstalling vim locally on a cluster: can't find syntaxvim sudo hack auto reloadHow do I recompile a package if installed via apt-get? (Ubuntu)st-terminal / vim - Ultisnips: How to enable Ctrl+Enter as Enter in insert mode of vim?Syntax highlighting in Vim turned on for user, but off for root



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








7















I've been using the default configuration of vim for a while and want to make a few changes. However, if I edit ~/.vimrc it seems to overwrite all other configuration settings of /etc/vimrc and such, e.g. now there is no syntax highlighting. Here is what vim loads:



:scriptnames
/etc/vimrc
/usr/share/vim/vimfiles/archlinux.vim
~/.vimrc
/usr/share/vim/vim80/plugin/... <there are a few>


In other words I want to keep whatever there is configured in vim, but simply make minor adjustments for my shell user.



What do I need to do to somehow weave ~/.vimrc into the existing configuration or what do I need to put into ~/.vimrc so it loads the default configuration?



EDIT:

My intended content of ~/.vimrc:



set expandtab
set shiftwidth=2
set softtabstop=2









share|improve this question
























  • In my experience, this is not usually the way it works...

    – Kusalananda
    Feb 10 '18 at 23:12











  • @Kusalananda Awesome. So how does it work then?

    – sjngm
    Feb 10 '18 at 23:22











  • how did ~/.vimrc get to be in the middle of the pack?

    – thrig
    Feb 10 '18 at 23:48











  • @thrig I really don't know.

    – sjngm
    Feb 10 '18 at 23:50











  • What exactly did you put in vimrc? @thrig not unusual, if you have filetype on, it will load files from $VIMRUNTIME based on file types, and that will be after vimrc

    – muru
    Feb 11 '18 at 0:10


















7















I've been using the default configuration of vim for a while and want to make a few changes. However, if I edit ~/.vimrc it seems to overwrite all other configuration settings of /etc/vimrc and such, e.g. now there is no syntax highlighting. Here is what vim loads:



:scriptnames
/etc/vimrc
/usr/share/vim/vimfiles/archlinux.vim
~/.vimrc
/usr/share/vim/vim80/plugin/... <there are a few>


In other words I want to keep whatever there is configured in vim, but simply make minor adjustments for my shell user.



What do I need to do to somehow weave ~/.vimrc into the existing configuration or what do I need to put into ~/.vimrc so it loads the default configuration?



EDIT:

My intended content of ~/.vimrc:



set expandtab
set shiftwidth=2
set softtabstop=2









share|improve this question
























  • In my experience, this is not usually the way it works...

    – Kusalananda
    Feb 10 '18 at 23:12











  • @Kusalananda Awesome. So how does it work then?

    – sjngm
    Feb 10 '18 at 23:22











  • how did ~/.vimrc get to be in the middle of the pack?

    – thrig
    Feb 10 '18 at 23:48











  • @thrig I really don't know.

    – sjngm
    Feb 10 '18 at 23:50











  • What exactly did you put in vimrc? @thrig not unusual, if you have filetype on, it will load files from $VIMRUNTIME based on file types, and that will be after vimrc

    – muru
    Feb 11 '18 at 0:10














7












7








7








I've been using the default configuration of vim for a while and want to make a few changes. However, if I edit ~/.vimrc it seems to overwrite all other configuration settings of /etc/vimrc and such, e.g. now there is no syntax highlighting. Here is what vim loads:



:scriptnames
/etc/vimrc
/usr/share/vim/vimfiles/archlinux.vim
~/.vimrc
/usr/share/vim/vim80/plugin/... <there are a few>


In other words I want to keep whatever there is configured in vim, but simply make minor adjustments for my shell user.



What do I need to do to somehow weave ~/.vimrc into the existing configuration or what do I need to put into ~/.vimrc so it loads the default configuration?



EDIT:

My intended content of ~/.vimrc:



set expandtab
set shiftwidth=2
set softtabstop=2









share|improve this question
















I've been using the default configuration of vim for a while and want to make a few changes. However, if I edit ~/.vimrc it seems to overwrite all other configuration settings of /etc/vimrc and such, e.g. now there is no syntax highlighting. Here is what vim loads:



:scriptnames
/etc/vimrc
/usr/share/vim/vimfiles/archlinux.vim
~/.vimrc
/usr/share/vim/vim80/plugin/... <there are a few>


In other words I want to keep whatever there is configured in vim, but simply make minor adjustments for my shell user.



What do I need to do to somehow weave ~/.vimrc into the existing configuration or what do I need to put into ~/.vimrc so it loads the default configuration?



EDIT:

My intended content of ~/.vimrc:



set expandtab
set shiftwidth=2
set softtabstop=2






vim configuration






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Feb 11 '18 at 0:13







sjngm

















asked Feb 10 '18 at 22:53









sjngmsjngm

180111




180111












  • In my experience, this is not usually the way it works...

    – Kusalananda
    Feb 10 '18 at 23:12











  • @Kusalananda Awesome. So how does it work then?

    – sjngm
    Feb 10 '18 at 23:22











  • how did ~/.vimrc get to be in the middle of the pack?

    – thrig
    Feb 10 '18 at 23:48











  • @thrig I really don't know.

    – sjngm
    Feb 10 '18 at 23:50











  • What exactly did you put in vimrc? @thrig not unusual, if you have filetype on, it will load files from $VIMRUNTIME based on file types, and that will be after vimrc

    – muru
    Feb 11 '18 at 0:10


















  • In my experience, this is not usually the way it works...

    – Kusalananda
    Feb 10 '18 at 23:12











  • @Kusalananda Awesome. So how does it work then?

    – sjngm
    Feb 10 '18 at 23:22











  • how did ~/.vimrc get to be in the middle of the pack?

    – thrig
    Feb 10 '18 at 23:48











  • @thrig I really don't know.

    – sjngm
    Feb 10 '18 at 23:50











  • What exactly did you put in vimrc? @thrig not unusual, if you have filetype on, it will load files from $VIMRUNTIME based on file types, and that will be after vimrc

    – muru
    Feb 11 '18 at 0:10

















In my experience, this is not usually the way it works...

– Kusalananda
Feb 10 '18 at 23:12





In my experience, this is not usually the way it works...

– Kusalananda
Feb 10 '18 at 23:12













@Kusalananda Awesome. So how does it work then?

– sjngm
Feb 10 '18 at 23:22





@Kusalananda Awesome. So how does it work then?

– sjngm
Feb 10 '18 at 23:22













how did ~/.vimrc get to be in the middle of the pack?

– thrig
Feb 10 '18 at 23:48





how did ~/.vimrc get to be in the middle of the pack?

– thrig
Feb 10 '18 at 23:48













@thrig I really don't know.

– sjngm
Feb 10 '18 at 23:50





@thrig I really don't know.

– sjngm
Feb 10 '18 at 23:50













What exactly did you put in vimrc? @thrig not unusual, if you have filetype on, it will load files from $VIMRUNTIME based on file types, and that will be after vimrc

– muru
Feb 11 '18 at 0:10






What exactly did you put in vimrc? @thrig not unusual, if you have filetype on, it will load files from $VIMRUNTIME based on file types, and that will be after vimrc

– muru
Feb 11 '18 at 0:10











2 Answers
2






active

oldest

votes


















6














You can source the global Vim configuration file into your local ~/.vimrc:



source /usr/share/vim/vim81/defaults.vim
set mouse-=a





share|improve this answer























  • Awesome!!! It's a good thing that questions don't die around here... :)

    – sjngm
    Jul 12 '18 at 16:28


















0














What I found out is that the default config (default.vim) is not loaded if you create a ~/.vimrc file, so what I did was to put the contents of the default config into vimrc and to add the modifications at the end.



I am assuming you have vim8 and are using default configurations (i.e. you don't have a ~/.vimrc file)



Copy default config to your user vimrc file:



cp /usr/share/vim/vim80/defaults.vim ~/.vimrc



Then open your ~/.vimrc file and add your configs at the end of it.






share|improve this answer

























    Your Answer








    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "106"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f423301%2fextend-default-configuration-of-vim%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    6














    You can source the global Vim configuration file into your local ~/.vimrc:



    source /usr/share/vim/vim81/defaults.vim
    set mouse-=a





    share|improve this answer























    • Awesome!!! It's a good thing that questions don't die around here... :)

      – sjngm
      Jul 12 '18 at 16:28















    6














    You can source the global Vim configuration file into your local ~/.vimrc:



    source /usr/share/vim/vim81/defaults.vim
    set mouse-=a





    share|improve this answer























    • Awesome!!! It's a good thing that questions don't die around here... :)

      – sjngm
      Jul 12 '18 at 16:28













    6












    6








    6







    You can source the global Vim configuration file into your local ~/.vimrc:



    source /usr/share/vim/vim81/defaults.vim
    set mouse-=a





    share|improve this answer













    You can source the global Vim configuration file into your local ~/.vimrc:



    source /usr/share/vim/vim81/defaults.vim
    set mouse-=a






    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Jul 12 '18 at 1:05









    emylleremyller

    17613




    17613












    • Awesome!!! It's a good thing that questions don't die around here... :)

      – sjngm
      Jul 12 '18 at 16:28

















    • Awesome!!! It's a good thing that questions don't die around here... :)

      – sjngm
      Jul 12 '18 at 16:28
















    Awesome!!! It's a good thing that questions don't die around here... :)

    – sjngm
    Jul 12 '18 at 16:28





    Awesome!!! It's a good thing that questions don't die around here... :)

    – sjngm
    Jul 12 '18 at 16:28













    0














    What I found out is that the default config (default.vim) is not loaded if you create a ~/.vimrc file, so what I did was to put the contents of the default config into vimrc and to add the modifications at the end.



    I am assuming you have vim8 and are using default configurations (i.e. you don't have a ~/.vimrc file)



    Copy default config to your user vimrc file:



    cp /usr/share/vim/vim80/defaults.vim ~/.vimrc



    Then open your ~/.vimrc file and add your configs at the end of it.






    share|improve this answer





























      0














      What I found out is that the default config (default.vim) is not loaded if you create a ~/.vimrc file, so what I did was to put the contents of the default config into vimrc and to add the modifications at the end.



      I am assuming you have vim8 and are using default configurations (i.e. you don't have a ~/.vimrc file)



      Copy default config to your user vimrc file:



      cp /usr/share/vim/vim80/defaults.vim ~/.vimrc



      Then open your ~/.vimrc file and add your configs at the end of it.






      share|improve this answer



























        0












        0








        0







        What I found out is that the default config (default.vim) is not loaded if you create a ~/.vimrc file, so what I did was to put the contents of the default config into vimrc and to add the modifications at the end.



        I am assuming you have vim8 and are using default configurations (i.e. you don't have a ~/.vimrc file)



        Copy default config to your user vimrc file:



        cp /usr/share/vim/vim80/defaults.vim ~/.vimrc



        Then open your ~/.vimrc file and add your configs at the end of it.






        share|improve this answer















        What I found out is that the default config (default.vim) is not loaded if you create a ~/.vimrc file, so what I did was to put the contents of the default config into vimrc and to add the modifications at the end.



        I am assuming you have vim8 and are using default configurations (i.e. you don't have a ~/.vimrc file)



        Copy default config to your user vimrc file:



        cp /usr/share/vim/vim80/defaults.vim ~/.vimrc



        Then open your ~/.vimrc file and add your configs at the end of it.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited 12 hours ago









        Rui F Ribeiro

        42.1k1484142




        42.1k1484142










        answered Mar 22 '18 at 15:42









        klausklaus

        1112




        1112



























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Unix & Linux Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f423301%2fextend-default-configuration-of-vim%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            -configuration, vim

            Popular posts from this blog

            Frič See also Navigation menuinternal link

            Identify plant with long narrow paired leaves and reddish stems Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) Announcing the arrival of Valued Associate #679: Cesar Manara Unicorn Meta Zoo #1: Why another podcast?What is this plant with long sharp leaves? Is it a weed?What is this 3ft high, stalky plant, with mid sized narrow leaves?What is this young shrub with opposite ovate, crenate leaves and reddish stems?What is this plant with large broad serrated leaves?Identify this upright branching weed with long leaves and reddish stemsPlease help me identify this bulbous plant with long, broad leaves and white flowersWhat is this small annual with narrow gray/green leaves and rust colored daisy-type flowers?What is this chilli plant?Does anyone know what type of chilli plant this is?Help identify this plant

            fontconfig warning: “/etc/fonts/fonts.conf”, line 100: unknown “element blank” The 2019 Stack Overflow Developer Survey Results Are In“tar: unrecognized option --warning” during 'apt-get install'How to fix Fontconfig errorHow do I figure out which font file is chosen for a system generic font alias?Why are some apt-get-installed fonts being ignored by fc-list, xfontsel, etc?Reload settings in /etc/fonts/conf.dTaking 30 seconds longer to boot after upgrade from jessie to stretchHow to match multiple font names with a single <match> element?Adding a custom font to fontconfigRemoving fonts from fontconfig <match> resultsBroken fonts after upgrading Firefox ESR to latest Firefox